diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ed08dcc05..50782b4d6 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -17,8 +17,6 @@ replace = {new_version}' search = {current_version}' replace = {new_version}' -[bumpversion:file:docassemble/docassemble/__init__.py] - [bumpversion:file:docassemble_base/docassemble/base/__init__.py] [bumpversion:file:docassemble_demo/docassemble/demo/__init__.py] diff --git a/CHANGELOG.md b/CHANGELOG.md index a961b7757..e52fa3788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## [1.6.0] - 2024-11-30 + +### Added +- The `filter`, `sort key`, and `sort reverse` options for `table` to + allow the presented table to be filtered and sorted. + +### Changed +- Upgraded Python dependencies. Note that if you are using third-party + Python packages, you may encounter dependency conflicts. It is + possible that your interviews will need to be updated. +- Upgraded Font Awesome, CodeMirror, and Socket.IO. + +### Fixed +- The Share button in the Playground provided a relative URL instead + of an absolute URL. + ## [1.5.16] - 2024-10-16 ### Changed diff --git a/Dockerfile b/Dockerfile index 65f3723c2..5e74e3103 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,38 +54,38 @@ bash -c \ && cp /usr/local/bin/unoconv /usr/bin/unoconv \ && python3.10 -m venv --copies /usr/share/docassemble/local3.10 \ && source /usr/share/docassemble/local3.10/bin/activate \ -&& pip install --upgrade pip==24.2 \ -&& pip install --upgrade wheel==0.44.0 \ -&& pip install --upgrade mod_wsgi==5.0.0 \ +&& pip install --upgrade pip==24.3.1 \ +&& pip install --upgrade wheel==0.45.1 \ +&& pip install --upgrade mod_wsgi==5.0.2 \ && pip install --upgrade \ - acme==2.11.0 \ - certbot==2.11.0 \ - certbot-apache==2.11.0 \ - certbot-nginx==2.11.0 \ - certifi==2024.7.4 \ - cffi==1.17.0 \ - charset-normalizer==3.3.2 \ + acme==3.0.1 \ + certbot==3.0.1 \ + certbot-apache==3.0.1 \ + certbot-nginx==3.0.1 \ + certifi==2024.8.30 \ + cffi==1.17.1 \ + charset-normalizer==3.4.0 \ click==8.1.7 \ ConfigArgParse==1.7 \ - configobj==5.0.8 \ - cryptography==43.0.1 \ + configobj==5.0.9 \ + cryptography==44.0.0 \ distro==1.9.0 \ - idna==3.7 \ + idna==3.10 \ joblib==1.4.2 \ josepy==1.14.0 \ nltk==3.9.1 \ parsedatetime==2.6 \ pycparser==2.22 \ - pyOpenSSL==24.2.1 \ - pyparsing==3.1.2 \ - pyRFC3339==1.1 \ + pyOpenSSL==24.3.0 \ + pyparsing==3.2.0 \ + pyRFC3339==2.0.1 \ python-augeas==1.1.0 \ - pytz==2024.1 \ - regex==2024.7.24 \ + pytz==2024.2 \ + regex==2024.11.6 \ requests==2.32.3 \ six==1.16.0 \ - tqdm==4.66.5 \ - urllib3==2.2.2 \ + tqdm==4.67.1 \ + urllib3==2.2.3 \ && pip install \ /tmp/docassemble/docassemble \ /tmp/docassemble/docassemble_base \ diff --git a/docassemble/docassemble/__init__.py b/docassemble/docassemble/__init__.py deleted file mode 100644 index 0abed4427..000000000 --- a/docassemble/docassemble/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) -__version__ = "1.5.16" diff --git a/docassemble_base/docassemble/__init__.py b/docassemble_base/docassemble/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/docassemble_base/docassemble/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/docassemble_base/docassemble/base/mako/LICENSE b/docassemble_base/docassemble/base/mako/LICENSE index be84a38ef..7cf3d4337 100644 --- a/docassemble_base/docassemble/base/mako/LICENSE +++ b/docassemble_base/docassemble/base/mako/LICENSE @@ -1,4 +1,4 @@ -Copyright 2006-2022 the Mako authors and contributors . +Copyright 2006-2024 the Mako authors and contributors . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/docassemble_base/docassemble/base/mako/__init__.py b/docassemble_base/docassemble/base/mako/__init__.py index ac556816e..6521a8f87 100644 --- a/docassemble_base/docassemble/base/mako/__init__.py +++ b/docassemble_base/docassemble/base/mako/__init__.py @@ -1,11 +1,11 @@ # mako/__init__.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -__version__ = "1.2.2" +__version__ = "1.3.6" try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: diff --git a/docassemble_base/docassemble/base/mako/_ast_util.py b/docassemble_base/docassemble/base/mako/_ast_util.py index 95742835f..63b8f2286 100644 --- a/docassemble_base/docassemble/base/mako/_ast_util.py +++ b/docassemble_base/docassemble/base/mako/_ast_util.py @@ -1,5 +1,5 @@ # mako/_ast_util.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ast.py b/docassemble_base/docassemble/base/mako/ast.py index 335fc1d6d..200899bc1 100644 --- a/docassemble_base/docassemble/base/mako/ast.py +++ b/docassemble_base/docassemble/base/mako/ast.py @@ -1,5 +1,5 @@ # mako/ast.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -115,10 +115,10 @@ def __init__(self, code, **exception_kwargs): elif keyword in ["elif", "else"]: code = "if False:pass\n" + code + "pass" elif keyword == "except": + code = "try:pass\n" + code + "pass" thevar = re.sub(r'^.*(,| as)\s+([a-zA-z\_][0-9a-zA-Z\_]*):.*', r'\2', code) if thevar and thevar != code: self.names_set = set([thevar]) - code = "try:pass\n" + code + "pass" elif keyword == "with": code = code + "pass" else: diff --git a/docassemble_base/docassemble/base/mako/cache.py b/docassemble_base/docassemble/base/mako/cache.py index 4c766e117..bf645bef0 100644 --- a/docassemble_base/docassemble/base/mako/cache.py +++ b/docassemble_base/docassemble/base/mako/cache.py @@ -1,5 +1,5 @@ # mako/cache.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/cmd.py b/docassemble_base/docassemble/base/mako/cmd.py index acaea6527..54c0e19bd 100755 --- a/docassemble_base/docassemble/base/mako/cmd.py +++ b/docassemble_base/docassemble/base/mako/cmd.py @@ -1,5 +1,5 @@ # mako/cmd.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -25,7 +25,6 @@ def _exit(): def cmdline(argv=None): - parser = ArgumentParser() parser.add_argument( "--var", diff --git a/docassemble_base/docassemble/base/mako/codegen.py b/docassemble_base/docassemble/base/mako/codegen.py index b1f7ba4fd..f38b3984a 100644 --- a/docassemble_base/docassemble/base/mako/codegen.py +++ b/docassemble_base/docassemble/base/mako/codegen.py @@ -1,5 +1,5 @@ # mako/codegen.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -836,7 +836,6 @@ def visitExpression(self, node): ) or len(self.compiler.default_filters) ): - s = self.create_filter_callable( node.escapes_code.args, "%s" % node.text, True ) @@ -862,13 +861,24 @@ def visitControlLine(self, node): text = node.text self.printer.writeline(text) children = node.get_children() - # this covers the three situations where we want to insert a pass: - # 1) a ternary control line with no children, - # 2) a primary control line with nothing but its own ternary - # and end control lines, and - # 3) any control line with no content other than comments - if not children or ( - all( + + # this covers the four situations where we want to insert a pass: + # 1) a ternary control line with no children, + # 2) a primary control line with nothing but its own ternary + # and end control lines, and + # 3) any control line with no content other than comments + # 4) the first control block with no content other than comments + def _search_for_control_line(): + for c in children: + if isinstance(c, parsetree.Comment): + continue + elif isinstance(c, parsetree.ControlLine): + return True + return False + + if ( + not children + or all( isinstance(c, (parsetree.Comment, parsetree.ControlLine)) for c in children ) @@ -877,6 +887,7 @@ def visitControlLine(self, node): for c in children if isinstance(c, parsetree.ControlLine) ) + or _search_for_control_line() ): self.printer.writeline("pass") @@ -1204,7 +1215,6 @@ def visitDefTag(self, node): def visitBlockTag(self, node): if node is not self.node and not node.is_anonymous: - if isinstance(self.node, parsetree.DefTag): raise exceptions.CompileException( "Named block '%s' not allowed inside of def '%s'" @@ -1274,8 +1284,13 @@ def visitCallTag(self, node): _FOR_LOOP = re.compile( - r"^for\s+((?:\(?)\s*[A-Za-z_][A-Za-z_0-9]*" - r"(?:\s*,\s*(?:[A-Za-z_][A-Za-z0-9_]*),??)*\s*(?:\)?))\s+in\s+(.*):" + r"^for\s+((?:\(?)\s*" + r"(?:\(?)\s*[A-Za-z_][A-Za-z_0-9]*" + r"(?:\s*,\s*(?:[A-Za-z_][A-Za-z_0-9]*),??)*\s*(?:\)?)" + r"(?:\s*,\s*(?:" + r"(?:\(?)\s*[A-Za-z_][A-Za-z_0-9]*" + r"(?:\s*,\s*(?:[A-Za-z_][A-Za-z_0-9]*),??)*\s*(?:\)?)" + r"),??)*\s*(?:\)?))\s+in\s+(.*):" ) diff --git a/docassemble_base/docassemble/base/mako/compat.py b/docassemble_base/docassemble/base/mako/compat.py index 48df30d6e..183221595 100644 --- a/docassemble_base/docassemble/base/mako/compat.py +++ b/docassemble_base/docassemble/base/mako/compat.py @@ -1,17 +1,17 @@ # mako/compat.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import collections +from importlib import metadata as importlib_metadata from importlib import util import inspect import sys win32 = sys.platform.startswith("win") pypy = hasattr(sys, "pypy_version_info") -py38 = sys.version_info >= (3, 8) ArgSpec = collections.namedtuple( "ArgSpec", ["args", "varargs", "keywords", "defaults"] @@ -62,12 +62,6 @@ def exception_name(exc): return exc.__class__.__name__ -if py38: - from importlib import metadata as importlib_metadata -else: - import importlib_metadata # noqa - - def importlib_metadata_get(group): ep = importlib_metadata.entry_points() if hasattr(ep, "select"): diff --git a/docassemble_base/docassemble/base/mako/exceptions.py b/docassemble_base/docassemble/base/mako/exceptions.py index 1c1db975c..bb4e2e35b 100644 --- a/docassemble_base/docassemble/base/mako/exceptions.py +++ b/docassemble_base/docassemble/base/mako/exceptions.py @@ -1,5 +1,5 @@ # mako/exceptions.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/autohandler.py b/docassemble_base/docassemble/base/mako/ext/autohandler.py index 995cd4eb1..540d62ecc 100644 --- a/docassemble_base/docassemble/base/mako/ext/autohandler.py +++ b/docassemble_base/docassemble/base/mako/ext/autohandler.py @@ -1,5 +1,5 @@ # ext/autohandler.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/babelplugin.py b/docassemble_base/docassemble/base/mako/ext/babelplugin.py index 28b2b3e6e..88f107760 100644 --- a/docassemble_base/docassemble/base/mako/ext/babelplugin.py +++ b/docassemble_base/docassemble/base/mako/ext/babelplugin.py @@ -1,5 +1,5 @@ # ext/babelplugin.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/beaker_cache.py b/docassemble_base/docassemble/base/mako/ext/beaker_cache.py index 8fa862ed2..5fc54c1d8 100644 --- a/docassemble_base/docassemble/base/mako/ext/beaker_cache.py +++ b/docassemble_base/docassemble/base/mako/ext/beaker_cache.py @@ -1,5 +1,5 @@ # ext/beaker_cache.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/extract.py b/docassemble_base/docassemble/base/mako/ext/extract.py index bacc0460d..205dbb15e 100644 --- a/docassemble_base/docassemble/base/mako/ext/extract.py +++ b/docassemble_base/docassemble/base/mako/ext/extract.py @@ -1,5 +1,5 @@ # ext/extract.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/linguaplugin.py b/docassemble_base/docassemble/base/mako/ext/linguaplugin.py index 95335f7d0..6106676a0 100644 --- a/docassemble_base/docassemble/base/mako/ext/linguaplugin.py +++ b/docassemble_base/docassemble/base/mako/ext/linguaplugin.py @@ -1,5 +1,5 @@ # ext/linguaplugin.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/preprocessors.py b/docassemble_base/docassemble/base/mako/ext/preprocessors.py index 621f6f5cb..c4de7c3f5 100644 --- a/docassemble_base/docassemble/base/mako/ext/preprocessors.py +++ b/docassemble_base/docassemble/base/mako/ext/preprocessors.py @@ -1,5 +1,5 @@ # ext/preprocessors.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/pygmentplugin.py b/docassemble_base/docassemble/base/mako/ext/pygmentplugin.py index 9acbf4cd6..f422623de 100644 --- a/docassemble_base/docassemble/base/mako/ext/pygmentplugin.py +++ b/docassemble_base/docassemble/base/mako/ext/pygmentplugin.py @@ -1,5 +1,5 @@ # ext/pygmentplugin.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/ext/turbogears.py b/docassemble_base/docassemble/base/mako/ext/turbogears.py index 009acbf7e..81984235d 100644 --- a/docassemble_base/docassemble/base/mako/ext/turbogears.py +++ b/docassemble_base/docassemble/base/mako/ext/turbogears.py @@ -1,5 +1,5 @@ # ext/turbogears.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/filters.py b/docassemble_base/docassemble/base/mako/filters.py index af202f3f5..2a4b43862 100644 --- a/docassemble_base/docassemble/base/mako/filters.py +++ b/docassemble_base/docassemble/base/mako/filters.py @@ -1,5 +1,5 @@ # mako/filters.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/lexer.py b/docassemble_base/docassemble/base/mako/lexer.py index a92e7446e..4e9841ee1 100644 --- a/docassemble_base/docassemble/base/mako/lexer.py +++ b/docassemble_base/docassemble/base/mako/lexer.py @@ -1,5 +1,5 @@ # mako/lexer.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -247,6 +247,8 @@ def parse(self): continue if self.match_python_block(): continue + if self.match_percent(): + continue if self.match_text(): continue @@ -322,7 +324,7 @@ def match_tag_start(self): return True def match_tag_end(self): - match = self.match(r"\") + match = self.match(r"\") if match: if not len(self.tag): raise exceptions.SyntaxException( @@ -352,18 +354,28 @@ def match_end(self): else: return True + def match_percent(self): + match = self.match(r"(?<=^)(\s*)%%(%*)", re.M) + if match: + self.append_node( + parsetree.Text, match.group(1) + "%" + match.group(2) + ) + return True + else: + return False + def match_text(self): match = self.match( r""" (.*?) # anything, followed by: ( - (?<=\n)(?=[ \t]*(?=%)) # an eval or line-based - # comment preceded by a - # consumed newline and whitespace + (?<=\n)(?=[ \t]*(?=%)) # an eval or line-based + # comment, preceded by a + # consumed newline and whitespace | (?=\${) # an expression | - (?= +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -178,7 +178,6 @@ def __init__( lexer_cls=None, include_error_handler=None, ): - self.directories = [ posixpath.normpath(d) for d in util.to_list(directories, ()) ] diff --git a/docassemble_base/docassemble/base/mako/parsetree.py b/docassemble_base/docassemble/base/mako/parsetree.py index 1a904c2c6..99b8648cd 100644 --- a/docassemble_base/docassemble/base/mako/parsetree.py +++ b/docassemble_base/docassemble/base/mako/parsetree.py @@ -1,5 +1,5 @@ # mako/parsetree.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/pygen.py b/docassemble_base/docassemble/base/mako/pygen.py index 7921821e4..1ccf4cda2 100644 --- a/docassemble_base/docassemble/base/mako/pygen.py +++ b/docassemble_base/docassemble/base/mako/pygen.py @@ -1,5 +1,5 @@ # mako/pygen.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/docassemble/base/mako/pyparser.py b/docassemble_base/docassemble/base/mako/pyparser.py index 4549768f9..c0deb2ad9 100644 --- a/docassemble_base/docassemble/base/mako/pyparser.py +++ b/docassemble_base/docassemble/base/mako/pyparser.py @@ -1,5 +1,5 @@ # mako/pyparser.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -64,7 +64,6 @@ def visit_ClassDef(self, node): self._add_declared(node.name) def visit_Assign(self, node): - # flip around the visiting of Assign so the expression gets # evaluated first, in the case of a clause like "x=x+5" (x # is undeclared) @@ -91,6 +90,22 @@ def visit_FunctionDef(self, node): self._add_declared(node.name) self._visit_function(node, False) + def visit_ListComp(self, node): + if self.in_function: + for comp in node.generators: + self.visit(comp.iter) + else: + self.generic_visit(node) + + visit_SetComp = visit_GeneratorExp = visit_ListComp + + def visit_DictComp(self, node): + if self.in_function: + for comp in node.generators: + self.visit(comp.iter) + else: + self.generic_visit(node) + def _expand_tuples(self, args): for arg in args: if isinstance(arg, _ast.Tuple): @@ -99,7 +114,6 @@ def _expand_tuples(self, args): yield arg def _visit_function(self, node, islambda): - # push function state onto stack. dont log any more # identifiers as "declared" until outside of the function, # but keep logging identifiers as "undeclared". track @@ -122,7 +136,6 @@ def _visit_function(self, node, islambda): self.local_ident_stack = local_ident_stack def visit_For(self, node): - # flip around visit self.visit(node.iter) diff --git a/docassemble_base/docassemble/base/mako/runtime.py b/docassemble_base/docassemble/base/mako/runtime.py index 0f5226690..cef8bf036 100644 --- a/docassemble_base/docassemble/base/mako/runtime.py +++ b/docassemble_base/docassemble/base/mako/runtime.py @@ -530,7 +530,7 @@ def include_file(self, uri, **kwargs): def _populate(self, d, l): for ident in l: if ident == "*": - for (k, v) in self._get_star(): + for k, v in self._get_star(): d[k] = v else: d[ident] = getattr(self, ident) diff --git a/docassemble_base/docassemble/base/mako/template.py b/docassemble_base/docassemble/base/mako/template.py index ff087a949..cc5a64132 100644 --- a/docassemble_base/docassemble/base/mako/template.py +++ b/docassemble_base/docassemble/base/mako/template.py @@ -1,5 +1,5 @@ # mako/template.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -26,7 +26,6 @@ class Template: - r"""Represents a compiled template. :class:`.Template` includes a reference to the original diff --git a/docassemble_base/docassemble/base/mako/util.py b/docassemble_base/docassemble/base/mako/util.py index fa8bc3306..f9ee2416d 100644 --- a/docassemble_base/docassemble/base/mako/util.py +++ b/docassemble_base/docassemble/base/mako/util.py @@ -1,5 +1,5 @@ # mako/util.py -# Copyright 2006-2022 the Mako authors and contributors +# Copyright 2006-2024 the Mako authors and contributors # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php diff --git a/docassemble_base/setup.py b/docassemble_base/setup.py index 94cce568e..77e2443d5 100644 --- a/docassemble_base/setup.py +++ b/docassemble_base/setup.py @@ -2,7 +2,7 @@ import sys from fnmatch import fnmatchcase from distutils.util import convert_path -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages def read(fname): @@ -49,46 +49,46 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d install_requires = [ 'docassemble==1.5.16', "3to2==1.1.1", - "aiohappyeyeballs==2.3.5", - "aiohttp==3.10.11", + "aiohappyeyeballs==2.4.3", + "aiohttp==3.11.8", "aiohttp-retry==2.8.3", "aiosignal==1.3.1", - "alembic==1.13.2", - "anyio==4.4.0", + "alembic==1.14.0", + "anyio==4.6.2.post1", "astunparse==1.6.3", - "async-timeout==4.0.3", + "async-timeout==5.0.1", "atomicwrites==1.4.1", "attrs==24.2.0", "azure-common==1.1.28", - "azure-core==1.30.2", - "azure-identity==1.17.1", - "azure-keyvault-secrets==4.8.0", + "azure-core==1.32.0", + "azure-identity==1.19.0", + "azure-keyvault-secrets==4.9.0", "azure-nspkg==3.0.2", - "azure-storage-blob==12.22.0", + "azure-storage-blob==12.24.0", "babel==2.16.0", "backports.tarfile==1.2.0", - "bcrypt==4.2.0", + "bcrypt==4.2.1", "beautifulsoup4==4.12.3", - "bleach==6.1.0", - "blinker==1.8.2", + "bleach==6.2.0", + "blinker==1.9.0", "boto==2.49.0", - "boto3==1.34.158", - "botocore==1.34.158", - "cachetools==5.4.0", + "boto3==1.35.71", + "botocore==1.35.71", + "cachetools==5.5.0", "cairocffi==1.7.1", "CairoSVG==2.7.1", - "certifi==2024.7.4", - "cffi==1.17.0", + "certifi==2024.8.30", + "cffi==1.17.1", "chardet==5.2.0", - "charset-normalizer==3.3.2", + "charset-normalizer==3.4.0", "click==8.1.7", "colorama==0.4.6", "commonmark==0.9.1", - "convertapi==1.8.0", - "cryptography==43.0.1", + "convertapi==2.0.0", + "cryptography==44.0.0", "cssselect2==0.7.0", "defusedxml==0.7.1", - "Deprecated==1.2.14", + "Deprecated==1.2.15", "deprecation==2.1.0", "docassemble-backports==1.0", "Docassemble-Pattern==3.6.7", @@ -97,149 +97,151 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d "docutils==0.21.2", "docxcompose==1.4.0", "docxtpl==0.19.0", - "et-xmlfile==1.1.0", + "et_xmlfile==2.0.0", "exceptiongroup==1.2.2", - "Flask==3.0.3", + "Flask==3.1.0", "Flask-Mail==0.10.0", - "frozenlist==1.4.1", + "frozenlist==1.5.0", "future==1.0.0", "geographiclib==2.0", "geopy==2.4.1", - "google-api-core==2.19.1", - "google-api-python-client==2.140.0", + "google-api-core==2.23.0", + "google-api-python-client==2.154.0", "google-auth==2.17.0", "google-auth-httplib2==0.2.0", "google-auth-oauthlib==1.2.1", "google-cloud-core==2.4.1", "google-cloud-storage==2.11.0", - "google-cloud-vision==3.7.4", - "google-crc32c==1.5.0", - "google-i18n-address==3.1.0", + "google-cloud-vision==3.8.1", + "google-crc32c==1.6.0", + "google-i18n-address==3.1.1", "google-resumable-media==2.7.2", - "googleapis-common-protos==1.63.2", - "greenlet==3.0.3", - "grpcio==1.65.4", - "grpcio-status==1.65.4", + "googleapis-common-protos==1.66.0", + "greenlet==3.1.1", + "grpcio==1.68.0", + "grpcio-status==1.68.0", "guess-language-spirit==0.5.3", "httplib2==0.22.0", "Hyphenate==1.1.0", - "idna==3.7", + "idna==3.10", "img2pdf==0.5.1", - "importlib_metadata==8.2.0", - "importlib_resources==6.4.0", + "importlib_metadata==8.5.0", + "importlib_resources==6.4.5", "iniconfig==2.0.0", - "isodate==0.6.1", + "isodate==0.7.2", "itsdangerous==2.2.0", "jaraco.classes==3.4.0", - "jaraco.context==5.3.0", - "jaraco.functools==4.0.2", + "jaraco.context==6.0.1", + "jaraco.functools==4.1.0", "jdcal==1.4.1", "jeepney==0.8.0", "jellyfish==1.1.0", "Jinja2==3.1.4", "jmespath==1.0.1", "joblib==1.4.2", - "keyring==25.3.0", + "keyring==25.5.0", "lxml==5.3.0", - "Mako==1.3.5", - "Markdown==3.6", + "Mako==1.3.6", + "Markdown==3.7", "markdown-it-py==3.0.0", - "MarkupSafe==2.1.5", + "MarkupSafe==3.0.2", "mdurl==0.1.2", - "more-itertools==10.4.0", - "msal==1.30.0", + "more-itertools==10.5.0", + "msal==1.31.1", "msal-extensions==1.2.0", "msrest==0.7.1", - "multidict==6.0.5", + "multidict==6.1.0", "namedentities==1.9.4", - "nh3==0.2.18", + "nh3==0.2.19", "nltk==3.9.1", "num2words==0.5.13", - "numpy==2.0.1", + "numpy==2.1.3", "oauth2client==4.1.3", "oauthlib==3.2.2", "openpyxl==3.1.5", "ordered-set==4.1.0", - "packaging==24.1", - "pandas==2.2.2", + "packaging==24.2", + "pandas==2.2.3", "passlib==1.7.4", "pdfminer.six==20240706", - "phonenumbers==8.13.43", - "pikepdf==9.2.1", - "pillow==10.4.0", - "pkginfo==1.10.0", + "phonenumbers==8.13.50", + "pikepdf==9.4.2", + "pillow==11.0.0", + "pkginfo==1.11.2", "pluggy==1.5.0", "ply==3.11", "portalocker==2.10.1", - "proto-plus==1.24.0", - "protobuf==5.27.3", - "pyasn1==0.6.0", - "pyasn1_modules==0.4.0", + "propcache==0.2.0", + "proto-plus==1.25.0", + "protobuf==5.29.0", + "pyasn1==0.6.1", + "pyasn1_modules==0.4.1", "pycountry==24.6.1", "pycparser==2.22", - "pycryptodome==3.20.0", - "pycryptodomex==3.20.0", + "pycryptodome==3.21.0", + "pycryptodomex==3.21.0", "Pygments==2.18.0", - "PyJWT==2.9.0", + "PyJWT==2.10.1", "PyLaTeX==1.4.2", - "pyparsing==3.1.2", + "pyparsing==3.2.0", "pypng==0.20220715.0", - "pytest==8.3.2", + "pytest==8.3.3", "python-dateutil==2.9.0.post0", "python-docx==1.1.2", "python-editor==1.0.4", - "pytz==2024.1", + "pytz==2024.2", "pytz-deprecation-shim==0.1.0.post0", "PyYAML==6.0.2", "pyzbar==0.1.9", - "qrcode==7.4.2", + "qrcode==8.0", "readme_renderer==44.0", - "regex==2024.7.24", - "reportlab==4.2.2", + "regex==2024.11.6", + "reportlab==4.2.5", "repoze.lru==0.7", "requests==2.32.3", "requests-oauthlib==2.0.0", "requests-toolbelt==1.0.0", "rfc3986==2.0.0", - "rich==13.7.1", + "rich==13.9.4", "rsa==4.7.2", "ruamel.yaml==0.18.6", "ruamel.yaml.bytes==0.1.0", - "ruamel.yaml.clib==0.2.8", + "ruamel.yaml.clib==0.2.12", "ruamel.yaml.string==0.1.1", - "s3transfer==0.10.2", - "scipy==1.14.0", + "s3transfer==0.10.4", + "scipy==1.14.1", "SecretStorage==3.3.3", "six==1.16.0", "sniffio==1.3.1", "sortedcontainers==2.4.0", - "soupsieve==2.5", - "SQLAlchemy==2.0.32", - "tinycss2==1.3.0", + "soupsieve==2.6", + "SQLAlchemy==2.0.36", + "tinycss2==1.4.0", "titlecase==2.4.1", "toml==0.10.2", - "tomli==2.0.1", - "tqdm==4.66.5", - "twilio==9.2.3", - "twine==5.1.1", + "tomli==2.2.1", + "tqdm==4.67.1", + "twilio==9.3.7", + "twine==6.0.0", "typing_extensions==4.12.2", - "tzdata==2024.1", + "tzdata==2024.2", "tzlocal==5.2", - "ua-parser==0.18.0", + "ua-parser==1.0.0", + "ua-parser-builtins==0.18.0", "uritemplate==4.1.1", - "urllib3==2.2.2", + "urllib3==2.2.3", "us==3.2.0", "user-agents==2.2.0", "wcwidth==0.2.13", "webencodings==0.5.1", - "Werkzeug==3.0.6", - "wrapt==1.16.0", + "Werkzeug==3.1.3", + "wrapt==1.17.0", "xfdfgen==0.4", "xlrd==2.0.1", "XlsxWriter==3.2.0", "xlwt==1.3.0", - "yarl==1.9.4", - "zipp==3.20.0" + "yarl==1.18.0", + "zipp==3.21.0" ] setup(name='docassemble.base', @@ -252,9 +254,8 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d author_email='jhpyle@gmail.com', license='MIT', url='https://docassemble.org', - namespace_packages=['docassemble'], install_requires=install_requires, - packages=find_packages(), + packages=find_namespace_packages(), zip_safe=False, package_data=find_package_data(where=os.path.join('docassemble', 'base', ''), package='docassemble.base'), ) diff --git a/docassemble_demo/docassemble/__init__.py b/docassemble_demo/docassemble/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/docassemble_demo/docassemble/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/docassemble_demo/setup.py b/docassemble_demo/setup.py index ff8220698..a9483f791 100644 --- a/docassemble_demo/setup.py +++ b/docassemble_demo/setup.py @@ -1,7 +1,7 @@ import os from fnmatch import fnmatchcase from distutils.util import convert_path -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages def read(fname): @@ -55,14 +55,13 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d author_email='jhpyle@gmail.com', license='MIT', url='https://docassemble.org', - packages=find_packages(), - namespace_packages=['docassemble'], + packages=find_namespace_packages(), install_requires=[ 'docassemble==1.5.16', 'docassemble.base==1.5.16', "googledrivedownloader==0.4", "ics==0.7.2", - "matplotlib==3.9.1.post1" + "matplotlib==3.9.3" ], zip_safe=False, package_data=find_package_data(where=os.path.join('docassemble', 'demo', ''), package='docassemble.demo') diff --git a/docassemble_webapp/docassemble/__init__.py b/docassemble_webapp/docassemble/__init__.py deleted file mode 100644 index de40ea7ca..000000000 --- a/docassemble_webapp/docassemble/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/docassemble_webapp/docassemble/webapp/files.py b/docassemble_webapp/docassemble/webapp/files.py index aa04bfae1..61208e1d4 100644 --- a/docassemble_webapp/docassemble/webapp/files.py +++ b/docassemble_webapp/docassemble/webapp/files.py @@ -530,7 +530,7 @@ def publish_package(pkgname, info, author_info, current_project='default'): packagedir = os.path.join(directory, 'docassemble-' + str(pkgname)) output = "Publishing docassemble." + pkgname + " to PyPI . . .\n\n" try: - output += subprocess.check_output(['python', 'setup.py', 'sdist'], cwd=packagedir, stderr=subprocess.STDOUT).decode() + output += subprocess.check_output(['python', '-m', 'build', '.', '--sdist'], cwd=packagedir, stderr=subprocess.STDOUT).decode() except subprocess.CalledProcessError as err: output += err.output.decode() dist_dir = os.path.join(packagedir, 'dist') @@ -603,10 +603,6 @@ def make_package_dir(pkgname, info, author_info, directory=None, current_project for sec in ['playground', 'playgroundtemplate', 'playgroundstatic', 'playgroundsources', 'playgroundmodules']: area[sec] = SavedFile(author_info['id'], fix=True, section=sec) dependencies = ", ".join(map(lambda x: repr(x + get_version_suffix(x)), sorted(info['dependencies']))) - initpy = """\ -__import__('pkg_resources').declare_namespace(__name__) - -""" licensetext = str(info['license']) if re.search(r'MIT License', licensetext): licensetext += '\n\nCopyright (c) ' + str(datetime.datetime.now().year) + ' ' + str(info.get('author_name', '')) + """ @@ -650,7 +646,7 @@ def make_package_dir(pkgname, info, author_info, directory=None, current_project setuppy = """\ import os import sys -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from fnmatch import fnmatchcase from distutils.util import convert_path @@ -703,8 +699,7 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d author_email=""" + repr(info.get('author_email', '')) + """, license=""" + repr(info.get('license', '')) + """, url=""" + repr(info['url'] if info['url'] else 'https://docassemble.org') + """, - packages=find_packages(), - namespace_packages=['docassemble'], + packages=find_namespace_packages(), install_requires=[""" + dependencies + """], zip_safe=False, package_data=find_package_data(where='docassemble/""" + str(pkgname) + """/', package='docassemble.""" + str(pkgname) + """'), @@ -799,9 +794,6 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d with open(os.path.join(packagedir, 'MANIFEST.in'), 'w', encoding='utf-8') as the_file: the_file.write(manifestin) os.utime(os.path.join(packagedir, 'MANIFEST.in'), (info['modtime'], info['modtime'])) - with open(os.path.join(packagedir, 'docassemble', '__init__.py'), 'w', encoding='utf-8') as the_file: - the_file.write(initpy) - os.utime(os.path.join(packagedir, 'docassemble', '__init__.py'), (info['modtime'], info['modtime'])) with open(os.path.join(packagedir, 'docassemble', pkgname, '__init__.py'), 'w', encoding='utf-8') as the_file: the_file.write("__version__ = " + repr(info.get('version', '')) + "\n") os.utime(os.path.join(packagedir, 'docassemble', pkgname, '__init__.py'), (info['modtime'], info['modtime'])) diff --git a/docassemble_webapp/docassemble/webapp/info.py b/docassemble_webapp/docassemble/webapp/info.py index bc62ba2e2..b6ed39df6 100644 --- a/docassemble_webapp/docassemble/webapp/info.py +++ b/docassemble_webapp/docassemble/webapp/info.py @@ -41,6 +41,7 @@ "boto", "boto3", "botocore", + "build", "cachetools", "cairocffi", "CairoSVG", @@ -83,6 +84,7 @@ "email-validator", "email_validator", "et-xmlfile", + "et_xmlfile", "eventlet", "exceptiongroup", "Flask", @@ -178,6 +180,7 @@ "pandas", "parse", "parse-type", + "parse_type", "parsedatetime", "passlib", "pdfminer.six", @@ -211,6 +214,7 @@ "pyotp", "pyparsing", "pypng", + "pyproject_hooks", "pyRFC3339", "PySocks", "pytest", diff --git a/docassemble_webapp/docassemble/webapp/server.py b/docassemble_webapp/docassemble/webapp/server.py index 8d8fef01d..49095759a 100644 --- a/docassemble_webapp/docassemble/webapp/server.py +++ b/docassemble_webapp/docassemble/webapp/server.py @@ -606,9 +606,9 @@ def update_editable(): # PLAYGROUND_MODULES_DIRECTORY = daconfig.get('playground_modules', ) -init_py_file = """ -__import__('pkg_resources').declare_namespace(__name__) -""" +# init_py_file = """ +# __import__('pkg_resources').declare_namespace(__name__) +# """ # if not os.path.isfile(os.path.join(PLAYGROUND_MODULES_DIRECTORY, 'docassemble', '__init__.py')): # with open(os.path.join(PLAYGROUND_MODULES_DIRECTORY, 'docassemble', '__init__.py'), 'a') as the_file: @@ -2234,8 +2234,8 @@ def copy_playground_modules(): for f in [f for f in os.listdir(mod_directory) if re.search(r'^[A-Za-z].*\.py$', f)]: shutil.copyfile(os.path.join(mod_directory, f), os.path.join(local_dir, f)) # shutil.copytree(mod_dir.directory, local_dir) - with open(os.path.join(local_dir, '__init__.py'), 'w', encoding='utf-8') as the_file: - the_file.write(init_py_file) + # with open(os.path.join(local_dir, '__init__.py'), 'w', encoding='utf-8') as the_file: + # the_file.write(init_py_file) def proc_example_list(example_list, package, directory, examples): @@ -17946,10 +17946,6 @@ def create_package(): form = CreatePackageForm(request.form) if request.method == 'POST' and form.validate(): pkgname = re.sub(r'^docassemble-', r'', form.name.data) - initpy = """\ -__import__('pkg_resources').declare_namespace(__name__) - -""" licensetext = """\ The MIT License (MIT) @@ -17986,7 +17982,7 @@ def create_package(): setuppy = """\ import os import sys -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from fnmatch import fnmatchcase from distutils2.util import convert_path @@ -18038,8 +18034,7 @@ def find_package_data(where='.', package='', exclude=standard_exclude, exclude_d author_email=""" + repr(str(current_user.email)) + """, license='MIT', url='https://docassemble.org', - packages=find_packages(), - namespace_packages = ['docassemble'], + packages=find_namespace_packages(), zip_safe = False, package_data=find_package_data(where=os.path.join('docassemble', '""" + str(pkgname) + """', ''), package='docassemble.""" + str(pkgname) + """'), ) @@ -18147,8 +18142,6 @@ def eat(self): the_file.write(setupcfg) with open(os.path.join(packagedir, 'MANIFEST.in'), 'w', encoding='utf-8') as the_file: the_file.write(manifestin) - with open(os.path.join(packagedir, 'docassemble', '__init__.py'), 'w', encoding='utf-8') as the_file: - the_file.write(initpy) with open(os.path.join(packagedir, 'docassemble', pkgname, '__init__.py'), 'w', encoding='utf-8') as the_file: the_file.write('__version__ = "0.0.1"') with open(os.path.join(packagedir, 'docassemble', pkgname, 'objects.py'), 'w', encoding='utf-8') as the_file: diff --git a/docassemble_webapp/docassemble/webapp/static/app/bundle.js b/docassemble_webapp/docassemble/webapp/static/app/bundle.js index 1ab3943c3..1ef205b67 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/bundle.js +++ b/docassemble_webapp/docassemble/webapp/static/app/bundle.js @@ -348,10 +348,10 @@ $.bridget(NAMESPACE_ALTERNATE,Slider);$(function(){$("input[data-provide=slider] if(typeof $=="undefined")var daCtx,daColor,daTheWidth,daAspectRatio,daTheBorders,daIsEmpty,daAutocomplete,$=jQuery.noConflict();daColor="#000";function daInitializeSignature(e){daColor=e,daAspectRatio=.4,daTheBorders=30,daIsEmpty=1,setTimeout(function(){isCanvasSupported()||daPost({da_success:0,da_ajax:1}),daNewCanvas(),$(document).on("touchmove",function(e){window.matchMedia("(max-width: 575px)").matches&&e.preventDefault()})},500),$(window).on("resize",function(){daResizeCanvas()}),$(window).on("orientationchange",function(){daResizeCanvas()}),$(".dasigclear").click(function(e){return e.preventDefault(),daNewCanvas(),!1}),$(".dasigsave").click(function(e){return e.preventDefault(),daIsEmpty&&document.getElementById("da_sig_required").value=="1"?($("#daerrormess").removeClass("dasignotshowing"),setTimeout(function(){$("#daerrormess").addClass("dasignotshowing")},3e3)):($(".dasigclear").attr("disabled",!0),$(".dasigsave").attr("disabled",!0),daSaveCanvas()),!1})}function daResizeCanvas(){setTimeout(function(){daNewCanvas()},200)}function daSaveCanvas(){var e=document.getElementById("dasigcanvas").toDataURL();daSpinnerTimeout=setTimeout(daShowSpinner,1e3),daPost({da_success:1,da_the_image:e,da_ajax:1})}function daNewCanvas(){var e,n,o,t=$(window).width()-daTheBorders,s=$("#dasigpage").outerWidth(!0);t>s&&(t=s),e=t*daAspectRatio,n=$("#dasigheader").outerHeight(!0)+$("#dasigtoppart").outerHeight(!0)+$("#dasigmidpart").outerHeight(!0)+$("#dasigbottompart").outerHeight(!0),e>$(window).height()-n&&(e=$(window).height()-n),(e>275||e<30)&&(e=275),$("#dasigcontent").height(e),o='',$("#dasigcontent").html(o),daTheWidth=daThicknessScalingFactor*t/100,daTheWidth<1&&(daTheWidth=1),$("#dasigcanvas").each(function(){daCtx=$(this)[0].getContext("2d"),daCtx.strokeStyle=daColor,daCtx.fillStyle=daColor,daCtx.lineWidth=daTheWidth}),$("#dasigcanvas").drawTouch(),$("#dasigcanvas").drawPointer(),$("#dasigcanvas").drawMouse(),daIsEmpty=1,setTimeout(function(){daJsEmbed?($(daTargetDiv)[0].scrollTo(0,1),daSteps>1&&$(daTargetDiv)[0].scrollIntoView()):window.scrollTo(0,1)},10)}$.fn.drawTouch=function(){var n=function(e){e=e.originalEvent,x=e.changedTouches[0].pageX-$("#dasigcanvas").offset().left,y=e.changedTouches[0].pageY-$("#dasigcanvas").offset().top,daCtx.beginPath(),daCtx.arc(x,y,.5*daTheWidth,0,2*Math.PI),daCtx.fill(),daCtx.beginPath(),daCtx.lineJoin="round",daCtx.moveTo(x,y),daIsEmpty&&($(".dasigsave").prop("disabled",!1),daIsEmpty=0)},e=function(e){e.preventDefault(),e=e.originalEvent,x=e.changedTouches[0].pageX-$("#dasigcanvas").offset().left,y=e.changedTouches[0].pageY-$("#dasigcanvas").offset().top,daCtx.lineTo(x,y),daCtx.stroke(),daIsEmpty&&(daIsEmpty=0)},t=function(t){e(t)},s=function(e){e.preventDefault(),e=e.originalEvent,daCtx.lineJoin="round",x=e.pageX-$("#dasigcanvas").offset().left,y=e.pageY-$("#dasigcanvas").offset().top,daCtx.beginPath(),daCtx.arc(x,y,.5*daTheWidth,0,2*Math.PI),daCtx.fill(),daCtx.moveTo(x,y),daIsEmpty&&(daIsEmpty=0)};$(this).on("click",s),$(this).on("touchend",t),$(this).on("touchcancel",t),$(this).on("touchstart",n),$(this).on("touchmove",e)},$.fn.drawPointer=function(){var t=function(e){e=e.originalEvent,daCtx.beginPath(),daCtx.lineJoin="round",x=e.pageX-$("#dasigcanvas").offset().left,y=e.pageY-$("#dasigcanvas").offset().top,daCtx.moveTo(x,y),daIsEmpty&&(daIsEmpty=0)},e=function(e){e.preventDefault(),e=e.originalEvent,x=e.pageX-$("#dasigcanvas").offset().left,y=e.pageY-$("#dasigcanvas").offset().top,daCtx.lineTo(x,y),daCtx.stroke(),daCtx.beginPath(),daCtx.arc(x,y,.5*daTheWidth,0,2*Math.PI),daCtx.fill(),daCtx.beginPath(),daCtx.moveTo(x,y),daIsEmpty&&(daIsEmpty=0)},n=function(t){e(t)};$(this).on("MSPointerDown",t),$(this).on("MSPointerMove",e),$(this).on("MSPointerUp",n)},$.fn.drawMouse=function(){var e=0,n=function(t){e=1,x=t.pageX-$("#dasigcanvas").offset().left,y=t.pageY-$("#dasigcanvas").offset().top,daCtx.beginPath(),daCtx.arc(x,y,.5*daTheWidth,0,2*Math.PI),daCtx.fill(),daCtx.beginPath(),daCtx.lineJoin="round",daCtx.moveTo(x,y),daIsEmpty&&(daIsEmpty=0)},t=function(t){e&&(x=t.pageX-$("#dasigcanvas").offset().left,y=t.pageY-$("#dasigcanvas").offset().top,daCtx.lineTo(x,y),daCtx.stroke(),daCtx.beginPath(),daCtx.arc(x,y,.5*daTheWidth,0,2*Math.PI),daCtx.fill(),daCtx.beginPath(),daCtx.moveTo(x,y),daIsEmpty&&(daIsEmpty=0))},s=function(n){return t(n),e=0,!0};$(this).on("mousedown",n),$(this).on("mousemove",t),$(window).on("mouseup",s)};function daPost(e){for(t in e)if(e.hasOwnProperty(t)){var t,n=document.getElementById(t);if(n!=null)n.setAttribute("value",e[t]);else{console.log("Key does not exist: "+t);return}}$("#dasigform").submit()}function isCanvasSupported(){var e=document.createElement("canvas");return!!(e.getContext&&e.getContext("2d"))}daAutocomplete=Object();function daInitAutocomplete(e){var t=0;try{google}catch{t=1e3}setTimeout(function(){for(var t,s,n=0;n1&&maps[t].map.fitBounds(s)}},t)}function daAddMap(e,t,n){var s=new google.maps.Map(document.getElementById("map"+e),{zoom:11,center:new google.maps.LatLng(t,n),mapTypeId:google.maps.MapTypeId.ROADMAP}),o=new google.maps.InfoWindow;return{map:s,infowindow:o}}function daAddMarker(e,t,n){var s;return t.icon?t.icon.path&&(t.icon.path=google.maps.SymbolPath[t.icon.path]):t.icon=null,s=new google.maps.Marker({position:new google.maps.LatLng(t.latitude,t.longitude),map:e.map,icon:t.icon}),t.info&&google.maps.event.addListener(s,"click",function(t,n){return function(){e.infowindow.setContent(n),e.infowindow.open(e.map,t)}}(s,t.info)),n&&(e.infowindow.setContent(t.info),e.infowindow.open(e.map,s)),s}function daFillInAddress(e){daVarLookupRev[e]?m=daVarLookupRev[e]:m=e;var n,s,o,i,a,r,l,d,u,h,m,f=atob(m).replace(/.[a-zA-Z0-9_]+$/,""),f=f.replace(/[[\]]/g,"."),v=new RegExp("^"+f+"\\.(.*)"),p={locality:"long_name",sublocality:"long_name",administrative_area_level_3:"long_name",administrative_area_level_2:"long_name",administrative_area_level_1:"short_name",country:"short_name",postal_code:"short_name"},c={locality:"city",administrative_area_level_2:"county",administrative_area_level_1:"state",country:"country",postal_code:"zip"},g=["address","city","county","state","zip","neighborhood","sublocality","administrative_area_level_3","postal_code"],t={};$("input, select").each(function(){var e,n,s=$(this).attr("id");if(typeof s!==typeof void 0&&s!==!1)try{e=atob($(this).attr("id")),e.indexOf("_field_")==0&&(e=atob(daVarLookupRev[$(this).attr("id")])),n=v.exec(e),n.length>0&&(t[n[1]]=$(this).attr("id"))}catch{}}),n=daAutocomplete[e].getPlace(),typeof t.address!="undefined"&&document.getElementById(t.address)!=null&&(document.getElementById(t.address).value="");for(d in g)typeof t[d]!="undefined"&&document.getElementById(t[d])!=null&&(document.getElementById(t[d]).value="");for(o={},r=[],i=0;i'),s=this.$label.text(),n=t.find('input[type="text"]'),n.attr("placeholder",s),n.detach(),this.$label.detach(),this.$float.append(n,this.$label),this.$float.insertBefore(t.find("div.input-group-append"))):this.$float=null,t},template:function(){return this.options.bsVersion=="2"?'
':'
'},disable:function(){console.log("disable"),this.$element.prop("disabled",!0),this.$button.attr("disabled",!0),this.$target.prop("disabled",!0),this.$source.prop("disabled",!0),this.disabled=!0,this.$container.addClass("combobox-disabled")},enable:function(){console.log("enable"),this.$element.prop("disabled",!1),this.$button.attr("disabled",!1),this.$target.prop("disabled",!1),this.$source.prop("disabled",!1),this.disabled=!1,this.$container.removeClass("combobox-disabled")},parse:function(){var n,o,i,l=this,a={},r={},c=[],t=!1,s="";return this.$source.find("option").each(function(){var n=e(this);if(n.val()===""){l.options.placeholder=n.text();return}a[n.text()]=n.val(),r[n.val()]=n.text(),c.push(n.text()),n.prop("selected")&&(t=n.text(),s=n.val())}),this.map=a,this.revMap=r,t?(o=!1,i=!1,n=this.$element.val(),n!==t&&(this.$element.val(t),o=!0),n=this.$target.val(),n!==s&&(this.$target.val(s),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,i&&this.$target.trigger("change"),o&&this.$element.trigger("change")):(this.$container.removeClass("combobox-selected"),this.selected=!1),c},transferAttributes:function(){if(this.options.placeholder=this.$source.attr("data-placeholder")||this.options.placeholder,this.options.appendId!=="undefined"&&(this.$element.attr("id",this.$source.attr("id")),this.$source.attr("id",this.$source.attr("id")+this.options.appendId),daComboBoxes[this.$element.attr("id")]=this),this.$menu.attr("id",this.$element.attr("id")+"menu"),this.$element.attr("aria-controls",this.$menu.attr("id")),this.$element.attr("aria-owns",this.$menu.attr("id")),this.$button.attr("aria-controls",this.$menu.attr("id")),this.$button.attr("aria-label",this.$source.attr("aria-label")),this.$source.attr("aria-labelledby")?this.$element.attr("aria-labelledby",this.$source.attr("aria-labelledby")):this.$source.attr("aria-labelledby","daMainQuestion"),this.$button.attr("aria-labelledby",this.$source.attr("aria-labelledby")),this.$button.attr("aria-describedby",this.$source.attr("aria-describedby")),this.$element.attr("placeholder",this.options.placeholder),this.$target.prop("name",this.$source.prop("name")),this.$target.val(this.$source.val()),this.$source.removeAttr("name"),this.$element.attr("required",this.$source.attr("required")),this.$element.attr("rel",this.$source.attr("rel")),this.$element.attr("title",this.$source.attr("title")),this.$element.attr("class",this.$source.attr("class")),this.$element.attr("tabindex",this.$source.attr("tabindex")),this.$source.removeAttr("tabindex"),!this.$target.val()&&this.$source.data("default")){var e=this.$source.data("default");this.$element.val(e),this.$target.val(e)}this.$source.attr("disabled")!==void 0&&this.disable()},select:function(){var e,n,t=this.$menu.find(".active").attr("data-value"),s=!1,o=!1,i=!1;this.$container.parent().find(".da-has-error").remove(),e=this.$element.val(),n=this.updater(t),e!==n&&(this.$element.val(n),s=!0),e=this.$target.val(),e!==this.map[t]&&(this.$target.val(this.map[t]),o=!0),e=this.$source.val(),e!==this.map[t]&&(this.$source.val(this.map[t]),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,this.hide(),o&&this.$target.trigger("change"),s&&this.$element.trigger("change"),i&&this.$source.trigger("change")},manualSelect:function(e){var t,n=!1,s=!1,o=!1;this.$container.parent().find(".da-has-error").remove(),e!==""&&this.revMap[e]!==void 0?(this.$element.val(this.revMap[e]),n=!0):this.$element.val(e),t=this.$target.val(),t!==e&&(this.$target.val(e),o=!0),t=this.$source.val(),t!==e&&(this.$source.val(e),s=!0),e!==""&&n&&(this.$container.addClass("combobox-selected"),this.selected=!0),o&&this.$target.trigger("change"),this.$element.trigger("change"),s&&this.$source.trigger("change")},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.hidden=!1,this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.hidden=!0,this.$element.on("blur",e.proxy(this.blur,this)),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.shown=!1,this},lookup:function(){this.query=this.$element.val(),this.process(this.source)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],s=[],o=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?s.push(t):o.push(t):n.push(t);return n.concat(s,o)},highlighter:function(e){var t=this.query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");return t?e.replace(new RegExp("("+t+")","ig"),function(e,t){return""+t+""}):e},render:function(t){var n=this;return t=e(t).map(function(t,s){return t=e(n.options.item).attr("data-value",s).attr("aria-label",s),t.attr("id",n.$element.attr("id")+"-option-"+s),t.html(n.highlighter(s)),t[0]}),this.setActive(t.first()),this.$menu.html(t),this},setActive:function(e){e.addClass("active").attr("aria-selected",!0),this.$element.attr("aria-activedescendant",e.attr("id"))},swapActive:function(e,t){e.removeClass("active").attr("aria-selected",!1),this.setActive(t)},next:function(){var s=this.$menu.find('[aria-selected="true"]'),n=s.next();n.length||(n=e(this.$menu.find("li")[0])),this.swapActive(s,n)},prev:function(){var n=this.$menu.find('[aria-selected="true"]'),t=n.prev();t.length||(t=this.$menu.find("li").last()),this.swapActive(n,t)},toggle:function(e){return this.disabled||(this.$container.hasClass("combobox-selected")?(this.clearAll(),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1)):this.shown?(this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.hide()):(this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.clearElement(),this.lookup())),e&&(e.preventDefault(),e.stopPropagation()),!1},clearAll:function(){var t=!1,n=!1,s=!1,e=this.$element.val();e!==""&&(this.$element.val(""),t=!0),e=this.$source.val(),e!==""&&(this.$source.val(""),n=!0),e=this.$target.val(),e!==""&&(this.$target.val(""),s=!0),this.$container.removeClass("combobox-selected"),s&&this.$target.trigger("change"),t&&this.$element.trigger("change"),n&&this.$source.trigger("change")},clearElement:function(){this.$element.val("").focus()},clearTarget:function(){this.$source.val(""),this.$target.val(""),this.$container.removeClass("combobox-selected"),this.selected=!1},refresh:function(){this.source=this.parse(),this.options.items=this.source.length},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("change",e.proxy(this.change,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this)).on("mousedown","li",e.proxy(this.mousedown,this)),this.$button.on("click touchend",e.proxy(this.toggle,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev(),this.fixMenuScroll();break;case 40:e.preventDefault(),this.next(),this.fixMenuScroll();break}e.stopPropagation()},fixMenuScroll:function(){var t,n,s,o,e=this.$menu.find(".active");e.length&&(this.$element.attr("aria-activedescendant",e.attr("id")),t=e.position().top,n=t+e.height(),s=this.$menu.scrollTop(),o=this.$menu.height(),n>o?this.$menu.scrollTop(s+n-o):t<0&&this.$menu.scrollTop(s+t))},setActiveDescendant:function(t){this.mousedover&&this.swapActive(this.$menu.find(".active"),e(t.currentTarget))},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(t){switch(t.keyCode){case 40:this.shown||this.toggle();break;case 39:case 38:case 37:case 36:case 35:case 16:case 17:case 18:break;case 9:case 13:if(t&&(t.stopPropagation(),t.preventDefault()),daFetchAjaxTimeoutFetchAfter=!1,daFetchAcceptIncoming=!1,!this.shown)return;if(this.selected){for(var i=this.$element.val(),s=this.$menu.find("li"),o=s.length,n=0;n',item:'',appendId:"combobox",buttonLabel:"dropdown",clearIfNoMatch:!1},e.fn.combobox.Constructor=t})(window.jQuery) /*! - * Socket.IO v4.5.4 - * (c) 2014-2022 Guillermo Rauch + * Socket.IO v4.8.1 + * (c) 2014-2024 Guillermo Rauch * Released under the MIT License. */ -!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).io=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var m=Object.create(null);m.open="0",m.close="1",m.ping="2",m.pong="3",m.message="4",m.upgrade="5",m.noop="6";var b=Object.create(null);Object.keys(m).forEach((function(t){b[m[t]]=t}));for(var k={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_="function"==typeof ArrayBuffer,E=function(t,e,n){var r,i=t.type,o=t.data;return w&&o instanceof Blob?e?n(o):O(o,n):_&&(o instanceof ArrayBuffer||(r=o,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(o):O(new Blob([o]),n):n(m[i]+(o||""))},O=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"==typeof Uint8Array?[]:new Uint8Array(256),T=0;T1?{type:b[n],data:t.substring(1)}:{type:b[n]}:k},S=function(t,e){if(C){var n=function(t){var e,n,r,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&o;return u}(t);return N(n,e)}return{base64:!0,data:t}},N=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},x=String.fromCharCode(30);function L(t){if(t)return function(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}(t)}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},L.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i1?e-1:0),r=1;r0);return e}function W(){var t=z(+new Date);return t!==F?(K=0,F=t):t+"."+z(K++)}for(;Y<64;Y++)H[V[Y]]=Y;function $(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function J(t){for(var e={},n=t.split("&"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd,xs:this.xs},this.opts),new nt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),s}(U),nt=function(t){o(i,t);var n=p(i);function i(t,r){var o;return e(this,i),D(f(o=n.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return r(i,[{key:"create",value:function(){var t=this,e=j(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var n=this.xhr=new Q(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var r in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223===n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Z,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(L);if(nt.requestsCount=0,nt.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",rt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in P?"pagehide":"unload",rt,!1)}function rt(){for(var t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var it="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},ot=P.WebSocket||P.MozWebSocket,st="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),at=function(t){o(i,t);var n=p(i);function i(t){var r;return e(this,i),(r=n.call(this,t)).supportsBinary=!t.forceBase64,r}return r(i,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=st?{}:j(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=st?new ot(t,e,n):e?new ot(t,e):new ot(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(n){var r=t[n],i=n===t.length-1;E(r,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}i&&it((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),r=s.call(this),n&&"object"===t(n)&&(o=n,n=null),n?(n=ft(n),o.hostname=n.host,o.secure="https"===n.protocol||"wss"===n.protocol,o.port=n.port,n.query&&(o.query=n.query)):o.host&&(o.hostname=ft(o.host).host),D(f(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket"],r.readyState="",r.writeBuffer=[],r.prevBufferLen=0,r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),r.opts.path=r.opts.path.replace(/\/$/,"")+"/","string"==typeof r.opts.query&&(r.opts.query=J(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"==typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return r(a,[{key:"createTransport",value:function(t){var e=i({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var n=i({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ct[t](n)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,n=this.createTransport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",n),!n)return;a.priorWebsocketSuccess="websocket"===n.name,e.transport.pause((function(){r||"closed"!==e.readyState&&(f(),e.setTransport(n),n.send([{type:"upgrade"}]),e.emitReserved("upgrade",n),n=null,e.upgrading=!1,e.flush())}))}else{var i=new Error("probe error");i.transport=n.name,e.emitReserved("upgradeError",i)}})))};function o(){r||(r=!0,f(),n.close(),n=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=n.name,o(),e.emitReserved("upgradeError",r)};function c(){s("transport closed")}function u(){s("socket closed")}function h(t){n&&t.name!==n.name&&o()}var f=function(){n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",c),e.off("close",u),e.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",c),this.once("close",u),this.once("upgrading",h),n.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t1))return this.writeBuffer;for(var t,e=1,n=0;n=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n=0&&e.num0;case Et.ACK:case Et.BINARY_ACK:return Array.isArray(n)}}}]),a}(L),Rt=function(){function t(n){e(this,t),this.packet=n,this.buffers=[],this.reconPack=n}return r(t,[{key:"takeBinaryData",value:function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=wt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),t}(),Tt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Et},Encoder:Ot,Decoder:At});function Ct(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Bt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),St=function(t){o(i,t);var n=p(i);function i(t,r,o){var s;return e(this,i),(s=n.call(this)).connected=!1,s.receiveBuffer=[],s.sendBuffer=[],s.ids=0,s.acks={},s.flags={},s.io=t,s.nsp=r,o&&o.auth&&(s.auth=o.auth),s.io._autoConnect&&s.open(),s}return r(i,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs=[Ct(t,"open",this.onopen.bind(this)),Ct(t,"packet",this.onpacket.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},Nt.prototype.reset=function(){this.attempts=0},Nt.prototype.setMin=function(t){this.ms=t},Nt.prototype.setMax=function(t){this.max=t},Nt.prototype.setJitter=function(t){this.jitter=t};var xt=function(n){o(s,n);var i=p(s);function s(n,r){var o,a;e(this,s),(o=i.call(this)).nsps={},o.subs=[],n&&"object"===t(n)&&(r=n,n=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,D(f(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(a=r.randomizationFactor)&&void 0!==a?a:.5),o.backoff=new Nt({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=n;var c=r.parser||Tt;return o.encoder=new c.Encoder,o.decoder=new c.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return r(s,[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new lt(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Ct(n,"open",(function(){r.onopen(),t&&t()})),o=Ct(n,"error",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;0===s&&i();var a=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref&&a.unref(),this.subs.push((function(){clearTimeout(a)}))}return this.subs.push(i),this.subs.push(o),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(Ct(t,"ping",this.onping.bind(this)),Ct(t,"data",this.ondata.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this)),Ct(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(t){var e=this;it((function(){e.emitReserved("packet",t)}),this.setTimeoutFn)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n||(n=new St(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}]),s}(L),Lt={};function Pt(e,n){"object"===t(e)&&(n=e,e=void 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i.path,c=Lt[s]&&a in Lt[s].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||c?r=new xt(o,n):(Lt[s]||(Lt[s]=new xt(o,n)),r=Lt[s]),i.query&&!n.query&&(n.query=i.queryKey),r.socket(i.path,n)}return i(Pt,{Manager:xt,Socket:St,io:Pt,connect:Pt}),Pt})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).io=n()}(this,(function(){"use strict";function t(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,u=!0,h=!1;return{s:function(){r=r.call(n)},n:function(){var t=r.next();return u=t.done,t},e:function(t){h=!0,s=t},f:function(){try{u||null==r.return||r.return()}finally{if(h)throw s}}}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n1?{type:l[i],data:t.substring(1)}:{type:l[i]}:d},N=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var f=new ArrayBuffer(s),c=new Uint8Array(f);for(n=0;n>4,c[h++]=(15&r)<<4|e>>2,c[h++]=(3&e)<<6|63&o;return f}(t);return C(i,n)}return{base64:!0,data:t}},C=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function U(){return new TransformStream({transform:function(t,n){!function(t,n){y&&t.data instanceof Blob?t.data.arrayBuffer().then(k).then(n):b&&(t.data instanceof ArrayBuffer||w(t.data))?n(k(t.data)):g(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(I),X=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}s(n,t);var r=n.prototype;return r.doOpen=function(){this.v()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.v=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e(t,{xd:this.xd},this.opts),new Y(tt,this.uri(),t)},n}(K);function tt(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||z))return new XMLHttpRequest}catch(t){}if(!n)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),it=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=nt?{}:_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;g(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;rMath.pow(2,21)-1){u.enqueue(d);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)t){u.enqueue(d);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=U();e.readable.pipeTo(n.writable),t.U=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.U.write(i).then((function(){e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ut.exec(t||""),u={},h=14;h--;)u[ht[h]]=s[h]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ct="function"==typeof addEventListener&&"function"==typeof removeEventListener,at=[];ct&&addEventListener("offline",(function(){at.forEach((function(t){return t()}))}),!1);var vt=function(t){function n(n,i){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r.M=0,r.I=-1,r.R=-1,r.L=-1,r._=1/0,n&&"object"===c(n)&&(i=n,n=null),n){var o=ft(n);i.hostname=o.host,i.secure="https"===o.protocol||"wss"===o.protocol,i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=ft(i.host).host);return $(r,i),r.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.D={},i.transports.forEach((function(t){var n=t.prototype.name;r.transports.push(n),r.D[n]=t})),r.opts=e({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r1))return this.writeBuffer;for(var t,n=1,i=0;i=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.L)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},i.W=function(){var t=this;if(!this._)return!0;var n=Date.now()>this._;return n&&(this._=0,R((function(){t.F("ping timeout")}),this.setTimeoutFn)),n},i.write=function(t,n,i){return this.J("message",t,n,i),this},i.send=function(t,n,i){return this.J("message",t,n,i),this},i.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},i.close=function(){var t=this,n=function(){t.F("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},i.B=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.F("transport error",t)},i.F=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Y),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ct&&(this.P&&removeEventListener("beforeunload",this.P,!1),this.$)){var i=at.indexOf(this.$);-1!==i&&at.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.M=0}},n}(I);vt.protocol=4;var lt=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Z=[],n}s(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r="object"===c(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return st[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return s(n,t),n}(lt);pt.protocol;var dt="function"==typeof ArrayBuffer,yt=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer},bt=Object.prototype.toString,wt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),gt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function mt(t){return dt&&(t instanceof ArrayBuffer||yt(t))||wt&&t instanceof Blob||gt&&t instanceof File}function kt(t,n){if(!t||"object"!==c(t))return!1;if(Array.isArray(t)){for(var i=0,r=t.length;i=0&&t.num1?e-1:0),s=1;s1?i-1:0),e=1;ei.l.retries&&(i.it.shift(),n&&n(t));else if(i.it.shift(),n){for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.it.length){var n=this.it[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}},o.packet=function(t){t.nsp=this.nsp,this.io.ct(t)},o.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(n){t.vt(n)})):this.vt(this.auth)},o.vt=function(t){this.packet({type:Bt.CONNECT,data:this.lt?e({pid:this.lt,offset:this.dt},t):t})},o.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},o.onclose=function(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this.yt()},o.yt=function(){var t=this;Object.keys(this.acks).forEach((function(n){if(!t.sendBuffer.some((function(t){return String(t.id)===n}))){var i=t.acks[n];delete t.acks[n],i.withError&&i.call(t,new Error("socket has been disconnected"))}}))},o.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}},o.onevent=function(t){var n=t.data||[];null!=t.id&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))},o.emitEvent=function(n){if(this.bt&&this.bt.length){var i,e=r(this.bt.slice());try{for(e.s();!(i=e.n()).done;){i.value.apply(this,n)}}catch(t){e.e(t)}finally{e.f()}}t.prototype.emit.apply(this,n),this.lt&&n.length&&"string"==typeof n[n.length-1]&&(this.dt=n[n.length-1])},o.ack=function(t){var n=this,i=!1;return function(){if(!i){i=!0;for(var r=arguments.length,e=new Array(r),o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}_t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*t);t=1&Math.floor(10*n)?t+i:t-i}return 0|Math.min(t,this.max)},_t.prototype.reset=function(){this.attempts=0},_t.prototype.setMin=function(t){this.ms=t},_t.prototype.setMax=function(t){this.max=t},_t.prototype.setJitter=function(t){this.jitter=t};var Dt=function(t){function n(n,i){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],n&&"object"===c(n)&&(i=n,n=void 0),(i=i||{}).path=i.path||"/socket.io",r.opts=i,$(r,i),r.reconnection(!1!==i.reconnection),r.reconnectionAttempts(i.reconnectionAttempts||1/0),r.reconnectionDelay(i.reconnectionDelay||1e3),r.reconnectionDelayMax(i.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=i.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new _t({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==i.timeout?2e4:i.timeout),r.st="closed",r.uri=n;var o=i.parser||xt;return r.encoder=new o.Encoder,r.decoder=new o.Decoder,r.et=!1!==i.autoConnect,r.et&&r.open(),r}s(n,t);var i=n.prototype;return i.reconnection=function(t){return arguments.length?(this.kt=!!t,t||(this.skipReconnect=!0),this):this.kt},i.reconnectionAttempts=function(t){return void 0===t?this.At:(this.At=t,this)},i.reconnectionDelay=function(t){var n;return void 0===t?this.jt:(this.jt=t,null===(n=this.backoff)||void 0===n||n.setMin(t),this)},i.randomizationFactor=function(t){var n;return void 0===t?this.Et:(this.Et=t,null===(n=this.backoff)||void 0===n||n.setJitter(t),this)},i.reconnectionDelayMax=function(t){var n;return void 0===t?this.Ot:(this.Ot=t,null===(n=this.backoff)||void 0===n||n.setMax(t),this)},i.timeout=function(t){return arguments.length?(this.Bt=t,this):this.Bt},i.maybeReconnectOnOpen=function(){!this.ot&&this.kt&&0===this.backoff.attempts&&this.reconnect()},i.open=function(t){var n=this;if(~this.st.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var i=this.engine,r=this;this.st="opening",this.skipReconnect=!1;var e=It(i,"open",(function(){r.onopen(),t&&t()})),o=function(i){n.cleanup(),n.st="closed",n.emitReserved("error",i),t?t(i):n.maybeReconnectOnOpen()},s=It(i,"error",o);if(!1!==this.Bt){var u=this.Bt,h=this.setTimeoutFn((function(){e(),o(new Error("timeout")),i.close()}),u);this.opts.autoUnref&&h.unref(),this.subs.push((function(){n.clearTimeoutFn(h)}))}return this.subs.push(e),this.subs.push(s),this},i.connect=function(t){return this.open(t)},i.onopen=function(){this.cleanup(),this.st="open",this.emitReserved("open");var t=this.engine;this.subs.push(It(t,"ping",this.onping.bind(this)),It(t,"data",this.ondata.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this)),It(this.decoder,"decoded",this.ondecoded.bind(this)))},i.onping=function(){this.emitReserved("ping")},i.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},i.ondecoded=function(t){var n=this;R((function(){n.emitReserved("packet",t)}),this.setTimeoutFn)},i.onerror=function(t){this.emitReserved("error",t)},i.socket=function(t,n){var i=this.nsps[t];return i?this.et&&!i.active&&i.connect():(i=new Lt(this,t,n),this.nsps[t]=i),i},i.wt=function(t){for(var n=0,i=Object.keys(this.nsps);n=this.At)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{var i=this.backoff.duration();this.ot=!0;var r=this.setTimeoutFn((function(){n.skipReconnect||(t.emitReserved("reconnect_attempt",n.backoff.attempts),n.skipReconnect||n.open((function(i){i?(n.ot=!1,n.reconnect(),t.emitReserved("reconnect_error",i)):n.onreconnect()})))}),i);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},i.onreconnect=function(){var t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},n}(I),Pt={};function $t(t,n){"object"===c(t)&&(n=t,t=void 0);var i,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+n,r.href=r.protocol+"://"+e+(i&&i.port===r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),e=r.source,o=r.id,s=r.path,u=Pt[o]&&s in Pt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?i=new Dt(e,n):(Pt[o]||(Pt[o]=new Dt(e,n)),i=Pt[o]),r.query&&!n.query&&(n.query=r.queryKey),i.socket(r.path,n)}return e($t,{Manager:Dt,Socket:Lt,io:$t,connect:$t}),$t})); //# sourceMappingURL=socket.io.min.js.map diff --git a/docassemble_webapp/docassemble/webapp/static/app/bundlenojquery.js b/docassemble_webapp/docassemble/webapp/static/app/bundlenojquery.js index dd2974315..54b9ee8f9 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/bundlenojquery.js +++ b/docassemble_webapp/docassemble/webapp/static/app/bundlenojquery.js @@ -345,10 +345,10 @@ if(typeof $=="undefined")var daCtx,daColor,daTheWidth,daAspectRatio,daTheBorders */(function(e){e.fn.labelauty=function(t){var i=e.extend({development:!1,class:"labelauty",icon:!0,label:!0,separator:"|",checked_label:"Checked",unchecked_label:"Unchecked",force_random_id:!1,minimum_width:!1,same_width:!1},t);return this.each(function(){var a,r,c,l,d,h,m,f,p,g,v,b,t=e(this),w=t.is(":checked"),y=t.attr("type"),j=!0,u=!0,_=t.attr("aria-label");if(t.attr("aria-hidden",!0),t.is(":checkbox")===!1&&t.is(":radio")===!1)return this;if(p=t.attr("class").split(/\s+/).filter(function(e){return e!="da-to-labelauty"}),t.addClass(i.class),h=t.attr("data-labelauty"),c=t.attr("data-color"),u=i.label,j=i.icon,u===!0&&(h==null||h.length===0?l=[i.unchecked_label,i.checked_label]:(l=h.split(i.separator),l.length>2?(u=!1,n(i.development,"There's more than two labels. LABELAUTY will not use labels.")):l.length===1&&n(i.development,"There's just one label. LABELAUTY will use this one for both cases."))),t.css({display:"none"}),t.removeAttr("data-labelauty"),r=t.attr("id"),i.force_random_id||r==null||r.trim()===""){for(m=1+Math.floor(Math.random()*1024e3),r="labelauty-"+m;e(r).length!==0;)m++,r="labelauty-"+m,n(i.development,"Holy crap, between 1024 thousand numbers, one raised a conflict. Trying again.");t.attr("id",r)}for(a=jQuery(o(r,_,w,y,l,u,j)),f=0;fb?d.find("span.labelauty-checked").width(v):d.find("span.labelauty-unchecked").width(b))})};function s(e){var n=0,t=e,s="hidden_element",t=t.clone().attr("class",s).appendTo("body"),n=t.width(!0);return t.remove(),n}function n(e,t){e&&window.console&&window.console.log&&window.console.log("jQuery-LABELAUTY: "+t)}function t(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,'"'),e}function o(e,n,s,o,i,a,r){var c,l,u,h,m,d="";return i==null?c=l="":(c=i[0],i[1]==null?l=c:l=i[1]),o=="checkbox"?h='':h='',o=="checkbox"?m='':m='',n==null?d="":d='tabindex="0" role="'+o+'" aria-checked="'+s+'" aria-label="'+n+'"',a==!0&&r==!0?u='":a==!0?u='":u='",u}})(window.jQuery) (function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.combobox.defaults,n),this.template=this.options.template||this.template,this.$source=e(t),this.$source.hasClass("da-combobox-floating")?this.$label=this.$source.next("label"):this.$label=null,this.$container=this.setup(),this.$element=this.$container.find("input[type=text]"),this.$target=this.$container.find("input[type=hidden]"),this.mousedover=!1,this.$source.attr("disabled")!==void 0&&this.$target.prop("disabled",!0),this.$button=this.$container.find(".dacomboboxtoggle"),this.$float?this.$menu=e(this.options.menu).insertAfter(this.$float):this.$menu=e(this.options.menu).insertAfter(this.$element),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.clearIfNoMatch=this.options.clearIfNoMatch,this.shown=!1,this.selected=!1,this.refresh(),this.transferAttributes(),this.listen()};t.prototype={constructor:t,setup:function(){var n,s,t=e(this.template());return this.$source.before(t),this.$source.hide(),this.$label?(this.$float=e('
'),s=this.$label.text(),n=t.find('input[type="text"]'),n.attr("placeholder",s),n.detach(),this.$label.detach(),this.$float.append(n,this.$label),this.$float.insertBefore(t.find("div.input-group-append"))):this.$float=null,t},template:function(){return this.options.bsVersion=="2"?'
':'
'},disable:function(){console.log("disable"),this.$element.prop("disabled",!0),this.$button.attr("disabled",!0),this.$target.prop("disabled",!0),this.$source.prop("disabled",!0),this.disabled=!0,this.$container.addClass("combobox-disabled")},enable:function(){console.log("enable"),this.$element.prop("disabled",!1),this.$button.attr("disabled",!1),this.$target.prop("disabled",!1),this.$source.prop("disabled",!1),this.disabled=!1,this.$container.removeClass("combobox-disabled")},parse:function(){var n,o,i,l=this,a={},r={},c=[],t=!1,s="";return this.$source.find("option").each(function(){var n=e(this);if(n.val()===""){l.options.placeholder=n.text();return}a[n.text()]=n.val(),r[n.val()]=n.text(),c.push(n.text()),n.prop("selected")&&(t=n.text(),s=n.val())}),this.map=a,this.revMap=r,t?(o=!1,i=!1,n=this.$element.val(),n!==t&&(this.$element.val(t),o=!0),n=this.$target.val(),n!==s&&(this.$target.val(s),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,i&&this.$target.trigger("change"),o&&this.$element.trigger("change")):(this.$container.removeClass("combobox-selected"),this.selected=!1),c},transferAttributes:function(){if(this.options.placeholder=this.$source.attr("data-placeholder")||this.options.placeholder,this.options.appendId!=="undefined"&&(this.$element.attr("id",this.$source.attr("id")),this.$source.attr("id",this.$source.attr("id")+this.options.appendId),daComboBoxes[this.$element.attr("id")]=this),this.$menu.attr("id",this.$element.attr("id")+"menu"),this.$element.attr("aria-controls",this.$menu.attr("id")),this.$element.attr("aria-owns",this.$menu.attr("id")),this.$button.attr("aria-controls",this.$menu.attr("id")),this.$button.attr("aria-label",this.$source.attr("aria-label")),this.$source.attr("aria-labelledby")?this.$element.attr("aria-labelledby",this.$source.attr("aria-labelledby")):this.$source.attr("aria-labelledby","daMainQuestion"),this.$button.attr("aria-labelledby",this.$source.attr("aria-labelledby")),this.$button.attr("aria-describedby",this.$source.attr("aria-describedby")),this.$element.attr("placeholder",this.options.placeholder),this.$target.prop("name",this.$source.prop("name")),this.$target.val(this.$source.val()),this.$source.removeAttr("name"),this.$element.attr("required",this.$source.attr("required")),this.$element.attr("rel",this.$source.attr("rel")),this.$element.attr("title",this.$source.attr("title")),this.$element.attr("class",this.$source.attr("class")),this.$element.attr("tabindex",this.$source.attr("tabindex")),this.$source.removeAttr("tabindex"),!this.$target.val()&&this.$source.data("default")){var e=this.$source.data("default");this.$element.val(e),this.$target.val(e)}this.$source.attr("disabled")!==void 0&&this.disable()},select:function(){var e,n,t=this.$menu.find(".active").attr("data-value"),s=!1,o=!1,i=!1;this.$container.parent().find(".da-has-error").remove(),e=this.$element.val(),n=this.updater(t),e!==n&&(this.$element.val(n),s=!0),e=this.$target.val(),e!==this.map[t]&&(this.$target.val(this.map[t]),o=!0),e=this.$source.val(),e!==this.map[t]&&(this.$source.val(this.map[t]),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,this.hide(),o&&this.$target.trigger("change"),s&&this.$element.trigger("change"),i&&this.$source.trigger("change")},manualSelect:function(e){var t,n=!1,s=!1,o=!1;this.$container.parent().find(".da-has-error").remove(),e!==""&&this.revMap[e]!==void 0?(this.$element.val(this.revMap[e]),n=!0):this.$element.val(e),t=this.$target.val(),t!==e&&(this.$target.val(e),o=!0),t=this.$source.val(),t!==e&&(this.$source.val(e),s=!0),e!==""&&n&&(this.$container.addClass("combobox-selected"),this.selected=!0),o&&this.$target.trigger("change"),this.$element.trigger("change"),s&&this.$source.trigger("change")},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.hidden=!1,this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.hidden=!0,this.$element.on("blur",e.proxy(this.blur,this)),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.shown=!1,this},lookup:function(){this.query=this.$element.val(),this.process(this.source)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],s=[],o=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?s.push(t):o.push(t):n.push(t);return n.concat(s,o)},highlighter:function(e){var t=this.query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");return t?e.replace(new RegExp("("+t+")","ig"),function(e,t){return""+t+""}):e},render:function(t){var n=this;return t=e(t).map(function(t,s){return t=e(n.options.item).attr("data-value",s).attr("aria-label",s),t.attr("id",n.$element.attr("id")+"-option-"+s),t.html(n.highlighter(s)),t[0]}),this.setActive(t.first()),this.$menu.html(t),this},setActive:function(e){e.addClass("active").attr("aria-selected",!0),this.$element.attr("aria-activedescendant",e.attr("id"))},swapActive:function(e,t){e.removeClass("active").attr("aria-selected",!1),this.setActive(t)},next:function(){var s=this.$menu.find('[aria-selected="true"]'),n=s.next();n.length||(n=e(this.$menu.find("li")[0])),this.swapActive(s,n)},prev:function(){var n=this.$menu.find('[aria-selected="true"]'),t=n.prev();t.length||(t=this.$menu.find("li").last()),this.swapActive(n,t)},toggle:function(e){return this.disabled||(this.$container.hasClass("combobox-selected")?(this.clearAll(),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1)):this.shown?(this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.hide()):(this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.clearElement(),this.lookup())),e&&(e.preventDefault(),e.stopPropagation()),!1},clearAll:function(){var t=!1,n=!1,s=!1,e=this.$element.val();e!==""&&(this.$element.val(""),t=!0),e=this.$source.val(),e!==""&&(this.$source.val(""),n=!0),e=this.$target.val(),e!==""&&(this.$target.val(""),s=!0),this.$container.removeClass("combobox-selected"),s&&this.$target.trigger("change"),t&&this.$element.trigger("change"),n&&this.$source.trigger("change")},clearElement:function(){this.$element.val("").focus()},clearTarget:function(){this.$source.val(""),this.$target.val(""),this.$container.removeClass("combobox-selected"),this.selected=!1},refresh:function(){this.source=this.parse(),this.options.items=this.source.length},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("change",e.proxy(this.change,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this)).on("mousedown","li",e.proxy(this.mousedown,this)),this.$button.on("click touchend",e.proxy(this.toggle,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev(),this.fixMenuScroll();break;case 40:e.preventDefault(),this.next(),this.fixMenuScroll();break}e.stopPropagation()},fixMenuScroll:function(){var t,n,s,o,e=this.$menu.find(".active");e.length&&(this.$element.attr("aria-activedescendant",e.attr("id")),t=e.position().top,n=t+e.height(),s=this.$menu.scrollTop(),o=this.$menu.height(),n>o?this.$menu.scrollTop(s+n-o):t<0&&this.$menu.scrollTop(s+t))},setActiveDescendant:function(t){this.mousedover&&this.swapActive(this.$menu.find(".active"),e(t.currentTarget))},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(t){switch(t.keyCode){case 40:this.shown||this.toggle();break;case 39:case 38:case 37:case 36:case 35:case 16:case 17:case 18:break;case 9:case 13:if(t&&(t.stopPropagation(),t.preventDefault()),daFetchAjaxTimeoutFetchAfter=!1,daFetchAcceptIncoming=!1,!this.shown)return;if(this.selected){for(var i=this.$element.val(),s=this.$menu.find("li"),o=s.length,n=0;n',item:'',appendId:"combobox",buttonLabel:"dropdown",clearIfNoMatch:!1},e.fn.combobox.Constructor=t})(window.jQuery) /*! - * Socket.IO v4.5.4 - * (c) 2014-2022 Guillermo Rauch + * Socket.IO v4.8.1 + * (c) 2014-2024 Guillermo Rauch * Released under the MIT License. */ -!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).io=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var m=Object.create(null);m.open="0",m.close="1",m.ping="2",m.pong="3",m.message="4",m.upgrade="5",m.noop="6";var b=Object.create(null);Object.keys(m).forEach((function(t){b[m[t]]=t}));for(var k={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_="function"==typeof ArrayBuffer,E=function(t,e,n){var r,i=t.type,o=t.data;return w&&o instanceof Blob?e?n(o):O(o,n):_&&(o instanceof ArrayBuffer||(r=o,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(o):O(new Blob([o]),n):n(m[i]+(o||""))},O=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"==typeof Uint8Array?[]:new Uint8Array(256),T=0;T1?{type:b[n],data:t.substring(1)}:{type:b[n]}:k},S=function(t,e){if(C){var n=function(t){var e,n,r,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&o;return u}(t);return N(n,e)}return{base64:!0,data:t}},N=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},x=String.fromCharCode(30);function L(t){if(t)return function(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}(t)}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},L.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i1?e-1:0),r=1;r0);return e}function W(){var t=z(+new Date);return t!==F?(K=0,F=t):t+"."+z(K++)}for(;Y<64;Y++)H[V[Y]]=Y;function $(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function J(t){for(var e={},n=t.split("&"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd,xs:this.xs},this.opts),new nt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),s}(U),nt=function(t){o(i,t);var n=p(i);function i(t,r){var o;return e(this,i),D(f(o=n.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return r(i,[{key:"create",value:function(){var t=this,e=j(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var n=this.xhr=new Q(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var r in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223===n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Z,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(L);if(nt.requestsCount=0,nt.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",rt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in P?"pagehide":"unload",rt,!1)}function rt(){for(var t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var it="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},ot=P.WebSocket||P.MozWebSocket,st="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),at=function(t){o(i,t);var n=p(i);function i(t){var r;return e(this,i),(r=n.call(this,t)).supportsBinary=!t.forceBase64,r}return r(i,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=st?{}:j(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=st?new ot(t,e,n):e?new ot(t,e):new ot(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(n){var r=t[n],i=n===t.length-1;E(r,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}i&&it((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),r=s.call(this),n&&"object"===t(n)&&(o=n,n=null),n?(n=ft(n),o.hostname=n.host,o.secure="https"===n.protocol||"wss"===n.protocol,o.port=n.port,n.query&&(o.query=n.query)):o.host&&(o.hostname=ft(o.host).host),D(f(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket"],r.readyState="",r.writeBuffer=[],r.prevBufferLen=0,r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),r.opts.path=r.opts.path.replace(/\/$/,"")+"/","string"==typeof r.opts.query&&(r.opts.query=J(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"==typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return r(a,[{key:"createTransport",value:function(t){var e=i({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var n=i({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ct[t](n)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,n=this.createTransport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",n),!n)return;a.priorWebsocketSuccess="websocket"===n.name,e.transport.pause((function(){r||"closed"!==e.readyState&&(f(),e.setTransport(n),n.send([{type:"upgrade"}]),e.emitReserved("upgrade",n),n=null,e.upgrading=!1,e.flush())}))}else{var i=new Error("probe error");i.transport=n.name,e.emitReserved("upgradeError",i)}})))};function o(){r||(r=!0,f(),n.close(),n=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=n.name,o(),e.emitReserved("upgradeError",r)};function c(){s("transport closed")}function u(){s("socket closed")}function h(t){n&&t.name!==n.name&&o()}var f=function(){n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",c),e.off("close",u),e.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",c),this.once("close",u),this.once("upgrading",h),n.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t1))return this.writeBuffer;for(var t,e=1,n=0;n=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n=0&&e.num0;case Et.ACK:case Et.BINARY_ACK:return Array.isArray(n)}}}]),a}(L),Rt=function(){function t(n){e(this,t),this.packet=n,this.buffers=[],this.reconPack=n}return r(t,[{key:"takeBinaryData",value:function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=wt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),t}(),Tt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Et},Encoder:Ot,Decoder:At});function Ct(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Bt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),St=function(t){o(i,t);var n=p(i);function i(t,r,o){var s;return e(this,i),(s=n.call(this)).connected=!1,s.receiveBuffer=[],s.sendBuffer=[],s.ids=0,s.acks={},s.flags={},s.io=t,s.nsp=r,o&&o.auth&&(s.auth=o.auth),s.io._autoConnect&&s.open(),s}return r(i,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs=[Ct(t,"open",this.onopen.bind(this)),Ct(t,"packet",this.onpacket.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},Nt.prototype.reset=function(){this.attempts=0},Nt.prototype.setMin=function(t){this.ms=t},Nt.prototype.setMax=function(t){this.max=t},Nt.prototype.setJitter=function(t){this.jitter=t};var xt=function(n){o(s,n);var i=p(s);function s(n,r){var o,a;e(this,s),(o=i.call(this)).nsps={},o.subs=[],n&&"object"===t(n)&&(r=n,n=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,D(f(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(a=r.randomizationFactor)&&void 0!==a?a:.5),o.backoff=new Nt({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=n;var c=r.parser||Tt;return o.encoder=new c.Encoder,o.decoder=new c.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return r(s,[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new lt(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Ct(n,"open",(function(){r.onopen(),t&&t()})),o=Ct(n,"error",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;0===s&&i();var a=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref&&a.unref(),this.subs.push((function(){clearTimeout(a)}))}return this.subs.push(i),this.subs.push(o),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(Ct(t,"ping",this.onping.bind(this)),Ct(t,"data",this.ondata.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this)),Ct(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(t){var e=this;it((function(){e.emitReserved("packet",t)}),this.setTimeoutFn)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n||(n=new St(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}]),s}(L),Lt={};function Pt(e,n){"object"===t(e)&&(n=e,e=void 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i.path,c=Lt[s]&&a in Lt[s].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||c?r=new xt(o,n):(Lt[s]||(Lt[s]=new xt(o,n)),r=Lt[s]),i.query&&!n.query&&(n.query=i.queryKey),r.socket(i.path,n)}return i(Pt,{Manager:xt,Socket:St,io:Pt,connect:Pt}),Pt})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).io=n()}(this,(function(){"use strict";function t(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,u=!0,h=!1;return{s:function(){r=r.call(n)},n:function(){var t=r.next();return u=t.done,t},e:function(t){h=!0,s=t},f:function(){try{u||null==r.return||r.return()}finally{if(h)throw s}}}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n1?{type:l[i],data:t.substring(1)}:{type:l[i]}:d},N=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var f=new ArrayBuffer(s),c=new Uint8Array(f);for(n=0;n>4,c[h++]=(15&r)<<4|e>>2,c[h++]=(3&e)<<6|63&o;return f}(t);return C(i,n)}return{base64:!0,data:t}},C=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function U(){return new TransformStream({transform:function(t,n){!function(t,n){y&&t.data instanceof Blob?t.data.arrayBuffer().then(k).then(n):b&&(t.data instanceof ArrayBuffer||w(t.data))?n(k(t.data)):g(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(I),X=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}s(n,t);var r=n.prototype;return r.doOpen=function(){this.v()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.v=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e(t,{xd:this.xd},this.opts),new Y(tt,this.uri(),t)},n}(K);function tt(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||z))return new XMLHttpRequest}catch(t){}if(!n)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),it=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=nt?{}:_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;g(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;rMath.pow(2,21)-1){u.enqueue(d);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)t){u.enqueue(d);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=U();e.readable.pipeTo(n.writable),t.U=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.U.write(i).then((function(){e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ut.exec(t||""),u={},h=14;h--;)u[ht[h]]=s[h]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ct="function"==typeof addEventListener&&"function"==typeof removeEventListener,at=[];ct&&addEventListener("offline",(function(){at.forEach((function(t){return t()}))}),!1);var vt=function(t){function n(n,i){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r.M=0,r.I=-1,r.R=-1,r.L=-1,r._=1/0,n&&"object"===c(n)&&(i=n,n=null),n){var o=ft(n);i.hostname=o.host,i.secure="https"===o.protocol||"wss"===o.protocol,i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=ft(i.host).host);return $(r,i),r.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.D={},i.transports.forEach((function(t){var n=t.prototype.name;r.transports.push(n),r.D[n]=t})),r.opts=e({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r1))return this.writeBuffer;for(var t,n=1,i=0;i=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.L)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},i.W=function(){var t=this;if(!this._)return!0;var n=Date.now()>this._;return n&&(this._=0,R((function(){t.F("ping timeout")}),this.setTimeoutFn)),n},i.write=function(t,n,i){return this.J("message",t,n,i),this},i.send=function(t,n,i){return this.J("message",t,n,i),this},i.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},i.close=function(){var t=this,n=function(){t.F("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},i.B=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.F("transport error",t)},i.F=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Y),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ct&&(this.P&&removeEventListener("beforeunload",this.P,!1),this.$)){var i=at.indexOf(this.$);-1!==i&&at.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.M=0}},n}(I);vt.protocol=4;var lt=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Z=[],n}s(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r="object"===c(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return st[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return s(n,t),n}(lt);pt.protocol;var dt="function"==typeof ArrayBuffer,yt=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer},bt=Object.prototype.toString,wt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),gt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function mt(t){return dt&&(t instanceof ArrayBuffer||yt(t))||wt&&t instanceof Blob||gt&&t instanceof File}function kt(t,n){if(!t||"object"!==c(t))return!1;if(Array.isArray(t)){for(var i=0,r=t.length;i=0&&t.num1?e-1:0),s=1;s1?i-1:0),e=1;ei.l.retries&&(i.it.shift(),n&&n(t));else if(i.it.shift(),n){for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.it.length){var n=this.it[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}},o.packet=function(t){t.nsp=this.nsp,this.io.ct(t)},o.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(n){t.vt(n)})):this.vt(this.auth)},o.vt=function(t){this.packet({type:Bt.CONNECT,data:this.lt?e({pid:this.lt,offset:this.dt},t):t})},o.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},o.onclose=function(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this.yt()},o.yt=function(){var t=this;Object.keys(this.acks).forEach((function(n){if(!t.sendBuffer.some((function(t){return String(t.id)===n}))){var i=t.acks[n];delete t.acks[n],i.withError&&i.call(t,new Error("socket has been disconnected"))}}))},o.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}},o.onevent=function(t){var n=t.data||[];null!=t.id&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))},o.emitEvent=function(n){if(this.bt&&this.bt.length){var i,e=r(this.bt.slice());try{for(e.s();!(i=e.n()).done;){i.value.apply(this,n)}}catch(t){e.e(t)}finally{e.f()}}t.prototype.emit.apply(this,n),this.lt&&n.length&&"string"==typeof n[n.length-1]&&(this.dt=n[n.length-1])},o.ack=function(t){var n=this,i=!1;return function(){if(!i){i=!0;for(var r=arguments.length,e=new Array(r),o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}_t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*t);t=1&Math.floor(10*n)?t+i:t-i}return 0|Math.min(t,this.max)},_t.prototype.reset=function(){this.attempts=0},_t.prototype.setMin=function(t){this.ms=t},_t.prototype.setMax=function(t){this.max=t},_t.prototype.setJitter=function(t){this.jitter=t};var Dt=function(t){function n(n,i){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],n&&"object"===c(n)&&(i=n,n=void 0),(i=i||{}).path=i.path||"/socket.io",r.opts=i,$(r,i),r.reconnection(!1!==i.reconnection),r.reconnectionAttempts(i.reconnectionAttempts||1/0),r.reconnectionDelay(i.reconnectionDelay||1e3),r.reconnectionDelayMax(i.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=i.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new _t({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==i.timeout?2e4:i.timeout),r.st="closed",r.uri=n;var o=i.parser||xt;return r.encoder=new o.Encoder,r.decoder=new o.Decoder,r.et=!1!==i.autoConnect,r.et&&r.open(),r}s(n,t);var i=n.prototype;return i.reconnection=function(t){return arguments.length?(this.kt=!!t,t||(this.skipReconnect=!0),this):this.kt},i.reconnectionAttempts=function(t){return void 0===t?this.At:(this.At=t,this)},i.reconnectionDelay=function(t){var n;return void 0===t?this.jt:(this.jt=t,null===(n=this.backoff)||void 0===n||n.setMin(t),this)},i.randomizationFactor=function(t){var n;return void 0===t?this.Et:(this.Et=t,null===(n=this.backoff)||void 0===n||n.setJitter(t),this)},i.reconnectionDelayMax=function(t){var n;return void 0===t?this.Ot:(this.Ot=t,null===(n=this.backoff)||void 0===n||n.setMax(t),this)},i.timeout=function(t){return arguments.length?(this.Bt=t,this):this.Bt},i.maybeReconnectOnOpen=function(){!this.ot&&this.kt&&0===this.backoff.attempts&&this.reconnect()},i.open=function(t){var n=this;if(~this.st.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var i=this.engine,r=this;this.st="opening",this.skipReconnect=!1;var e=It(i,"open",(function(){r.onopen(),t&&t()})),o=function(i){n.cleanup(),n.st="closed",n.emitReserved("error",i),t?t(i):n.maybeReconnectOnOpen()},s=It(i,"error",o);if(!1!==this.Bt){var u=this.Bt,h=this.setTimeoutFn((function(){e(),o(new Error("timeout")),i.close()}),u);this.opts.autoUnref&&h.unref(),this.subs.push((function(){n.clearTimeoutFn(h)}))}return this.subs.push(e),this.subs.push(s),this},i.connect=function(t){return this.open(t)},i.onopen=function(){this.cleanup(),this.st="open",this.emitReserved("open");var t=this.engine;this.subs.push(It(t,"ping",this.onping.bind(this)),It(t,"data",this.ondata.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this)),It(this.decoder,"decoded",this.ondecoded.bind(this)))},i.onping=function(){this.emitReserved("ping")},i.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},i.ondecoded=function(t){var n=this;R((function(){n.emitReserved("packet",t)}),this.setTimeoutFn)},i.onerror=function(t){this.emitReserved("error",t)},i.socket=function(t,n){var i=this.nsps[t];return i?this.et&&!i.active&&i.connect():(i=new Lt(this,t,n),this.nsps[t]=i),i},i.wt=function(t){for(var n=0,i=Object.keys(this.nsps);n=this.At)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{var i=this.backoff.duration();this.ot=!0;var r=this.setTimeoutFn((function(){n.skipReconnect||(t.emitReserved("reconnect_attempt",n.backoff.attempts),n.skipReconnect||n.open((function(i){i?(n.ot=!1,n.reconnect(),t.emitReserved("reconnect_error",i)):n.onreconnect()})))}),i);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},i.onreconnect=function(){var t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},n}(I),Pt={};function $t(t,n){"object"===c(t)&&(n=t,t=void 0);var i,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+n,r.href=r.protocol+"://"+e+(i&&i.port===r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),e=r.source,o=r.id,s=r.path,u=Pt[o]&&s in Pt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?i=new Dt(e,n):(Pt[o]||(Pt[o]=new Dt(e,n)),i=Pt[o]),r.query&&!n.query&&(n.query=r.queryKey),i.socket(r.path,n)}return e($t,{Manager:Dt,Socket:Lt,io:$t,connect:$t}),$t})); //# sourceMappingURL=socket.io.min.js.map diff --git a/docassemble_webapp/docassemble/webapp/static/app/bundlewrapjquery.js b/docassemble_webapp/docassemble/webapp/static/app/bundlewrapjquery.js index 9bceb4501..7d69b8c5c 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/bundlewrapjquery.js +++ b/docassemble_webapp/docassemble/webapp/static/app/bundlewrapjquery.js @@ -431,11 +431,11 @@ if(typeof $=="undefined")var daCtx,daColor,daTheWidth,daAspectRatio,daTheBorders */(function(e){e.fn.labelauty=function(t){var i=e.extend({development:!1,class:"labelauty",icon:!0,label:!0,separator:"|",checked_label:"Checked",unchecked_label:"Unchecked",force_random_id:!1,minimum_width:!1,same_width:!1},t);return this.each(function(){var a,r,c,l,d,h,m,f,p,g,v,b,t=e(this),w=t.is(":checked"),y=t.attr("type"),j=!0,u=!0,_=t.attr("aria-label");if(t.attr("aria-hidden",!0),t.is(":checkbox")===!1&&t.is(":radio")===!1)return this;if(p=t.attr("class").split(/\s+/).filter(function(e){return e!="da-to-labelauty"}),t.addClass(i.class),h=t.attr("data-labelauty"),c=t.attr("data-color"),u=i.label,j=i.icon,u===!0&&(h==null||h.length===0?l=[i.unchecked_label,i.checked_label]:(l=h.split(i.separator),l.length>2?(u=!1,n(i.development,"There's more than two labels. LABELAUTY will not use labels.")):l.length===1&&n(i.development,"There's just one label. LABELAUTY will use this one for both cases."))),t.css({display:"none"}),t.removeAttr("data-labelauty"),r=t.attr("id"),i.force_random_id||r==null||r.trim()===""){for(m=1+Math.floor(Math.random()*1024e3),r="labelauty-"+m;e(r).length!==0;)m++,r="labelauty-"+m,n(i.development,"Holy crap, between 1024 thousand numbers, one raised a conflict. Trying again.");t.attr("id",r)}for(a=jQuery(o(r,_,w,y,l,u,j)),f=0;fb?d.find("span.labelauty-checked").width(v):d.find("span.labelauty-unchecked").width(b))})};function s(e){var n=0,t=e,s="hidden_element",t=t.clone().attr("class",s).appendTo("body"),n=t.width(!0);return t.remove(),n}function n(e,t){e&&window.console&&window.console.log&&window.console.log("jQuery-LABELAUTY: "+t)}function t(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,'"'),e}function o(e,n,s,o,i,a,r){var c,l,u,h,m,d="";return i==null?c=l="":(c=i[0],i[1]==null?l=c:l=i[1]),o=="checkbox"?h='':h='',o=="checkbox"?m='':m='',n==null?d="":d='tabindex="0" role="'+o+'" aria-checked="'+s+'" aria-label="'+n+'"',a==!0&&r==!0?u='":a==!0?u='":u='",u}})(window.jQuery) (function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.combobox.defaults,n),this.template=this.options.template||this.template,this.$source=e(t),this.$source.hasClass("da-combobox-floating")?this.$label=this.$source.next("label"):this.$label=null,this.$container=this.setup(),this.$element=this.$container.find("input[type=text]"),this.$target=this.$container.find("input[type=hidden]"),this.mousedover=!1,this.$source.attr("disabled")!==void 0&&this.$target.prop("disabled",!0),this.$button=this.$container.find(".dacomboboxtoggle"),this.$float?this.$menu=e(this.options.menu).insertAfter(this.$float):this.$menu=e(this.options.menu).insertAfter(this.$element),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.clearIfNoMatch=this.options.clearIfNoMatch,this.shown=!1,this.selected=!1,this.refresh(),this.transferAttributes(),this.listen()};t.prototype={constructor:t,setup:function(){var n,s,t=e(this.template());return this.$source.before(t),this.$source.hide(),this.$label?(this.$float=e('
'),s=this.$label.text(),n=t.find('input[type="text"]'),n.attr("placeholder",s),n.detach(),this.$label.detach(),this.$float.append(n,this.$label),this.$float.insertBefore(t.find("div.input-group-append"))):this.$float=null,t},template:function(){return this.options.bsVersion=="2"?'
':'
'},disable:function(){console.log("disable"),this.$element.prop("disabled",!0),this.$button.attr("disabled",!0),this.$target.prop("disabled",!0),this.$source.prop("disabled",!0),this.disabled=!0,this.$container.addClass("combobox-disabled")},enable:function(){console.log("enable"),this.$element.prop("disabled",!1),this.$button.attr("disabled",!1),this.$target.prop("disabled",!1),this.$source.prop("disabled",!1),this.disabled=!1,this.$container.removeClass("combobox-disabled")},parse:function(){var n,o,i,l=this,a={},r={},c=[],t=!1,s="";return this.$source.find("option").each(function(){var n=e(this);if(n.val()===""){l.options.placeholder=n.text();return}a[n.text()]=n.val(),r[n.val()]=n.text(),c.push(n.text()),n.prop("selected")&&(t=n.text(),s=n.val())}),this.map=a,this.revMap=r,t?(o=!1,i=!1,n=this.$element.val(),n!==t&&(this.$element.val(t),o=!0),n=this.$target.val(),n!==s&&(this.$target.val(s),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,i&&this.$target.trigger("change"),o&&this.$element.trigger("change")):(this.$container.removeClass("combobox-selected"),this.selected=!1),c},transferAttributes:function(){if(this.options.placeholder=this.$source.attr("data-placeholder")||this.options.placeholder,this.options.appendId!=="undefined"&&(this.$element.attr("id",this.$source.attr("id")),this.$source.attr("id",this.$source.attr("id")+this.options.appendId),daComboBoxes[this.$element.attr("id")]=this),this.$menu.attr("id",this.$element.attr("id")+"menu"),this.$element.attr("aria-controls",this.$menu.attr("id")),this.$element.attr("aria-owns",this.$menu.attr("id")),this.$button.attr("aria-controls",this.$menu.attr("id")),this.$button.attr("aria-label",this.$source.attr("aria-label")),this.$source.attr("aria-labelledby")?this.$element.attr("aria-labelledby",this.$source.attr("aria-labelledby")):this.$source.attr("aria-labelledby","daMainQuestion"),this.$button.attr("aria-labelledby",this.$source.attr("aria-labelledby")),this.$button.attr("aria-describedby",this.$source.attr("aria-describedby")),this.$element.attr("placeholder",this.options.placeholder),this.$target.prop("name",this.$source.prop("name")),this.$target.val(this.$source.val()),this.$source.removeAttr("name"),this.$element.attr("required",this.$source.attr("required")),this.$element.attr("rel",this.$source.attr("rel")),this.$element.attr("title",this.$source.attr("title")),this.$element.attr("class",this.$source.attr("class")),this.$element.attr("tabindex",this.$source.attr("tabindex")),this.$source.removeAttr("tabindex"),!this.$target.val()&&this.$source.data("default")){var e=this.$source.data("default");this.$element.val(e),this.$target.val(e)}this.$source.attr("disabled")!==void 0&&this.disable()},select:function(){var e,n,t=this.$menu.find(".active").attr("data-value"),s=!1,o=!1,i=!1;this.$container.parent().find(".da-has-error").remove(),e=this.$element.val(),n=this.updater(t),e!==n&&(this.$element.val(n),s=!0),e=this.$target.val(),e!==this.map[t]&&(this.$target.val(this.map[t]),o=!0),e=this.$source.val(),e!==this.map[t]&&(this.$source.val(this.map[t]),i=!0),this.$container.addClass("combobox-selected"),this.selected=!0,this.hide(),o&&this.$target.trigger("change"),s&&this.$element.trigger("change"),i&&this.$source.trigger("change")},manualSelect:function(e){var t,n=!1,s=!1,o=!1;this.$container.parent().find(".da-has-error").remove(),e!==""&&this.revMap[e]!==void 0?(this.$element.val(this.revMap[e]),n=!0):this.$element.val(e),t=this.$target.val(),t!==e&&(this.$target.val(e),o=!0),t=this.$source.val(),t!==e&&(this.$source.val(e),s=!0),e!==""&&n&&(this.$container.addClass("combobox-selected"),this.selected=!0),o&&this.$target.trigger("change"),this.$element.trigger("change"),s&&this.$source.trigger("change")},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.hidden=!1,this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.hidden=!0,this.$element.on("blur",e.proxy(this.blur,this)),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.shown=!1,this},lookup:function(){this.query=this.$element.val(),this.process(this.source)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],s=[],o=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?s.push(t):o.push(t):n.push(t);return n.concat(s,o)},highlighter:function(e){var t=this.query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");return t?e.replace(new RegExp("("+t+")","ig"),function(e,t){return""+t+""}):e},render:function(t){var n=this;return t=e(t).map(function(t,s){return t=e(n.options.item).attr("data-value",s).attr("aria-label",s),t.attr("id",n.$element.attr("id")+"-option-"+s),t.html(n.highlighter(s)),t[0]}),this.setActive(t.first()),this.$menu.html(t),this},setActive:function(e){e.addClass("active").attr("aria-selected",!0),this.$element.attr("aria-activedescendant",e.attr("id"))},swapActive:function(e,t){e.removeClass("active").attr("aria-selected",!1),this.setActive(t)},next:function(){var s=this.$menu.find('[aria-selected="true"]'),n=s.next();n.length||(n=e(this.$menu.find("li")[0])),this.swapActive(s,n)},prev:function(){var n=this.$menu.find('[aria-selected="true"]'),t=n.prev();t.length||(t=this.$menu.find("li").last()),this.swapActive(n,t)},toggle:function(e){return this.disabled||(this.$container.hasClass("combobox-selected")?(this.clearAll(),this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1)):this.shown?(this.$element.attr("aria-expanded",!1),this.$button.attr("aria-expanded",!1),this.hide()):(this.$element.attr("aria-expanded",!0),this.$button.attr("aria-expanded",!0),this.clearElement(),this.lookup())),e&&(e.preventDefault(),e.stopPropagation()),!1},clearAll:function(){var t=!1,n=!1,s=!1,e=this.$element.val();e!==""&&(this.$element.val(""),t=!0),e=this.$source.val(),e!==""&&(this.$source.val(""),n=!0),e=this.$target.val(),e!==""&&(this.$target.val(""),s=!0),this.$container.removeClass("combobox-selected"),s&&this.$target.trigger("change"),t&&this.$element.trigger("change"),n&&this.$source.trigger("change")},clearElement:function(){this.$element.val("").focus()},clearTarget:function(){this.$source.val(""),this.$target.val(""),this.$container.removeClass("combobox-selected"),this.selected=!1},refresh:function(){this.source=this.parse(),this.options.items=this.source.length},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("change",e.proxy(this.change,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this)).on("mousedown","li",e.proxy(this.mousedown,this)),this.$button.on("click touchend",e.proxy(this.toggle,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev(),this.fixMenuScroll();break;case 40:e.preventDefault(),this.next(),this.fixMenuScroll();break}e.stopPropagation()},fixMenuScroll:function(){var t,n,s,o,e=this.$menu.find(".active");e.length&&(this.$element.attr("aria-activedescendant",e.attr("id")),t=e.position().top,n=t+e.height(),s=this.$menu.scrollTop(),o=this.$menu.height(),n>o?this.$menu.scrollTop(s+n-o):t<0&&this.$menu.scrollTop(s+t))},setActiveDescendant:function(t){this.mousedover&&this.swapActive(this.$menu.find(".active"),e(t.currentTarget))},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(t){switch(t.keyCode){case 40:this.shown||this.toggle();break;case 39:case 38:case 37:case 36:case 35:case 16:case 17:case 18:break;case 9:case 13:if(t&&(t.stopPropagation(),t.preventDefault()),daFetchAjaxTimeoutFetchAfter=!1,daFetchAcceptIncoming=!1,!this.shown)return;if(this.selected){for(var i=this.$element.val(),s=this.$menu.find("li"),o=s.length,n=0;n',item:'',appendId:"combobox",buttonLabel:"dropdown",clearIfNoMatch:!1},e.fn.combobox.Constructor=t})(window.jQuery) /*! - * Socket.IO v4.5.4 - * (c) 2014-2022 Guillermo Rauch + * Socket.IO v4.8.1 + * (c) 2014-2024 Guillermo Rauch * Released under the MIT License. */ -!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).io=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var m=Object.create(null);m.open="0",m.close="1",m.ping="2",m.pong="3",m.message="4",m.upgrade="5",m.noop="6";var b=Object.create(null);Object.keys(m).forEach((function(t){b[m[t]]=t}));for(var k={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_="function"==typeof ArrayBuffer,E=function(t,e,n){var r,i=t.type,o=t.data;return w&&o instanceof Blob?e?n(o):O(o,n):_&&(o instanceof ArrayBuffer||(r=o,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(o):O(new Blob([o]),n):n(m[i]+(o||""))},O=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"==typeof Uint8Array?[]:new Uint8Array(256),T=0;T1?{type:b[n],data:t.substring(1)}:{type:b[n]}:k},S=function(t,e){if(C){var n=function(t){var e,n,r,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&o;return u}(t);return N(n,e)}return{base64:!0,data:t}},N=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},x=String.fromCharCode(30);function L(t){if(t)return function(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}(t)}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},L.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i1?e-1:0),r=1;r0);return e}function W(){var t=z(+new Date);return t!==F?(K=0,F=t):t+"."+z(K++)}for(;Y<64;Y++)H[V[Y]]=Y;function $(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function J(t){for(var e={},n=t.split("&"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd,xs:this.xs},this.opts),new nt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),s}(U),nt=function(t){o(i,t);var n=p(i);function i(t,r){var o;return e(this,i),D(f(o=n.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return r(i,[{key:"create",value:function(){var t=this,e=j(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var n=this.xhr=new Q(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var r in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223===n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Z,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(L);if(nt.requestsCount=0,nt.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",rt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in P?"pagehide":"unload",rt,!1)}function rt(){for(var t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var it="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},ot=P.WebSocket||P.MozWebSocket,st="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),at=function(t){o(i,t);var n=p(i);function i(t){var r;return e(this,i),(r=n.call(this,t)).supportsBinary=!t.forceBase64,r}return r(i,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=st?{}:j(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=st?new ot(t,e,n):e?new ot(t,e):new ot(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(n){var r=t[n],i=n===t.length-1;E(r,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}i&&it((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),r=s.call(this),n&&"object"===t(n)&&(o=n,n=null),n?(n=ft(n),o.hostname=n.host,o.secure="https"===n.protocol||"wss"===n.protocol,o.port=n.port,n.query&&(o.query=n.query)):o.host&&(o.hostname=ft(o.host).host),D(f(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket"],r.readyState="",r.writeBuffer=[],r.prevBufferLen=0,r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),r.opts.path=r.opts.path.replace(/\/$/,"")+"/","string"==typeof r.opts.query&&(r.opts.query=J(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"==typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return r(a,[{key:"createTransport",value:function(t){var e=i({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var n=i({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ct[t](n)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,n=this.createTransport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",n),!n)return;a.priorWebsocketSuccess="websocket"===n.name,e.transport.pause((function(){r||"closed"!==e.readyState&&(f(),e.setTransport(n),n.send([{type:"upgrade"}]),e.emitReserved("upgrade",n),n=null,e.upgrading=!1,e.flush())}))}else{var i=new Error("probe error");i.transport=n.name,e.emitReserved("upgradeError",i)}})))};function o(){r||(r=!0,f(),n.close(),n=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=n.name,o(),e.emitReserved("upgradeError",r)};function c(){s("transport closed")}function u(){s("socket closed")}function h(t){n&&t.name!==n.name&&o()}var f=function(){n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",c),e.off("close",u),e.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",c),this.once("close",u),this.once("upgrading",h),n.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t1))return this.writeBuffer;for(var t,e=1,n=0;n=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n=0&&e.num0;case Et.ACK:case Et.BINARY_ACK:return Array.isArray(n)}}}]),a}(L),Rt=function(){function t(n){e(this,t),this.packet=n,this.buffers=[],this.reconPack=n}return r(t,[{key:"takeBinaryData",value:function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=wt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),t}(),Tt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Et},Encoder:Ot,Decoder:At});function Ct(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Bt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),St=function(t){o(i,t);var n=p(i);function i(t,r,o){var s;return e(this,i),(s=n.call(this)).connected=!1,s.receiveBuffer=[],s.sendBuffer=[],s.ids=0,s.acks={},s.flags={},s.io=t,s.nsp=r,o&&o.auth&&(s.auth=o.auth),s.io._autoConnect&&s.open(),s}return r(i,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs=[Ct(t,"open",this.onopen.bind(this)),Ct(t,"packet",this.onpacket.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},Nt.prototype.reset=function(){this.attempts=0},Nt.prototype.setMin=function(t){this.ms=t},Nt.prototype.setMax=function(t){this.max=t},Nt.prototype.setJitter=function(t){this.jitter=t};var xt=function(n){o(s,n);var i=p(s);function s(n,r){var o,a;e(this,s),(o=i.call(this)).nsps={},o.subs=[],n&&"object"===t(n)&&(r=n,n=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,D(f(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(a=r.randomizationFactor)&&void 0!==a?a:.5),o.backoff=new Nt({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=n;var c=r.parser||Tt;return o.encoder=new c.Encoder,o.decoder=new c.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return r(s,[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new lt(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Ct(n,"open",(function(){r.onopen(),t&&t()})),o=Ct(n,"error",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;0===s&&i();var a=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref&&a.unref(),this.subs.push((function(){clearTimeout(a)}))}return this.subs.push(i),this.subs.push(o),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(Ct(t,"ping",this.onping.bind(this)),Ct(t,"data",this.ondata.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this)),Ct(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(t){var e=this;it((function(){e.emitReserved("packet",t)}),this.setTimeoutFn)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n||(n=new St(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}]),s}(L),Lt={};function Pt(e,n){"object"===t(e)&&(n=e,e=void 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i.path,c=Lt[s]&&a in Lt[s].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||c?r=new xt(o,n):(Lt[s]||(Lt[s]=new xt(o,n)),r=Lt[s]),i.query&&!n.query&&(n.query=i.queryKey),r.socket(i.path,n)}return i(Pt,{Manager:xt,Socket:St,io:Pt,connect:Pt}),Pt})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).io=n()}(this,(function(){"use strict";function t(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,u=!0,h=!1;return{s:function(){r=r.call(n)},n:function(){var t=r.next();return u=t.done,t},e:function(t){h=!0,s=t},f:function(){try{u||null==r.return||r.return()}finally{if(h)throw s}}}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n1?{type:l[i],data:t.substring(1)}:{type:l[i]}:d},N=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var f=new ArrayBuffer(s),c=new Uint8Array(f);for(n=0;n>4,c[h++]=(15&r)<<4|e>>2,c[h++]=(3&e)<<6|63&o;return f}(t);return C(i,n)}return{base64:!0,data:t}},C=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function U(){return new TransformStream({transform:function(t,n){!function(t,n){y&&t.data instanceof Blob?t.data.arrayBuffer().then(k).then(n):b&&(t.data instanceof ArrayBuffer||w(t.data))?n(k(t.data)):g(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(I),X=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}s(n,t);var r=n.prototype;return r.doOpen=function(){this.v()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.v=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e(t,{xd:this.xd},this.opts),new Y(tt,this.uri(),t)},n}(K);function tt(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||z))return new XMLHttpRequest}catch(t){}if(!n)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),it=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=nt?{}:_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;g(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;rMath.pow(2,21)-1){u.enqueue(d);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)t){u.enqueue(d);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=U();e.readable.pipeTo(n.writable),t.U=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.U.write(i).then((function(){e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ut.exec(t||""),u={},h=14;h--;)u[ht[h]]=s[h]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ct="function"==typeof addEventListener&&"function"==typeof removeEventListener,at=[];ct&&addEventListener("offline",(function(){at.forEach((function(t){return t()}))}),!1);var vt=function(t){function n(n,i){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r.M=0,r.I=-1,r.R=-1,r.L=-1,r._=1/0,n&&"object"===c(n)&&(i=n,n=null),n){var o=ft(n);i.hostname=o.host,i.secure="https"===o.protocol||"wss"===o.protocol,i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=ft(i.host).host);return $(r,i),r.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.D={},i.transports.forEach((function(t){var n=t.prototype.name;r.transports.push(n),r.D[n]=t})),r.opts=e({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r1))return this.writeBuffer;for(var t,n=1,i=0;i=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.L)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},i.W=function(){var t=this;if(!this._)return!0;var n=Date.now()>this._;return n&&(this._=0,R((function(){t.F("ping timeout")}),this.setTimeoutFn)),n},i.write=function(t,n,i){return this.J("message",t,n,i),this},i.send=function(t,n,i){return this.J("message",t,n,i),this},i.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},i.close=function(){var t=this,n=function(){t.F("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},i.B=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.F("transport error",t)},i.F=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Y),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ct&&(this.P&&removeEventListener("beforeunload",this.P,!1),this.$)){var i=at.indexOf(this.$);-1!==i&&at.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.M=0}},n}(I);vt.protocol=4;var lt=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Z=[],n}s(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r="object"===c(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return st[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return s(n,t),n}(lt);pt.protocol;var dt="function"==typeof ArrayBuffer,yt=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer},bt=Object.prototype.toString,wt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),gt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function mt(t){return dt&&(t instanceof ArrayBuffer||yt(t))||wt&&t instanceof Blob||gt&&t instanceof File}function kt(t,n){if(!t||"object"!==c(t))return!1;if(Array.isArray(t)){for(var i=0,r=t.length;i=0&&t.num1?e-1:0),s=1;s1?i-1:0),e=1;ei.l.retries&&(i.it.shift(),n&&n(t));else if(i.it.shift(),n){for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.it.length){var n=this.it[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}},o.packet=function(t){t.nsp=this.nsp,this.io.ct(t)},o.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(n){t.vt(n)})):this.vt(this.auth)},o.vt=function(t){this.packet({type:Bt.CONNECT,data:this.lt?e({pid:this.lt,offset:this.dt},t):t})},o.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},o.onclose=function(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this.yt()},o.yt=function(){var t=this;Object.keys(this.acks).forEach((function(n){if(!t.sendBuffer.some((function(t){return String(t.id)===n}))){var i=t.acks[n];delete t.acks[n],i.withError&&i.call(t,new Error("socket has been disconnected"))}}))},o.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}},o.onevent=function(t){var n=t.data||[];null!=t.id&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))},o.emitEvent=function(n){if(this.bt&&this.bt.length){var i,e=r(this.bt.slice());try{for(e.s();!(i=e.n()).done;){i.value.apply(this,n)}}catch(t){e.e(t)}finally{e.f()}}t.prototype.emit.apply(this,n),this.lt&&n.length&&"string"==typeof n[n.length-1]&&(this.dt=n[n.length-1])},o.ack=function(t){var n=this,i=!1;return function(){if(!i){i=!0;for(var r=arguments.length,e=new Array(r),o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}_t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*t);t=1&Math.floor(10*n)?t+i:t-i}return 0|Math.min(t,this.max)},_t.prototype.reset=function(){this.attempts=0},_t.prototype.setMin=function(t){this.ms=t},_t.prototype.setMax=function(t){this.max=t},_t.prototype.setJitter=function(t){this.jitter=t};var Dt=function(t){function n(n,i){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],n&&"object"===c(n)&&(i=n,n=void 0),(i=i||{}).path=i.path||"/socket.io",r.opts=i,$(r,i),r.reconnection(!1!==i.reconnection),r.reconnectionAttempts(i.reconnectionAttempts||1/0),r.reconnectionDelay(i.reconnectionDelay||1e3),r.reconnectionDelayMax(i.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=i.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new _t({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==i.timeout?2e4:i.timeout),r.st="closed",r.uri=n;var o=i.parser||xt;return r.encoder=new o.Encoder,r.decoder=new o.Decoder,r.et=!1!==i.autoConnect,r.et&&r.open(),r}s(n,t);var i=n.prototype;return i.reconnection=function(t){return arguments.length?(this.kt=!!t,t||(this.skipReconnect=!0),this):this.kt},i.reconnectionAttempts=function(t){return void 0===t?this.At:(this.At=t,this)},i.reconnectionDelay=function(t){var n;return void 0===t?this.jt:(this.jt=t,null===(n=this.backoff)||void 0===n||n.setMin(t),this)},i.randomizationFactor=function(t){var n;return void 0===t?this.Et:(this.Et=t,null===(n=this.backoff)||void 0===n||n.setJitter(t),this)},i.reconnectionDelayMax=function(t){var n;return void 0===t?this.Ot:(this.Ot=t,null===(n=this.backoff)||void 0===n||n.setMax(t),this)},i.timeout=function(t){return arguments.length?(this.Bt=t,this):this.Bt},i.maybeReconnectOnOpen=function(){!this.ot&&this.kt&&0===this.backoff.attempts&&this.reconnect()},i.open=function(t){var n=this;if(~this.st.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var i=this.engine,r=this;this.st="opening",this.skipReconnect=!1;var e=It(i,"open",(function(){r.onopen(),t&&t()})),o=function(i){n.cleanup(),n.st="closed",n.emitReserved("error",i),t?t(i):n.maybeReconnectOnOpen()},s=It(i,"error",o);if(!1!==this.Bt){var u=this.Bt,h=this.setTimeoutFn((function(){e(),o(new Error("timeout")),i.close()}),u);this.opts.autoUnref&&h.unref(),this.subs.push((function(){n.clearTimeoutFn(h)}))}return this.subs.push(e),this.subs.push(s),this},i.connect=function(t){return this.open(t)},i.onopen=function(){this.cleanup(),this.st="open",this.emitReserved("open");var t=this.engine;this.subs.push(It(t,"ping",this.onping.bind(this)),It(t,"data",this.ondata.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this)),It(this.decoder,"decoded",this.ondecoded.bind(this)))},i.onping=function(){this.emitReserved("ping")},i.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},i.ondecoded=function(t){var n=this;R((function(){n.emitReserved("packet",t)}),this.setTimeoutFn)},i.onerror=function(t){this.emitReserved("error",t)},i.socket=function(t,n){var i=this.nsps[t];return i?this.et&&!i.active&&i.connect():(i=new Lt(this,t,n),this.nsps[t]=i),i},i.wt=function(t){for(var n=0,i=Object.keys(this.nsps);n=this.At)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{var i=this.backoff.duration();this.ot=!0;var r=this.setTimeoutFn((function(){n.skipReconnect||(t.emitReserved("reconnect_attempt",n.backoff.attempts),n.skipReconnect||n.open((function(i){i?(n.ot=!1,n.reconnect(),t.emitReserved("reconnect_error",i)):n.onreconnect()})))}),i);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},i.onreconnect=function(){var t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},n}(I),Pt={};function $t(t,n){"object"===c(t)&&(n=t,t=void 0);var i,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+n,r.href=r.protocol+"://"+e+(i&&i.port===r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),e=r.source,o=r.id,s=r.path,u=Pt[o]&&s in Pt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?i=new Dt(e,n):(Pt[o]||(Pt[o]=new Dt(e,n)),i=Pt[o]),r.query&&!n.query&&(n.query=r.queryKey),i.socket(r.path,n)}return e($t,{Manager:Dt,Socket:Lt,io:$t,connect:$t}),$t})); //# sourceMappingURL=socket.io.min.js.map })(jQuery); \ No newline at end of file diff --git a/docassemble_webapp/docassemble/webapp/static/app/cm6.js b/docassemble_webapp/docassemble/webapp/static/app/cm6.js index 5de268c13..0986de119 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/cm6.js +++ b/docassemble_webapp/docassemble/webapp/static/app/cm6.js @@ -22890,9 +22890,10 @@ if (range != main && from != to && state.sliceDoc(range.from + fromOff, range.from + toOff) != state.sliceDoc(from, to)) return { range }; + let lines = state.toText(text); return { - changes: { from: range.from + fromOff, to: to == main.from ? range.to : range.from + toOff, insert: text }, - range: EditorSelection.cursor(range.from + fromOff + text.length) + changes: { from: range.from + fromOff, to: to == main.from ? range.to : range.from + toOff, insert: lines }, + range: EditorSelection.cursor(range.from + fromOff + lines.length) }; })), { scrollIntoView: true, userEvent: "input.complete" }); } @@ -23512,12 +23513,12 @@ return selected == this.selected || selected >= this.options.length ? this : new CompletionDialog(this.options, makeAttrs(id, selected), this.tooltip, this.timestamp, selected, this.disabled); } - static build(active, state, id, prev, conf) { + static build(active, state, id, prev, conf, didSetActive) { + if (prev && !didSetActive && active.some(s => s.isPending)) + return prev.setDisabled(); let options = sortOptions(active, state); - if (!options.length) { - return prev && active.some(a => a.state == 1 /* State.Pending */) ? - new CompletionDialog(prev.options, prev.attrs, prev.tooltip, prev.timestamp, prev.selected, true) : null; - } + if (!options.length) + return prev && active.some(a => a.isPending) ? prev.setDisabled() : null; let selected = state.facet(completionConfig).selectOnOpen ? 0 : -1; if (prev && prev.selected != selected && prev.selected != -1) { let selectedValue = prev.options[prev.selected].completion; @@ -23536,6 +23537,9 @@ map(changes) { return new CompletionDialog(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: changes.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled); } + setDisabled() { + return new CompletionDialog(this.options, this.attrs, this.tooltip, this.timestamp, this.selected, true); + } } class CompletionState { constructor(active, id, open) { @@ -23557,15 +23561,15 @@ }); if (active.length == this.active.length && active.every((a, i) => a == this.active[i])) active = this.active; - let open = this.open; + let open = this.open, didSet = tr.effects.some(e => e.is(setActiveEffect)); if (open && tr.docChanged) open = open.map(tr.changes); if (tr.selection || active.some(a => a.hasResult() && tr.changes.touchesRange(a.from, a.to)) || - !sameResults(active, this.active)) - open = CompletionDialog.build(active, state, this.id, open, conf); - else if (open && open.disabled && !active.some(a => a.state == 1 /* State.Pending */)) + !sameResults(active, this.active) || didSet) + open = CompletionDialog.build(active, state, this.id, open, conf, didSet); + else if (open && open.disabled && !active.some(a => a.isPending)) open = null; - if (!open && active.every(a => a.state != 1 /* State.Pending */) && active.some(a => a.hasResult())) + if (!open && active.every(a => !a.isPending) && active.some(a => a.hasResult())) active = active.map(a => a.hasResult() ? new ActiveSource(a.source, 0 /* State.Inactive */) : a); for (let effect of tr.effects) if (effect.is(setSelectedEffect)) @@ -23579,9 +23583,9 @@ if (a == b) return true; for (let iA = 0, iB = 0;;) { - while (iA < a.length && !a[iA].hasResult) + while (iA < a.length && !a[iA].hasResult()) iA++; - while (iB < b.length && !b[iB].hasResult) + while (iB < b.length && !b[iB].hasResult()) iB++; let endA = iA == a.length, endB = iB == b.length; if (endA || endB) @@ -23619,12 +23623,13 @@ : tr.docChanged ? 16 /* UpdateType.ResetIfTouching */ : 0 /* UpdateType.None */; } class ActiveSource { - constructor(source, state, explicitPos = -1) { + constructor(source, state, explicit = false) { this.source = source; this.state = state; - this.explicitPos = explicitPos; + this.explicit = explicit; } hasResult() { return false; } + get isPending() { return this.state == 1 /* State.Pending */; } update(tr, conf) { let type = getUpdateType(tr, conf), value = this; if ((type & 8 /* UpdateType.Reset */) || (type & 16 /* UpdateType.ResetIfTouching */) && this.touches(tr)) @@ -23634,7 +23639,7 @@ value = value.updateFor(tr, type); for (let effect of tr.effects) { if (effect.is(startCompletionEffect)) - value = new ActiveSource(value.source, 1 /* State.Pending */, effect.value ? cur(tr.state) : -1); + value = new ActiveSource(value.source, 1 /* State.Pending */, effect.value); else if (effect.is(closeCompletionEffect)) value = new ActiveSource(value.source, 0 /* State.Inactive */); else if (effect.is(setActiveEffect)) @@ -23645,16 +23650,15 @@ return value; } updateFor(tr, type) { return this.map(tr.changes); } - map(changes) { - return changes.empty || this.explicitPos < 0 ? this : new ActiveSource(this.source, this.state, changes.mapPos(this.explicitPos)); - } + map(changes) { return this; } touches(tr) { return tr.changes.touchesRange(cur(tr.state)); } } class ActiveResult extends ActiveSource { - constructor(source, explicitPos, result, from, to) { - super(source, 2 /* State.Result */, explicitPos); + constructor(source, explicit, limit, result, from, to) { + super(source, 3 /* State.Result */, explicit); + this.limit = limit; this.result = result; this.from = from; this.to = to; @@ -23669,17 +23673,16 @@ result = result.map(result, tr.changes); let from = tr.changes.mapPos(this.from), to = tr.changes.mapPos(this.to, 1); let pos = cur(tr.state); - if ((this.explicitPos < 0 ? pos <= from : pos < this.from) || - pos > to || !result || - (type & 2 /* UpdateType.Backspacing */) && cur(tr.startState) == this.from) + if (pos > to || !result || + (type & 2 /* UpdateType.Backspacing */) && (cur(tr.startState) == this.from || pos < this.limit)) return new ActiveSource(this.source, type & 4 /* UpdateType.Activate */ ? 1 /* State.Pending */ : 0 /* State.Inactive */); - let explicitPos = this.explicitPos < 0 ? -1 : tr.changes.mapPos(this.explicitPos); + let limit = tr.changes.mapPos(this.limit); if (checkValid(result.validFor, tr.state, from, to)) - return new ActiveResult(this.source, explicitPos, result, from, to); + return new ActiveResult(this.source, this.explicit, limit, result, from, to); if (result.update && - (result = result.update(result, from, to, new CompletionContext(tr.state, pos, explicitPos >= 0)))) - return new ActiveResult(this.source, explicitPos, result, result.from, (_a = result.to) !== null && _a !== void 0 ? _a : cur(tr.state)); - return new ActiveSource(this.source, 1 /* State.Pending */, explicitPos); + (result = result.update(result, from, to, new CompletionContext(tr.state, pos, false)))) + return new ActiveResult(this.source, this.explicit, limit, result, result.from, (_a = result.to) !== null && _a !== void 0 ? _a : cur(tr.state)); + return new ActiveSource(this.source, 1 /* State.Pending */, this.explicit); } map(mapping) { if (mapping.empty) @@ -23687,7 +23690,7 @@ let result = this.result.map ? this.result.map(this.result, mapping) : this.result; if (!result) return new ActiveSource(this.source, 0 /* State.Inactive */); - return new ActiveResult(this.source, this.explicitPos < 0 ? -1 : mapping.mapPos(this.explicitPos), this.result, mapping.mapPos(this.from), mapping.mapPos(this.to, 1)); + return new ActiveResult(this.source, this.explicit, mapping.mapPos(this.limit), this.result, mapping.mapPos(this.from), mapping.mapPos(this.to, 1)); } touches(tr) { return tr.changes.touchesRange(this.from, this.to); @@ -23799,7 +23802,7 @@ this.pendingStart = false; this.composing = 0 /* CompositionState.None */; for (let active of view.state.field(completionState).active) - if (active.state == 1 /* State.Pending */) + if (active.isPending) this.startQuery(active); } update(update) { @@ -23836,7 +23839,7 @@ if (update.transactions.some(tr => tr.effects.some(e => e.is(startCompletionEffect)))) this.pendingStart = true; let delay = this.pendingStart ? 50 : conf.activateOnTypingDelay; - this.debounceUpdate = cState.active.some(a => a.state == 1 /* State.Pending */ && !this.running.some(q => q.active.source == a.source)) + this.debounceUpdate = cState.active.some(a => a.isPending && !this.running.some(q => q.active.source == a.source)) ? setTimeout(() => this.startUpdate(), delay) : -1; if (this.composing != 0 /* CompositionState.None */) for (let tr of update.transactions) { @@ -23851,13 +23854,15 @@ this.pendingStart = false; let { state } = this.view, cState = state.field(completionState); for (let active of cState.active) { - if (active.state == 1 /* State.Pending */ && !this.running.some(r => r.active.source == active.source)) + if (active.isPending && !this.running.some(r => r.active.source == active.source)) this.startQuery(active); } + if (this.running.length && cState.open && cState.open.disabled) + this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig).updateSyncTime); } startQuery(active) { let { state } = this.view, pos = cur(state); - let context = new CompletionContext(state, pos, active.explicitPos == pos, this.view); + let context = new CompletionContext(state, pos, active.explicit, this.view); let pending = new RunningQuery(active, context); this.running.push(pending); Promise.resolve(active.source(context)).then(result => { @@ -23884,14 +23889,16 @@ clearTimeout(this.debounceAccept); this.debounceAccept = -1; let updated = []; - let conf = this.view.state.facet(completionConfig); + let conf = this.view.state.facet(completionConfig), cState = this.view.state.field(completionState); for (let i = 0; i < this.running.length; i++) { let query = this.running[i]; if (query.done === undefined) continue; this.running.splice(i--, 1); if (query.done) { - let active = new ActiveResult(query.active.source, query.active.explicitPos, query.done, query.done.from, (_a = query.done.to) !== null && _a !== void 0 ? _a : cur(query.updates.length ? query.updates[0].startState : this.view.state)); + let pos = cur(query.updates.length ? query.updates[0].startState : this.view.state); + let limit = Math.min(pos, query.done.from + (query.active.explicit ? 0 : 1)); + let active = new ActiveResult(query.active.source, query.active.explicit, limit, query.done, query.done.from, (_a = query.done.to) !== null && _a !== void 0 ? _a : pos); // Replay the transactions that happened since the start of // the request and see if that preserves the result for (let tr of query.updates) @@ -23901,15 +23908,15 @@ continue; } } - let current = this.view.state.field(completionState).active.find(a => a.source == query.active.source); - if (current && current.state == 1 /* State.Pending */) { + let current = cState.active.find(a => a.source == query.active.source); + if (current && current.isPending) { if (query.done == null) { // Explicitly failed. Should clear the pending status if it // hasn't been re-set in the meantime. let active = new ActiveSource(query.active.source, 0 /* State.Inactive */); for (let tr of query.updates) active = active.update(tr, conf); - if (active.state != 1 /* State.Pending */) + if (!active.isPending) updated.push(active); } else { @@ -23918,7 +23925,7 @@ } } } - if (updated.length) + if (updated.length || cState.open && cState.open.disabled) this.view.dispatch({ effects: setActiveEffect.of(updated) }); } }, { @@ -24600,7 +24607,7 @@ /** Basic keybindings for autocompletion. - - Ctrl-Space: [`startCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.startCompletion) + - Ctrl-Space (and Alt-\` on macOS): [`startCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.startCompletion) - Escape: [`closeCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.closeCompletion) - ArrowDown: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(true)` - ArrowUp: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(false)` @@ -24610,6 +24617,7 @@ */ const completionKeymap = [ { key: "Ctrl-Space", run: startCompletion }, + { mac: "Alt-`", run: startCompletion }, { key: "Escape", run: closeCompletion }, { key: "ArrowDown", run: /*@__PURE__*/moveCompletionSelection(true) }, { key: "ArrowUp", run: /*@__PURE__*/moveCompletionSelection(false) }, @@ -27789,7 +27797,7 @@ } } } - _properties = names.sort().map(name => ({ type: "property", label: name })); + _properties = names.sort().map(name => ({ type: "property", label: name, apply: name + ": " })); } return _properties || []; } @@ -27900,6 +27908,11 @@ "p", "pre", "ruby", "section", "select", "small", "source", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "tr", "u", "ul" ].map(name => ({ type: "type", label: name })); + const atRules = /*@__PURE__*/[ + "@charset", "@color-profile", "@container", "@counter-style", "@font-face", "@font-feature-values", + "@font-palette-values", "@import", "@keyframes", "@layer", "@media", "@namespace", "@page", + "@position-try", "@property", "@scope", "@starting-style", "@supports", "@view-transition" + ].map(label => ({ type: "keyword", label })); const identifier$1 = /^(\w[\w-]*|-\w[\w-]*|)$/, variable = /^-(-[\w-]*)?$/; function isVarArg(node, doc) { var _a; @@ -27980,6 +27993,8 @@ return { from: node.from, options: properties(), validFor: identifier$1 }; return { from: node.from, options: tags, validFor: identifier$1 }; } + if (node.name == "AtKeyword") + return { from: node.from, options: atRules, validFor: identifier$1 }; if (!context.explicit) return null; let above = node.resolve(pos), before = above.childBefore(pos); @@ -31245,7 +31260,7 @@ }; function getContext(node, doc) { let nodes = []; - for (let cur = node; cur && cur.name != "Document"; cur = cur.parent) { + for (let cur = node; cur; cur = cur.parent) { if (cur.name == "ListItem" || cur.name == "Blockquote" || cur.name == "FencedCode") nodes.push(cur); } @@ -31336,7 +31351,7 @@ const insertNewlineContinueMarkup = ({ state, dispatch }) => { let tree = syntaxTree(state), { doc } = state; let dont = null, changes = state.changeByRange(range => { - if (!range.empty || !markdownLanguage.isActiveAt(state, range.from)) + if (!range.empty || !markdownLanguage.isActiveAt(state, range.from, 0)) return dont = { range }; let pos = range.from, line = doc.lineAt(pos); let context = getContext(tree.resolveInner(pos, -1), doc); @@ -31519,11 +31534,11 @@ Markdown language support. */ function markdown(config = {}) { - let { codeLanguages, defaultCodeLanguage, addKeymap = true, base: { parser } = commonmarkLanguage, completeHTMLTags = true } = config; + let { codeLanguages, defaultCodeLanguage, addKeymap = true, base: { parser } = commonmarkLanguage, completeHTMLTags = true, htmlTagLanguage = htmlNoMatch } = config; if (!(parser instanceof MarkdownParser)) throw new RangeError("Base parser provided to `markdown` should be a Markdown parser"); let extensions = config.extensions ? [config.extensions] : []; - let support = [htmlNoMatch.support], defaultCode; + let support = [htmlTagLanguage.support], defaultCode; if (defaultCodeLanguage instanceof LanguageSupport) { support.push(defaultCodeLanguage.support); defaultCode = defaultCodeLanguage.language; @@ -31532,7 +31547,7 @@ defaultCode = defaultCodeLanguage; } let codeParser = codeLanguages || defaultCode ? getCodeParser(codeLanguages, defaultCode) : undefined; - extensions.push(parseCode({ codeParser, htmlParser: htmlNoMatch.language.parser })); + extensions.push(parseCode({ codeParser, htmlParser: htmlTagLanguage.language.parser })); if (addKeymap) support.push(Prec.high(keymap.of(markdownKeymap))); let lang = mkLang(parser.configure(extensions)); diff --git a/docassemble_webapp/docassemble/webapp/static/app/cm6.min.js b/docassemble_webapp/docassemble/webapp/static/app/cm6.min.js index ecefd5d93..d12f757e2 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/cm6.min.js +++ b/docassemble_webapp/docassemble/webapp/static/app/cm6.min.js @@ -1,15 +1,15 @@ -(function(){"use strict";class f{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=zt(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,1|2),this.decompose(t,this.length,s,1),Fe.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=zt(this,e,t);let n=[];return this.decompose(e,t,n,0),Fe.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let s=this.scanIdentical(e,1),o=this.length-this.scanIdentical(e,-1),t=new qn(this),n=new qn(e);for(let e=s,i=s;;){if(t.next(e),n.next(e),e=0,t.lineBreak!=n.lineBreak||t.done!=n.done||t.value!=n.value)return!1;if(i+=t.value.length,t.done||i>=o)return!0}}iter(e=1){return new qn(this,e)}iterRange(e,t=this.length){return new ic(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new uc(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?f.empty:e.length<=32?new E(e):Fe.from(E.split(e,[]))}}class E extends f{constructor(e,t=$9(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let i=0;;i++){let a=this.text[i],o=s+a.length;if((t?n:o)>=e)return new w9(s,o,n,a);s=o+1,n++}}decompose(e,t,n,s){let o=e<=0&&t>=this.length?this:new E(oc(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let t=n.pop(),e=rs(o.text,t.text.slice(),0,o.length);if(e.length<=32)n.push(new E(e,t.length+o.length));else{let t=e.length>>1;n.push(new E(e.slice(0,t)),new E(e.slice(t)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof E))return super.replace(e,t,n);[e,t]=zt(this,e,t);let s=rs(this.text,rs(n.text,oc(this.text,0,e)),t),o=this.length+n.length-(t-e);return s.length<=32?new E(s,o):Fe.from(E.split(s,[]),o)}sliceString(e,t=this.length,n=` -`){[e,t]=zt(this,e,t);let s="";for(let o=0,i=0;o<=t&&ie&&i&&(s+=n),eo&&(s+=a.slice(Math.max(0,e-o),t-o)),o=r+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let o of e)n.push(o),s+=o.length+1,n.length==32&&(t.push(new E(n,s)),n=[],s=-1);return s>-1&&t.push(new E(n,s)),t}}class Fe extends f{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,s){for(let i=0;;i++){let o=this.children[i],a=s+o.length,r=n+o.lines-1;if((t?r:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=r+1}}decompose(e,t,n,s){for(let a=0,o=0;o<=t&&a=o){let a=s&((o<=e?1:0)|(i>=t?2:0));o>=e&&i<=t&&!a?n.push(r):r.decompose(e-o,t-o,n,a)}o=i+1}}replace(e,t,n){if([e,t]=zt(this,e,t),n.lines=s&&t<=a){let r=i.replace(e-s,t-s,n),c=this.lines-i.lines+r.lines;if(r.lines>5-1&&r.lines>c>>5+1){let s=this.children.slice();return s[o]=r,new Fe(s,this.length-(t-e)+n.length)}return super.replace(s,a,r)}s=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=` -`){[e,t]=zt(this,e,t);let s="";for(let i=0,o=0;ie&&i&&(s+=n),eo&&(s+=a.sliceString(e-o,t-o,n)),o=r+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Fe))return 0;let n=0,[s,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,o+=t){if(s==i||o==a)return n;let r=this.children[s],c=e.children[o];if(r!=c)return n+r.scanIdentical(c,t);n+=r.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let a=0;for(let t of e)a+=t.lines;if(a<32){let n=[];for(let t of e)t.flatten(n);return new E(n,t)}let r=Math.max(32,a>>5),u=r<<1,l=r>>1,o=[],s=0,i=-1,n=[];function d(e){let t;if(e.lines>u&&e instanceof Fe)for(let t of e.children)d(t);else e.lines>l&&(s>l||!s)?(c(),o.push(e)):e instanceof E&&s&&(t=n[n.length-1])instanceof E&&e.lines+t.lines<=32?(s+=e.lines,i+=e.length+1,n[n.length-1]=new E(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&c(),s+=e.lines,i+=e.length+1,n.push(e))}function c(){if(s==0)return;o.push(n.length==1?n[0]:Fe.from(n,i)),i=-1,s=n.length=0}for(let t of e)d(t);return c(),o.length==1?o[0]:new Fe(o,t)}}f.empty=new E([""],0);function $9(e){let t=-1;for(let n of e)t+=n.length+1;return t}function rs(e,t,n=0,s=1e9){for(let i=0,a=0,c=!0;a=n&&(r>s&&(o=o.slice(0,s-i)),i0?1:(e instanceof E?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],i=this.offsets[n],o=i>>1,a=s instanceof E?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(s instanceof E){let i=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=s.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof E?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ic{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new qn(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class uc{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(f.prototype[Symbol.iterator]=function(){return this.iter()},qn.prototype[Symbol.iterator]=ic.prototype[Symbol.iterator]=uc.prototype[Symbol.iterator]=function(){return this});let w9=class Line{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}};function zt(e,t,n){return t=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,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=1;ee)return Rt[t-1]<=e;return!1}function fc(e){return e>=127462&&e<=127487}const _c=8205;function L(e,t,n=!0,s=!0){return(n?Cc:a9)(e,t,s)}function Cc(e,t,n){if(t==e.length)return t;t&&Fc(e.charCodeAt(t))&&zc(e.charCodeAt(t-1))&&t--;let s=N(e,t);for(t+=ne(s);t=0&&fc(N(e,n));)s++,n-=2;if(s%2==0)break;t+=2}else break}return t}function a9(e,t,n){for(;t>0;){let s=Cc(e,t-2,n);if(s=56320&&e<57344}function zc(e){return e>=55296&&e<56320}function N(e,t){let n=e.charCodeAt(t);if(!zc(n)||t+1==e.length)return n;let s=e.charCodeAt(t+1);return Fc(s)?(n-55296<<10)+(s-56320)+65536:n}function xr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function ne(e){return e<65536?1:2}const mr=/\r\n?|\n/;var O,Ae,Kt,nd,ad,M,gi,i,b,y,w,P,Va,n,z=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(z||(z={}));class Ne{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return o+(e-s);o+=r}else{if(n!=z.Simple&&i>=e&&(n==z.TrackDel&&se||n==z.TrackBefore&&se))return null;if(i>e||i==e&&t<0&&!r)return e==s||t<0?o:o+c;o+=c}s=i}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return o}touchesRange(e,t=e){for(let s=0,n=0;s=0&&n<=t&&o>=e)return!(nt)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ne(e)}static create(e){return new Ne(e)}}class F extends Ne{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return lr(this,(t,n,s,o,i)=>e=e.replace(s,s+(n-t),i),!1),e}mapDesc(e,t=!1){return cr(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,i=0;s=0){t[s]=a,t[s+1]=o;let r=s>>1;for(;n.length0&&Ge(o,n,t.text),t.forward(e),i+=e}let c=e[a++];for(;i>1].toJSON()))}return e}static of(e,t,n){let o=[],a=[],i=0,s=null;function r(e=!1){if(!e&&!o.length)return;ic||s<0||c>t)throw new RangeError(`Invalid change range ${s} to ${c} (in doc of length ${t})`);let d=l?typeof l=="string"?f.of(l.split(n||mr)):l:f.empty,u=d.length;if(s==c&&u==0)return;si&&B(o,s-i,-1),B(o,c-s,u),Ge(a,o,d),i=c}}return c(e),r(!s),s}static empty(e){return new F(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],t=[];for(let o=0;ot&&typeof e!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");else if(s.length==1)n.push(s[0],0);else{for(;t.length=0&&n<=0&&n==e[o+1]?e[o]+=t:t==0&&e[o]==0?e[o+1]+=n:s?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function Ge(e,t,n){if(n.length==0)return;let s=t.length-2>>1;if(s>1])),n||o==e.sections.length||e.sections[o+1]<0)break;r=e.sections[o++],c=e.sections[o++]}t(i,l,a,d,u),i=l,a=d}}}function cr(e,t,n,s=!1){let a=[],r=s?[]:null,o=new ln(e),i=new ln(t);for(let e=-1;;)if(o.ins==-1&&i.ins==-1){let e=Math.min(o.len,i.len);B(a,e,-1),o.forward(e),i.forward(e)}else if(i.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(i.len=0&&e=0){let n=0,t=o.len;for(;t;)if(i.ins==-1){let e=Math.min(t,i.len);n+=e,t-=e,i.forward(e)}else if(i.ins==0&&i.lent||s.ins>=0&&s.len>t)&&(e||i.length>n),o.forward2(t),s.forward(t)}}}class ln{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?f.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?f.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class At{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new At(n,s,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return t.range(e,n);let s=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return t.range(this.anchor,s)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return t.range(e.anchor,e.head)}static create(e,t,n){return new At(e,t,n)}}class t{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,n=-1){return e.empty?this:t.create(this.ranges.map(t=>t.map(e,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map(e=>At.fromJSON(e)),e.main)}static single(e,n=e){return new t([t.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let o=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let s=e[n];e.sort((e,t)=>e.from-t.from),n=e.indexOf(s);for(let s=1;so.head?t.range(r,a):t.range(a,r))}}return new t(e,n)}}function Lc(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let nr=0;class a{constructor(e,t,n,s,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=nr++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new a(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:tr),!!e.static,e.enables)}of(e){return new Es([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Es(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Es(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function tr(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class Es{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=nr++}dynamicSlot(e){var o;let n=this.value,s=this.facet.compareInput,i=this.id,t=e[i]>>1,r=this.type==2,c=!1,l=!1,d=[];for(let t of this.dependencies)t=="doc"?c=!0:t=="selection"?l=!0:(((o=e[t.id])!==null&&o!==void 0?o:1)&1)==0&&d.push(e[t.id]);return{create(e){return e.values[t]=n(e),1},update(e,o){if(c&&o.docChanged||l&&(o.docChanged||o.selection)||Ga(e,d)){let o=n(e);if(r?!Rc(o,e.values[t],s):!s(o,e.values[t]))return e.values[t]=o,1}return 0},reconfigure:(e,o)=>{let c,l=o.config.address[i];if(l!=null){{let i=Ms(o,l);if(this.dependencies.every(t=>t instanceof a?o.facet(t)===e.facet(t):!(t instanceof R)||o.field(t,!1)==e.field(t,!1))||(r?Rc(c=n(e),i,s):s(c=n(e),i)))return e.values[t]=i,0}}else c=n(e);return e.values[t]=c,1}}}}function Rc(e,t,n){if(e.length!=t.length)return!1;for(let s=0;se[t.id]),a=n.map(e=>e.type),r=o.filter(e=>!(e&1)),s=e[t.id]>>1;function i(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Kc).find(e=>e.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let s=e.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>n.config.address[this.id]!=null?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Kc.of({field:this,create:e})]}get extension(){return this}}const jt={lowest:4,low:3,default:2,high:1,highest:0};function kn(e){return t=>new Gc(t,e)}const Re={highest:kn(jt.highest),high:kn(jt.high),default:kn(jt.default),low:kn(jt.low),lowest:kn(jt.lowest)};class Gc{constructor(e,t){this.inner=e,this.prec=t}}class Ya{of(e){return new Ka(this,e)}reconfigure(e){return Ya.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Ka{constructor(e,t){this.compartment=e,this.inner=t}}class Wa{constructor(e,t,n,s,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],a=Object.create(null),c=new Map;for(let n of jv(e,t,c))n instanceof R?r.push(n):(a[n.facet.id]||(a[n.facet.id]=[])).push(n);let s=Object.create(null),i=[],o=[];for(let e of r)s[e.id]=o.length<<1,o.push(t=>e.slot(t));let l=n?.config.facets;for(let r in a){let t=a[r],e=t[0].facet,c=l&&l[r]||[];if(t.every(e=>e.type==0))if(s[e.id]=i.length<<1|1,tr(c,t))i.push(n.facet(e));else{let s=e.combine(t.map(e=>e.value));i.push(n&&e.compare(s,n.facet(e))?n.facet(e):s)}else{for(let e of t)e.type==0?(s[e.id]=i.length<<1|1,i.push(e.value)):(s[e.id]=o.length<<1,o.push(t=>e.dynamicSlot(t)));s[e.id]=o.length<<1,o.push(n=>xv(n,e,t))}}let d=o.map(e=>e(s));return new Wa(e,c,d,s,i,a)}}function jv(e,t,n){let o=[[],[],[],[],[]],i=new Map;function s(e,a){let r=i.get(e);if(r!=null){if(r<=a)return;let t=o[r].indexOf(e);t>-1&&o[r].splice(t,1),e instanceof Ka&&n.delete(e.compartment)}if(i.set(e,a),Array.isArray(e))for(let t of e)s(t,a);else if(e instanceof Ka){if(n.has(e.compartment))throw new RangeError(`Duplicate use of compartment in extensions`);let o=t.get(e.compartment)||e.inner;n.set(e.compartment,o),s(o,a)}else if(e instanceof Gc)s(e.inner,e.prec);else if(e instanceof R)o[a].push(e),e.provides&&s(e.provides,a);else if(e instanceof Es)o[a].push(e),e.facet.extensions&&s(e.facet.extensions,jt.default);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(t,a)}}return s(e,jt.default),o.reduce((e,t)=>e.concat(t))}function Bn(e,t){if(t&1)return 2;let n=t>>1,s=e.status[n];if(s==4)throw new Error("Cyclic dependency between fields and/or facets");if(s&2)return s;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function Ms(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const Qc=a.define(),Na=a.define({combine:e=>e.some(e=>e),static:!0}),Jc=a.define({combine:e=>e.length?e[0]:void 0,static:!0}),tl=a.define(),nl=a.define(),sl=a.define(),ol=a.define({combine:e=>!!e.length&&e[0]});class $e{constructor(e,t){this.type=e,this.value=t}static define(){return new ov}}class ov{of(e){return new $e(this,e)}}class $7{constructor(e){this.map=e}of(e){return new d(this,e)}}class d{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new d(this.type,t)}is(e){return this.type==e}static define(e={}){return new $7(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let o of e){let s=o.map(t);s&&n.push(s)}return n}}d.reconfigure=d.define(),d.appendConfig=d.define();class S{constructor(e,t,n,s,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&Lc(n,t.newLength),o.some(e=>e.type==S.time)||(this.annotations=o.concat(S.time.of(Date.now())))}static create(e,t,n,s,o,i){return new S(e,t,n,s,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(S.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}S.time=$e.define(),S.userEvent=$e.define(),S.addToHistory=$e.define(),S.remote=$e.define();function B7(e,t){let n=[];for(let i=0,s=0;;){let a,o;if(i=e[i]))a=e[i++],o=e[i++];else if(s=0;o--){let t=s[o](e);t instanceof S?e=t:Array.isArray(t)&&t.length==1&&t[0]instanceof S?e=t[0]:e=xl(n,Xt(t),!1)}return e}function p7(e){let n=e.startState,s=n.facet(sl),t=e;for(let o=s.length-1;o>=0;o--){let i=s[o](e);i&&Object.keys(i).length&&(t=yl(t,xa(n,i,e.changes.newLength),!0))}return t==e?e:S.create(n,e.changes,e.selection,t.effects,t.annotations,t.scrollIntoView)}const f7=[];function Xt(e){return e==null?f7:Array.isArray(e)?e:[e]}O=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(O||(O={}));const m7=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _a;try{_a=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function u7(e){if(_a)return _a.test(e);for(let n=0;n"\x80"&&(t.toUpperCase()!=t.toLowerCase()||m7.test(t)))return!0}return!1}function c7(e){return t=>{if(!/\S/.test(t))return O.Space;if(u7(t))return O.Word;for(let n=0;n-1)return O.Word;return O.Other}}class h{constructor(e,t,n,s,o,i){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;es.set(t,e)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(d.reconfigure)?(t=null,n=o.value):o.is(d.appendConfig)&&(t=null,n=Xt(n).concat(o.value));let o;if(t)o=e.startState.values.slice();else{t=Wa.resolve(n,s,this);let e=new h(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null);o=e.values}let i=e.startState.facet(Na)?e.newSelection:e.newSelection.asSingle();new h(t,e.newDoc,i,o,(t,n)=>n.update(t,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:t.cursor(n.from+e.length)}))}changeByRange(e){let s=this.selection,i=e(s.ranges[0]),n=this.changes(i.changes),o=[i.range],a=Xt(i.effects);for(let t=1;tn.spec.fromJSON(i,e)))}return h.create({doc:e.doc,selection:t.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=Wa.resolve(e.extensions||[],new Map),o=e.doc instanceof f?e.doc:f.of((e.doc||"").split(n.staticFacet(h.lineSeparator)||mr)),s=e.selection?e.selection instanceof t?e.selection:t.single(e.selection.anchor,e.selection.head):t.single(0);return Lc(s,o.length),n.staticFacet(Na)||(s=s.asSingle()),new h(n,o,s,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(h.tabSize)}get lineBreak(){return this.facet(h.lineSeparator)||` -`}get readOnly(){return this.facet(ol)}phrase(e,...t){for(let t of this.facet(h.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?e:t[s-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let o of this.facet(Qc))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&s.push(i[e]);return s}charCategorizer(e){return c7(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:o,from:i,length:r}=this.doc.lineAt(e),a=this.charCategorizer(e),n=e-i,s=e-i;for(;n>0;){let e=L(o,n,!1);if(a(o.slice(e,n))!=O.Word)break;n=e}for(;se.length?e[0]:4}),h.lineSeparator=Jc,h.readOnly=ol,h.phrases=a.define({compare(e,t){let n=Object.keys(e),s=Object.keys(t);return n.length==s.length&&n.every(n=>e[n]==t[n])}}),h.languageData=Qc,h.changeFilter=tl,h.transactionFilter=nl,h.transactionExtender=sl,Ya.reconfigure=d.define();function ye(e,t,n={}){let s={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=s[e];if(i===void 0)s[e]=o;else if(i===o||o===void 0);else if(Object.hasOwnProperty.call(n,e))s[e]=n[e](i,o);else throw new Error("Config merge conflict for field "+e)}for(let e in t)s[e]===void 0&&(s[e]=t[e]);return s}class ht{eq(e){return this==e}range(e,t=e){return pa.create(e,t,this)}}ht.prototype.startSide=ht.prototype.endSide=0,ht.prototype.point=!1,ht.prototype.mapMode=z.TrackDel;let pa=class Range{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new X(e,t,n)}};function ma(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class El{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let o=n?this.to:this.from;for(let i=s,r=o.length;;){if(i==r)return i;let a=i+r>>1,c=o[a]-e||(n?this.value[a].endSide:this.value[a].startSide)-t;if(a==i)return c>=0?i:r;c>=0?r=a:i=a+1}}between(e,t,n,s){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);ol||c==l&&r.startSide>0&&r.endSide<=0)continue;if((l-c||r.endSide-r.startSide)<0)continue;n<0&&(n=c),r.point&&(o=Math.max(o,l-c)),s.push(r),i.push(c-n),a.push(l-n)}return{mapped:s.length?new El(i,a,s,o):null,pos:n}}}class m{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new m(e,t,n,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:l=!1,filterFrom:r=0,filterTo:c=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(l&&(n=n.slice().sort(ma)),this.isEmpty)return n.length?m.of(n):this;let t=new zl(this,null,-1).goto(0),s=0,i=[],a=new vt;for(;t.value||s=0){let e=n[s++];a.addInner(e.from,e.to,e.value)||i.push(e)}else t.rangeIndex==1&&t.chunkIndexthis.chunkEnd(t.chunkIndex)||ct.to||c=s&&e<=s+i.length&&i.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}iter(e=0){return Ys.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ys.from(e).goto(t)}static compare(e,t,n,s,o=-1){let i=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),a=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),r=Tl(i,a,n),c=new wn(i,r,o),l=new wn(a,r,o);n.iterGaps((e,t,n)=>Dl(c,e,l,t,n,s)),n.empty&&n.length==0&&Dl(c,0,l,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let a=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),r=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(a.length!=r.length)return!1;if(!a.length)return!0;let c=Tl(a,r),o=new wn(a,c,0).goto(n),i=new wn(r,c,0).goto(n);for(;;){if(o.to!=i.to||!Ki(o.active,i.active)||o.point&&(!i.point||!o.point.eq(i.point)))return!1;if(o.to>s)return!0;o.next(),i.next()}}static spans(e,t,n,s,o=-1){let i=new wn(e,null,o).goto(t),r=t,a=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFromr&&(s.span(r,e,i.active,a),a=i.openEnd(e));if(i.to>n)return a+(i.point&&i.to>n?1:0);r=i.to,i.next()}}static of(e,t=!1){let n=new vt;for(let s of e instanceof pa?[e]:t?X5(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return m.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=m.empty;s=s.nextLayer)t=new m(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}m.empty=new m([],[],null,-1);function X5(e){if(e.length>1)for(let n=e[0],t=1;t0)return e.slice().sort(ma);n=s}return e}m.empty.nextLayer=m.empty;class vt{finishChunk(e){this.chunks.push(new El(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new vt)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(s<0)&&(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(m.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=m.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Tl(e,t,n){let s=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&s.push(new zl(i,t,n,o));return s.length==1?s[0]:new Ys(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)oa(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)oa(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),oa(this.heap,0)}}}function oa(e,t){for(let o=e[t];;){let n=(t<<1)+1;if(n>=e.length)break;let s=e[n];if(n+1=0&&(s=e[n+1],n++),o.compare(s)<0)break;e[n]=o,e[t]=s,t=n}}class wn{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ys.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Js(this.active,e),Js(this.activeTo,e),Js(this.activeRank,e),this.minActive=Nl(this.active,this.activeTo)}addActive(e){let t=0,{value:o,to:n,rank:s}=this.cursor;for(;t0;)t++;io(this.active,t,o),io(this.activeTo,t,n),io(this.activeRank,t,s),e&&io(e,t,this.cursor.from),this.minActive=Nl(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let e=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),e&&Js(e,s)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let t=this.cursor.value;if(t.point)if(n&&this.cursor.to==this.to&&this.cursor.from=0&&e[n]=0;n--){if(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n])}return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Dl(e,t,n,s,o,i){e.goto(t),n.goto(s);let r=s+o,a=s,c=s-t;for(;;){let t=e.to+c-n.to||e.endSide-n.endSide,s=t<0?e.to+c:n.to,o=Math.min(s,r);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Ki(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(a,o,e.point,n.point):o>a&&!Ki(e.active,n.active)&&i.compareRange(a,o,e.active,n.active),s>r)break;a=s,t<=0&&e.next(),t>=0&&n.next()}}function Ki(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function Nl(e,t){let n=-1,s=1e9;for(let o=0;o=t)return s;if(s==e.length)break;o+=e.charCodeAt(s)==9?n-o%n:1,s=L(e,s)}return s===!0?-1:e.length}const Ti="ͼ",Pl=typeof Symbol=="undefined"?"__"+Ti:Symbol.for(Ti),Ai=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Xl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class Ze{constructor(e,t){this.rules=[];let{finish:s}=t||{};function o(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function n(e,t,i,a){let c=[],r=/^@(\w+)\b/.exec(e[0]),l=r&&r[1]=="keyframes";if(r&&t==null)return i.push(e[0]+";");for(let s in t){let a=t[s];if(/&/.test(s))n(s.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),a,i);else if(a&&typeof a=="object"){if(!r)throw new RangeError("The value of a property ("+s+") should be a primitive value.");n(o(s),a,c,l)}else a!=null&&c.push(s.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+a+";")}(c.length||l)&&i.push((s&&!r&&!a?e.map(s):e).join(", ")+" {"+c.join(" ")+"}")}for(let t in e)n(o(t),e[t],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=Xl[Pl]||1;return Xl[Pl]=e+1,Ti+e.toString(36)}static mount(e,t,n){let s=e[Ai],o=n&&n.nonce;s?o&&s.setNonce(o):s=new zg(e,o),s.mount(Array.isArray(t)?t:[t],e)}}let Ql=new Map;class zg{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let t=Ql.get(n);if(t)return e[Ai]=t;this.sheet=new s.CSSStyleSheet,Ql.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ai]=this}mount(e,t){let s=this.sheet,o=0,n=0;for(let a=0;a-1&&(this.modules.splice(t,1),n--,t=-1),t==-1){if(this.modules.splice(n++,0,i),s)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},nd=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),ad=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),M=0;M<10;M++)Ae[48+M]=Ae[96+M]=String(M);for(M=1;M<=24;M++)Ae[M+111]="F"+M;for(M=65;M<=90;M++)Ae[M]=String.fromCharCode(M+32),Kt[M]=String.fromCharCode(M);for(gi in Ae)Kt.hasOwnProperty(gi)||(Kt[gi]=Ae[gi]);function xg(e){var n=nd&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ad&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",t=!n&&e.key||(e.shiftKey?Kt:Ae)[e.keyCode]||e.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function yn(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function fi(e,t){return!!t&&(e==t||e.contains(t.nodeType!=1?t.parentNode:t))}function yg(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function go(e,t){if(!t.anchorNode)return!1;try{return fi(e,t.anchorNode)}catch{return!1}}function sn(e){return e.nodeType==3?ut(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function nn(e,t,n,s){return!!n&&(Fd(e,t,n,s,-1)||Fd(e,t,n,s,1))}function ft(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function jo(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Fd(e,t,n,s,o){for(;;){if(e==n&&t==s)return!0;if(t==(o<0?0:Ve(e))){if(e.nodeName=="DIV")return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=ft(e)+(o<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=o<0?Ve(e):0}else return!1}}function Ve(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function yo(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Ip(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Rd(e,t){let n=t.width/e.offsetWidth,s=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(s>.995&&s<1.005||!isFinite(s)||Math.abs(t.height-e.offsetHeight)<1)&&(s=1),{scaleX:n,scaleY:s}}function zp(e,t,n,s,o,i,a,r){let c=e.ownerDocument,l=c.defaultView||window;for(let d=e,u=!1;d&&!u;)if(d.nodeType==1){let e,g=d==c.body,f=1,p=1;if(g)e=Ip(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(u=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let t=d.getBoundingClientRect();({scaleX:f,scaleY:p}=Rd(d,t),e={left:t.left,right:t.left+d.clientWidth*f,top:t.top,bottom:t.top+d.clientHeight*p})}let h=0,m=0;if(o=="nearest")t.top0&&t.bottom>e.bottom+m&&(m=t.bottom-e.bottom+m+a)):t.bottom>e.bottom&&(m=t.bottom-e.bottom+a,n<0&&t.top-m0&&t.right>e.right+h&&(h=t.right-e.right+h+i)):t.right>e.right&&(h=t.right-e.right+i,n<0&&t.lefto.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break}return{x:t,y:n}}class Mp{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Ve(t):0),n,Math.min(e.focusOffset,n?Ve(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let kt=null;function $d(e){if(e.setActive)return e.setActive();if(kt)return e.focus(kt);let t=[];for(let n=e;n;n=n.parentNode)if(t.push(n,n.scrollTop,n.scrollLeft),n==n.ownerDocument)break;if(e.focus(kt==null?{get preventScroll(){return kt={preventScroll:!0},!0}}:void 0),!kt){kt=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function iu(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&s>0)return{node:n,offset:s};if(n.nodeType==1&&s>0){if(n.contentEditable=="false")return null;n=n.childNodes[s-1],s=Ve(n)}else if(n.parentNode&&!jo(n))s=ft(n),n=n.parentNode;else return null}}function au(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&st)return l.domBoundsAround(e,t,r);if(d>=e&&s==-1&&(s=c,a=r),r>t&&l.dom.parentNode==this.dom){o=c,i=u;break}u=d,r=d+l.breakAfter}return{from:a,to:i<0?n+this.length:i,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){if(this.dom==e)return;this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=Wo){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function uu(e,t,n,s,o,i,a,r,c){let{children:d}=e,l=d.length?d[t]:null,u=i.length?i[i.length-1]:null,h=u?u.breakAfter:a;if(t==s&&l&&!a&&!h&&i.length<2&&l.merge(n,o,i.length?u:null,n==0,r,c))return;if(s0&&(!a&&i.length&&l.merge(n,l.length,i[0],!1,r,0)?l.breakAfter=i.shift().breakAfter:(n2);i={mac:Du||/Mac/.test(q.platform),windows:/Win/.test(q.platform),linux:/Linux|X11/.test(q.platform),ie:So,ie_version:wu?fa.documentMode||6:Vo?+Vo[1]:Io?+Io[1]:0,gecko:Cu,gecko_version:Cu?+(/Firefox\/(\d+)/.exec(q.userAgent)||[0,0])[1]:0,chrome:!!di,chrome_version:di?+di[1]:0,ios:Du,android:/Android\b/.test(q.userAgent),webkit:Eu,safari:Au,webkit_version:Eu?+(/\bAppleWebKit\/(\d+)/.exec(q.userAgent)||[0,0])[1]:0,tabSize:fa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const rf=256;class be extends j{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return!(this.flags&8||n&&(!(n instanceof be)||this.length-(t-e)+n.length>rf||n.flags&8))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new be(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new V(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return H6(this.dom,e,t)}}class nt extends j{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(Jd(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=4|2)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof nt&&n.mark.eq(this.mark))||e&&o<=0||te&&s.push(t=e&&(n=o),t=a,o++}let i=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new nt(this.mark,s,i)}domAtPos(e){return Wu(this,e)}coordsAt(e,t){return a1(this,e,t)}}function H6(e,t,n){let o=e.nodeValue.length;t>o&&(t=o);let l=t,a=t,s=0;t==0&&n<0||t==o&&n>=0?i.chrome||i.gecko||(t?(l--,s=1):a=0)?0:c.length-1];return i.safari&&!s&&r.width==0&&(r=Array.prototype.find.call(c,e=>e.width)||r),s?yo(r,s<0):r||null}class ct extends j{static create(e,t,n){return new ct(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=ct.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof ct)||!this.widget.compare(n.widget)||e>0&&o<=0||t0)?V.before(this.dom):V.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?n.length-1:0;;t+=o?-1:1)if(s=n[t],e>0?t==0:t==n.length-1||s.top0?V.before(this.dom):V.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(){return this.dom.getBoundingClientRect()}get overrideDOMText(){return f.empty}get isHidden(){return!0}}be.prototype.children=ct.prototype.children=an.prototype.children=Wo;function Wu(e,t){let o=e.dom,{children:n}=e,s=0;for(let e=0;se&&t0;e--){let t=n[e-1];if(t.dom.parentNode==o)return t.domAtPos(t.length)}for(let e=s;e0&&t instanceof nt&&s.length&&(o=s[s.length-1])instanceof nt&&o.mark.eq(t.mark)?Yu(o,t.children[0],n-1):(s.push(t),t.setParent(e)),e.length+=t.length}function a1(e,t,n){let o=null,a=-1,s=null,r=-1;function c(e,t){for(let u=0,i=0;u=t&&(l.children.length?c(l,t-i):(!s||s.isHidden&&n>0)&&(d>t||i==d&&l.getSide()>0)?(s=l,r=t-i):(i-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of s)if(i!=n&&(o.indexOf(i)==-1||e[i]!==t[i]))return!1;return!0}function Pi(e,t,n){let s=!1;if(t)for(let o in t)n&&o in n||(s=!0,o=="style"?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(s=!0,o=="style"?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return s}function g6(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new dt(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:o,end:i}=g1(e,t);n=(o?t?-3e8:-1:5e8)-1,s=(i?t?2e8:1:-6e8)+1}return new dt(e,n,s,t,e.widget||null,!0)}static line(e){return new Qs(e)}static set(e,t=!1){return m.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}c.none=m.empty;class eo extends c{constructor(e){let{start:t,end:n}=g1(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof eo&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&no(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}eo.prototype.point=!1;class Qs extends c{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Qs&&this.spec.class==e.spec.class&&no(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Qs.prototype.mapMode=z.TrackBefore,Qs.prototype.point=!0;class dt extends c{constructor(e,t,n,s,o,i){super(t,n,o,e),this.block=s,this.isReplace=i,this.mapMode=s?t<=0?z.TrackBefore:z.TrackAfter:z.TrackDel}get type(){return this.startSide!=this.endSide?P.WidgetRange:this.startSide<=0?P.WidgetBefore:P.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof dt&&u6(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}dt.prototype.point=!0;function g1(e,t=!1){let{inclusiveStart:n,inclusiveEnd:s}=e;return n==null&&(n=e.inclusive),s==null&&(s=e.inclusive),{start:n??t,end:s??t}}function u6(e,t){return e==t||!!(e&&t&&e.compare(t))}function na(e,t,n,s=0){let o=n.length-1;o>=0&&n[o]+s>=e?n[o]=Math.max(n[o],t):n.push(e,t)}class k extends j{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,o,i){if(n){if(!(n instanceof k))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),gu(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let n=new k;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:t,off:s}=this.childPos(e);s&&(n.append(this.children[t].split(s),0),this.children[t].merge(s,this.children[t].length,null,!1,0,0),t++);for(let e=t;e0&&this.children[t-1].length==0;)this.children[--t].destroy();return this.children.length=t,this.markDirty(),this.length=e,n}transferDOM(e){if(!this.dom)return;this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null}setDeco(e){no(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Yu(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Fi(t,this.attrs||{})),n&&(this.attrs=Fi({class:n},this.attrs||{}))}domAtPos(e){return Wu(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=4|2)}sync(e,t){this.dom?this.flags&4&&(Jd(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Pi(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(var s;n&&j.get(n)instanceof nt;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((s=j.get(n))===null||s===void 0?void 0:s.isEditable)==!1&&(!i.ios||!this.children.some(e=>e instanceof be))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof be)||/[^ -~]/.test(n.text))return null;let s=sn(n.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=a1(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(n instanceof k)return n;if(o>t)break}i=o+n.breakAfter}return null}}class st extends j{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof st)||!this.widget.compare(n.widget)||e>0&&o<=0||t0)}}class sa extends Le{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class $s{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof st&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new k),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Vs(new an(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof st)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Vs(new be(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof dt){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof dt)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new st(n.widget||Bt.block,a,n));else{let i=ct.create(n.widget||Bt.inline,a,a?0:n.startSide),r=this.atCursorPos&&!i.isEditable&&o<=s.length&&(e0),c=!i.isEditable&&(es.length||n.startSide<=0),l=this.getLine();this.pendingBuffer==2&&!r&&!i.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),r&&(l.append(Vs(new an(1),s),o),o=s.length+Math.max(0,o-s.length)),l.append(Vs(i,s),o),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,s,o){let i=new $s(e,t,n,o);return i.openEnd=m.spans(s,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function Vs(e,t){for(let n of t)e=new nt(n,[e],e.length);return e}class Bt extends Le{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Bt.inline=new Bt("span"),Bt.block=new Bt("div"),y=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(y||(y={}));const bt=y.LTR,va=y.RTL;function v1(e){let t=[];for(let n=0;n=t){if(i.level==n)return a;(o<0||(s!=0?s<0?i.fromt:e[o].level>i.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function S1(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;e-=3)if(we[e+1]==-n){let n=we[e+2],s=n&2?o:n&4?n&1?i:o:0;s&&(v[t]=v[we[e]]=s),r=e;break}}else if(we.length==189)break;else we[r++]=t,we[r++]=a,we[r++]=c;else if((s=v[t])==2||s==1){let e=s==o;c=e?0:1;for(let t=r-3;t>=0;t-=3){let n=we[t+2];if(n&2)break;if(e)we[t+2]|=2;else{if(n&4)break;we[t+2]|=4}}}}}function Rf(e,t,n,s){for(let o=0,a=s;o<=n.length;o++){let r=o?n[o-1].to:e,i=oc;)s==i&&(s=n[--t].from,i=t?n[t-1].to:e),v[--s]=u;c=r}else a=l,c++}}}function wr(e,t,n,s,o,i,a){let r=s%2?2:1;if(s%2==o%2)for(let c=t,d=0;cc&&a.push(new Je(c,t.from,m));let n=t.direction==bt!=!(m%2);Or(e,n?s+1:s,o,t.inner,t.from,t.to,a),c=t.to}l=t.to}else if(l==n||(u?v[l]!=r:v[l]==r))break;else l++;h?wr(e,c,l,s+1,o,h,a):ct;){let u=!0,f=!1;if(!d||c>i[d-1].to){let e=v[c-1];e!=r&&(u=!1,f=e==16)}let h=!u&&r==1?[]:null,m=u?s:s+1,l=c;run:for(;;)if(d&&l==i[d-1].to){if(f)break run;let n=i[--d];if(!u)for(let e=n.from,s=d;;){if(e==t)break run;if(s&&i[s-1].to==e)e=i[--s].from;else if(v[e-1]==r)break run;else break}if(h)h.push(n);else{n.tov.length;)v[v.length]=256;let s=[],o=t==bt?0:1;return Or(e,o,o,n,0,e.length,s),s}function Z1(e){return[new Je(0,e,0)]}let s4="";function q8(e,n,s,o,i){var h;let c=o.head-e.from,l=Je.find(n,c,(h=o.bidiLevel)!==null&&h!==void 0?h:-1,o.assoc),a=n[l],u=a.side(i,s);if(c==u){let e=l+=i?1:-1;if(e<0||e>=n.length)return null;a=n[l=e],c=a.side(!i,s),u=a.side(i,s)}let r=L(e.text,c,a.forward(i,s));(ra.to)&&(r=u),s4=e.text.slice(Math.min(c,r),Math.max(c,r));let d=l==(i?n.length-1:0)?null:n[l+(i?1:-1)];return d&&r==u&&d.level+(i?0:1)e.some(e=>e)}),d0=a.define({combine:e=>e.some(e=>e)}),h0=a.define();class es{constructor(e,t="nearest",n="nearest",s=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new es(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new es(t.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const hs=d.define({map:(e,t)=>e.map(t)}),g0=d.define();function K(e,t,n){let s=e.facet(O4);s.length?s[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Qe=a.define({combine:e=>!e.length||e[0]});let Gh=0;const Yn=a.define();class A{constructor(e,t,n,s,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=o(this)}static define(e,t){const{eventHandlers:o,eventObservers:i,provide:n,decorations:s}=t||{};return new A(Gh++,e,o,i,e=>{let t=[Yn.of(e)];return s&&t.push(Un.of(t=>{let n=t.plugin(e);return n?s(n):c.none})),n&&t.push(n(e)),t})}static fromClass(e,t){return A.define(t=>new e(t),t)}}class yr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(K(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){K(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if((t=this.value)===null||t===void 0?void 0:t.destroy)try{this.value.destroy()}catch(t){K(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const qr=a.define(),ar=a.define(),Un=a.define(),b0=a.define(),sr=a.define(),_0=a.define();function w0(e,t){let n=e.state.facet(_0);if(!n.length)return n;let o=n.map(t=>t instanceof Function?t(e):t),s=[];return m.spans(o,t.from,t.to,{point(){},span(e,n,o,i){let r=e-t.from,c=n-t.from,a=s;for(let s=o.length-1;s>=0;s--,i--){let e=o[s].spec.bidiIsolate,n;if(e==null&&(e=P8(t.text,r,c)),i>0&&a.length&&(n=a[a.length-1]).to==r&&n.direction==e)n.to=c,a=n.inner;else{let t={from:r,to:c,direction:e,inner:[]};a.push(t),a=t.inner}}}}),s}const M0=a.define();function F0(e){let t=0,n=0,s=0,o=0;for(let a of e.state.facet(M0)){let i=a(e);i&&(i.left!=null&&(t=Math.max(t,i.left)),i.right!=null&&(n=Math.max(n,i.right)),i.top!=null&&(s=Math.max(s,i.top)),i.bottom!=null&&(o=Math.max(o,i.bottom)))}return{left:t,right:n,top:s,bottom:o}}const In=a.define();class de{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new de(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(s.fromA>n.toA)continue;if(s.toAr)break;o+=2}if(!s)return n;new de(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),c=s.toA,a=s.toB}}}class Fa{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=F.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let s=[];this.changes.iterChangedRanges((e,t,n,o)=>s.push(new de(e,t,n,o))),this.changedRanges=s}static create(e,t,n){return new Fa(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&(8|2))>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class T0 extends j{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=c.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new k],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new de(0,0,0,e.state.doc.length)],0,null)}update(e){var o;let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(((o=this.domChanged)===null||o===void 0?void 0:o.newSel)?s=this.domChanged.newSel.head:!ah(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let n=s>-1?Ah(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:n,to:s}=this.hasComposition;t=new de(n,s,e.changes.mapPos(n,-1),e.changes.mapPos(s,1)).addToSet(t.slice())}this.hasComposition=n?{from:n.range.fromB,to:n.range.toB}:null,(i.ie||i.chrome)&&!n&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,r=this.updateDeco(),c=jh(a,r,e.changes);return t=de.extendWithRanges(t,c),!(!(this.flags&7)&&t.length==0)&&(this.updateInner(t,e.startState.doc.length,n),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=i.chrome||i.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=~7,e&&(e.written||s.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=~8);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?s[a]:null;if(!d)break;let{fromA:m,toA:h,fromB:r,toB:c}=d,t,l,i,e;if(n&&n.range.fromBr){let s=$s.build(this.view.state.doc,r,n.range.fromB,this.decorations,this.dynamicDecorationMap),o=$s.build(this.view.state.doc,n.range.toB,c,this.decorations,this.dynamicDecorationMap);l=s.breakAtStart,i=s.openStart,e=o.openEnd;let a=this.compositionView(n);o.breakAtStart?a.breakAfter=1:o.content.length&&a.merge(a.length,a.length,o.content[0],!1,o.openStart,0)&&(a.breakAfter=o.content[0].breakAfter,o.content.shift()),s.content.length&&a.merge(0,0,s.content[s.content.length-1],!0,0,s.openEnd)&&s.content.pop(),t=s.content.concat(a).concat(o.content)}else({content:t,breakAtStart:l,openStart:i,openEnd:e}=$s.build(this.view.state.doc,r,c,this.decorations,this.dynamicDecorationMap));let{i:u,off:f}=o.findPos(h,1),{i:p,off:g}=o.findPos(m,-1);uu(this,p,g,u,f,t,l,i,e)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(g0)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new be(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new nt(n,[t],t.length);let n=new k;return n.append(t,0),n}fixCompositionDOM(e){let s=(e,t)=>{t.flags|=8|(t.children.some(e=>e.flags&7)?1:0),this.markedForComposition.add(t);let n=j.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),t=this.children[n.i];s(e.line,t);for(let o=e.marks.length-1;o>=-1;o--)n=t.childPos(n.off,1),t=t.children[n.i],s(o>=0?e.marks[o].node:e.text,t)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,c=r==this.dom,l=!c&&go(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(c||t||l))return;let d=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,n=this.moveToLine(this.domAtPos(a.anchor)),o=a.empty?n:this.moveToLine(this.domAtPos(a.head));if(i.gecko&&a.empty&&!this.hasComposition&&Mh(n)){let e=document.createTextNode("");this.view.observer.ignore(()=>n.node.insertBefore(e,n.node.childNodes[n.offset]||null)),n=o=new V(e,0),d=!0}let s=this.view.observer.selectionRange;(d||!s.focusNode||(!nn(n.node,n.offset,s.anchorNode,s.anchorOffset)||!nn(o.node,o.offset,s.focusNode,s.focusOffset))&&!this.suppressWidgetCursorChange(s,a))&&(this.view.observer.ignore(()=>{i.android&&i.chrome&&this.dom.contains(s.focusNode)&&fh(s.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=yn(this.view.root);if(e)if(a.empty){if(i.gecko){let e=Ch(n.node,n.offset);if(e&&e!=(1|2)){let t=(e==1?iu:au)(n.node,n.offset);t&&(n=new V(t.node,t.offset))}}e.collapse(n.node,n.offset),a.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(n.node,n.offset);try{e.extend(o.node,o.offset)}catch{}}else{let t=document.createRange();a.anchor>a.head&&([n,o]=[o,n]),t.setEnd(o.node,o.offset),t.setStart(n.node,n.offset),e.removeAllRanges(),e.addRange(t)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(n,o)),this.impreciseAnchor=n.precise?null:new V(s.anchorNode,s.anchorOffset),this.impreciseHead=o.precise?null:new V(s.focusNode,s.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&nn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=yn(t.root),{anchorNode:l,anchorOffset:d}=t.observer.selectionRange;if(!n||!e.empty||!e.assoc||!n.modify)return;let s=k.find(this,e.head);if(!s)return;let o=s.posAtStart;if(e.head==o||e.head==o+s.length)return;let i=this.coordsAt(e.head,-1),a=this.coordsAt(e.head,1);if(!i||!a||i.bottom>a.top)return;let r=this.domAtPos(e.head+e.assoc);n.collapse(r.node,r.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&n.collapse(l,d)}moveToLine(e){let n=this.dom,t;if(e.node!=n)return e;for(let s=e.offset;!t&&s=0;s--){let o=j.get(n.childNodes[s]);o instanceof k&&(t=o.domAtPos(o.length))}return t?new V(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let n=j.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;a--){let o=this.children[a],r=c-o.breakAfter,i=r-o.length;if(re||o.covers(1))&&(!n||o instanceof k&&!(n instanceof k&&t>=0)))n=o,s=i;else if(n&&i==e&&r==e&&o instanceof st&&Math.abs(t)<2){if(o.deco.startSide<0)break;a&&(n=null)}c=i}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i,off:n}=this.childPos(e,1),t=this.children[i];if(!(t instanceof k))return null;for(;t.children.length;){let{i:e,off:s}=t.childPos(n,1);for(;;e++){if(e==t.children.length)return null;if((t=t.children[e]).length)break}n=s}if(!(t instanceof be))return null;let o=L(t.text,n);if(o==n)return null;let s=ut(t.dom,n,o).getClientRects();for(let t=0;tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,r=this.view.textDirection==y.LTR;for(let e=0,l=0;li)break;if(e>=o){let o=c.dom.getBoundingClientRect();if(t.push(o.height),a){let i=c.dom.lastChild,t=i?sn(i):[];if(t.length){let i=t[t.length-1],a=r?i.right-o.left:o.right-i.left;a>s&&(s=a,this.minWidth=n,this.minWidthFrom=e,this.minWidthTo=d)}}}e=d+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?y.RTL:y.LTR}measureTextSize(){for(let e of this.children)if(e instanceof k){let t=e.measureTextSize();if(t)return t}let e=document.createElement("div"),t,n,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=sn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=o?o.width/27:7,s=o?o.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new lu(this.children,e,t)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,o=0;;o++){let s=o==e.viewports.length?null:e.viewports[o],i=s?s.from-1:this.length;if(i>n){let s=(e.lineBlockAt(i).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(c.replace({widget:new sa(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!s)break;n=s.to+1}return c.set(t)}updateDeco(){let e=1,t=this.view.state.facet(Un).map(t=>{let n=this.dynamicDecorationMap[e++]=typeof t=="function";return n?t(this.view):t}),n=!1,s=this.view.state.facet(b0).map((e)=>{let s=typeof e=="function";return s&&(n=!0),s?e(this.view):e});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(m.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let o=F0(this.view),r={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:i,offsetHeight:a}=this.view.scrollDOM;zp(this.view.scrollDOM,r,t.head{et.from&&(n=!0)}),n}function oh(e,n,s=1){let c=e.charCategorizer(n),o=e.doc.lineAt(n),r=n-o.from;if(o.length==0)return t.cursor(n);r==0?s=1:r==o.length&&(s=-1);let i=r,a=r;s<0?i=L(o.text,r,!1):a=L(o.text,r);let l=c(o.text.slice(i,a));for(;i>0;){let e=L(o.text,i,!1);if(c(o.text.slice(e,i))!=l)break;i=e}for(;ae?t.left-e:Math.max(0,e-t.right)}function J3(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function ca(e,t){return e.topt.top+1}function o2(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function aa(e,t,n){let o,s,c,r,l=!1,d,u,i,a;for(let h=e.firstChild;h;h=h.nextSibling){let m=sn(h);for(let f=0;fg||r==g&&c>p){o=h,s=e,c=p,r=g;let i=g?n0?f0)}p==0?n>e.bottom&&(!i||i.bottome.top)&&(u=h,a=e):i&&ca(i,e)?i=d2(i,e.bottom):a&&ca(a,e)&&(a=o2(a,e.top))}}if(i&&i.bottom>=n?(o=d,s=i):a&&a.top<=n&&(o=u,s=a),!o)return{node:e,offset:0};let h=Math.max(s.left,Math.min(s.right,t));if(o.nodeType==3)return v2(o,h,n);if(l&&o.contentEditable!="false")return aa(o,h,n);let m=Array.prototype.indexOf.call(e.childNodes,o)+(t>=(s.left+s.right)/2?1:0);return{node:e,offset:m}}function v2(e,t,n){let r=e.nodeValue.length,s=-1,a=1e9,o=0;for(let c=0;cn?r.top-n:n-r.bottom)-1;if(r.left-1<=t&&r.right+1>=t&&u=(r.left+r.right)/2,n=o;if(i.chrome||i.gecko){let t=ut(e,c).getBoundingClientRect();t.left==r.right&&(n=!o)}if(u<=0)return{node:e,offset:c+(n?1:0)};s=c+(n?1:0),a=u}}}return{node:e,offset:s>-1?s:o>0?e.nodeValue.length:0}}function j2(e,t,n,s=-1){let m=e.contentDOM.getBoundingClientRect(),b=m.top+e.viewState.paddingTop,o,{docHeight:j}=e.viewState,{x:r,y:l}=t,d=l-b;if(d<0)return 0;if(d>j)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;;){if(o=e.elementAtHeight(d),o.type==P.Text)break;for(var g,v;;){if(d=s>0?o.bottom+t:o.top-t,d>=0&&d<=j)break;if(i)return n?null:0;i=!0,s=-s}}l=b+d;let p=o.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:y2(e,m,o,r,l);let f=e.dom.ownerDocument,y=e.root.elementFromPoint?e.root:f,c=y.elementFromPoint(r,l);c&&!e.contentDOM.contains(c)&&(c=null),c||(r=Math.max(m.left+1,Math.min(m.right-1,r)),c=y.elementFromPoint(r,l),c&&!e.contentDOM.contains(c)&&(c=null));let a,h=-1;if(c&&((g=e.docView.nearest(c))===null||g===void 0?void 0:g.isEditable)!=!1)if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(r,l);e&&({offsetNode:a,offset:h}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(r,l);t&&({startContainer:a,startOffset:h}=t,(!e.contentDOM.contains(a)||i.safari&&C3(a,h,r)||i.chrome&&g3(a,h,r))&&(a=void 0))}if(!a||!e.docView.dom.contains(a)){let t=k.find(e.docView,p);if(!t)return d>o.top+o.height/2?o.to:o.from;({node:a,offset:h}=aa(t.dom,r,l))}let u=e.docView.nearest(a);if(!u)return null;if(u.isWidget&&((v=u.dom)===null||v===void 0?void 0:v.nodeType)==1){let e=u.dom.getBoundingClientRect();return t.ye.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,s=Math.floor((o-n.top-(e.defaultLineHeight-t)*.5)/t);i+=s*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+Di(a,i,e.state.tabSize)}function C3(e,t,n){let s;if(e.nodeType!=3||t!=(s=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType!=1||t.nodeName!="BR")return!1;return ut(e,s-1,s).getBoundingClientRect().left>n}function g3(e,t,n){if(t!=0)return!1;for(let n=e;;){let t=n.parentNode;if(!t||t.nodeType!=1||t.firstChild!=n)return!1;if(t.classList.contains("cm-line"))break;n=t}let s=e.nodeType==1?e.getBoundingClientRect():ut(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-s.left>5}function Ii(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==P.Text))return e;return n}function p3(e,n,s,o){let i=Ii(e,n.head),a=!o||i.type!=P.Text||!e.lineWrapping&&!i.widgetLineBreaks?null:e.coordsAtPos(n.assoc<0&&n.head>i.from?n.head-1:n.head);if(a){let n=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:s==(r==y.LTR)?n.right-1:n.left+1,y:(a.top+a.bottom)/2});if(o!=null)return t.cursor(o,s?-1:1)}return t.cursor(s?i.to:i.from,s?-1:1)}function O2(e,t,n,s){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let r=t,l=null;;){let c=q8(o,i,a,r,n),d=s4;if(!c){if(o.number==(n?e.state.doc.lines:1))return r;d=` -`,o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),c=e.visualLineSide(o,!n)}if(l){if(!l(d))return r}else{if(!s)return c;l=s(d)}r=c}}function h3(e,t,n){let o=e.state.charCategorizer(t),s=o(n);return e=>{let t=o(e);return s==O.Space&&(s=t),s==t}}function X2(e,n,s,o){let i=n.head,c=s?1:-1;if(i==(s?e.state.doc.length:0))return t.cursor(i,n.assoc);let a=n.goalColumn,d,r=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,n.assoc||-1),u=e.documentTop;if(l)a==null&&(a=l.left-r.left),d=c<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);a==null&&(a=Math.min(r.right-r.left,e.defaultCharacterWidth*(i-t.from))),d=(c<0?t.top:t.bottom)+u}let h=r.left+a,m=o??e.viewState.heightOracle.textHeight>>1;for(let o=0;;o+=10){let n=d+(m+o)*c,s=j2(e,{x:h,y:n},!1,c);if(nr.bottom||(c<0?si)){let o=e.docView.coordsForChar(s),i=!o||n{if(t>e&&tt(e)),s.from,n.head>s.from?-1:1);return o==s.from?s:t.cursor(o,oa)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let o=0,a=this.lineSeparator?null:/\r\n?|\n/g;;){let n=-1,s=1,i;if(this.lineSeparator?(n=t.indexOf(this.lineSeparator,o),s=this.lineSeparator.length):(i=a.exec(t))&&(n=i.index,s=i[0].length),this.append(t.slice(o,n<0?t.length:n)),n<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);o=n+s}}readNode(e){if(e.cmIgnore)return;let n=j.get(e),t=n&&n.overrideDOMText;if(t!=null){this.findPointInside(e,t.length);for(let e=t.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(q2(e,n.node,n.offset)?t:0))}}function q2(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:a,impreciseAnchor:r}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,s,0))){let t=a||r?[]:l3(e),n=new Y2(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=O3(t,this.bounds.from)}else{let n=e.observer.selectionRange,s=a&&a.node==n.focusNode&&a.offset==n.focusOffset||!fi(e.contentDOM,n.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(n.focusNode,n.focusOffset),o=r&&r.node==n.anchorNode&&r.offset==n.anchorOffset||!fi(e.contentDOM,n.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(n.anchorNode,n.anchorOffset),c=e.viewport;if((i.ios||i.chrome)&&e.state.selection.main.empty&&s!=o&&(c.from>0||c.toDate.now()-100?e.inputState.lastKeyCode:-1;if(n.bounds){let{from:a,to:c}=n.bounds,l=o.from,d=null;(r===8||i.android&&n.text.length=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4?s={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,s.from).append(s.insert).append(e.state.doc.slice(s.to,o.to))}:(i.mac||i.android)&&s&&s.from==s.to&&s.from==o.head-1&&/^\. ?$/.test(s.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(a&&s.insert.length==2&&(a=t.single(a.main.anchor-1,a.main.head-1)),s={from:o.from,to:o.to,insert:f.of([" "])}):i.chrome&&s&&s.from==s.to&&s.from==o.head&&s.insert.toString()==` - `&&e.lineWrapping&&(a&&(a=t.single(a.main.anchor-1,a.main.head-1)),s={from:o.from,to:o.to,insert:f.of([" "])}),s)return ji(e,s,a,r);if(a&&!a.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:a,scrollIntoView:t,userEvent:n}),!0}return!1}function ji(e,t,n,s=-1){if(i.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(i.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&e.state.sliceDoc(t.from,o.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&Gt(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||s==8&&t.insert.lengtho.head)&&Gt(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&Gt(e.contentDOM,"Delete",46)))return!0;let c=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a,r=()=>a||(a=up(e,t,n));return e.state.facet($4).some(n=>n(e,t.from,t.to,c,r))||e.dispatch(r()),!0}function up(e,n,s){let a,i=e.state,o=i.selection.main;if(n.from>=o.from&&n.to<=o.to&&n.to-n.from>=(o.to-o.from)/3&&(!s||s.main.empty&&s.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let t=o.fromn.to?i.sliceDoc(n.to,o.to):"";a=i.replaceSelection(e.state.toText(t+n.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let c=i.changes(n),r=s&&s.main.to<=c.newLength?s.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=o.to&&n.to>=o.to-10){let u=e.state.sliceDoc(n.from,n.to),l,d=s&&P0(e,s.main.head);if(d){let e=n.insert.length-(n.to-n.from);l={from:d.from,to:d.to-e}}else l=e.state.doc.lineAt(o.head);let h=o.to-n.to,m=o.to-o.from;a=i.changeByRange(s=>{if(s.from==o.from&&s.to==o.to)return{changes:c,range:r||s.map(c)};let a=s.to-h,d=a-u.length;if(s.to-s.from!=m||e.state.sliceDoc(d,a)!=u||s.to>=l.from&&s.from<=l.to)return{range:s};let f=i.changes({from:d,to:a,insert:n.insert}),p=s.to-o.to;return{changes:f,range:r?t.range(Math.max(0,r.anchor+p),Math.max(0,r.head+p)):s.map(f)}})}else a={changes:c,selection:r&&i.selection.replaceRange(r)}}let r="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,r+=".compose",e.inputState.compositionFirstChange&&(r+=".start",e.inputState.compositionFirstChange=!1)),i.update(a,{userEvent:r,scrollIntoView:!0})}function K2(e,t,n,s){let r=Math.min(e.length,t.length),o=0;for(;o0&&a>0&&e.charCodeAt(i-1)==t.charCodeAt(a-1);)i--,a--;if(s=="end"){let e=Math.max(0,o-Math.min(i,a));n-=i+e-o}if(i=i?o-n:0;o-=e,a=o+(a-i),i=o}else if(a=a?o-n:0;o-=e,i=o+(i-a),a=o}return{from:o,toA:i,toB:a}}function l3(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:s,focusNode:o,focusOffset:i}=e.observer.selectionRange;return n&&(t.push(new M2(n,s)),(o!=n||i!=s)&&t.push(new M2(o,i))),t}function O3(e,n){if(e.length==0)return null;let s=e[0].pos,o=e.length==2?e[1].pos:s;return s>-1&&o>-1?t.single(s+n,o+n):null}class k3{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,i.safari&&e.contentDOM.addEventListener("input",()=>null),i.gecko&&Km(e.contentDOM.ownerDocument)}handleEvent(e){if(!sh(this.view,e)||this.ignoreDuringComposition(e))return;if(e.type=="keydown"&&this.keydown(e))return;this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=M3(e),s=this.handlers,n=this.view.contentDOM;for(let e in t)if(e!="scroll"){let i=!t[e].handlers.length,o=s[e];o&&i!=!o.handlers.length&&(n.removeEventListener(e,this.handleEvent),o=null),o||n.addEventListener(e,this.handleEvent,{passive:i})}for(let e in s)e!="scroll"&&!t[e]&&n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&r2.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),i.android&&i.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return i.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=u2.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||z3.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&!(t.key=="Enter"&&e&&e.from0||!!(i.safari&&!i.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function g2(e,t){return(n,s)=>{try{return t.call(e,s,n)}catch(e){K(n.state,e)}}}function M3(e){let n=Object.create(null);function t(e){return n[e]||(n[e]={observers:[],handlers:[]})}for(let s of e){let n=s.spec;if(n&&n.domEventHandlers)for(let e in n.domEventHandlers){let o=n.domEventHandlers[e];o&&t(e).handlers.push(g2(s.value,o))}if(n&&n.domEventObservers)for(let e in n.domEventObservers){let o=n.domEventObservers[e];o&&t(e).observers.push(g2(s.value,o))}}for(let e in he)t(e).handlers.push(he[e]);for(let e in se)t(e).observers.push(se[e]);return n}const u2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],z3="dthko",r2=[16,17,18,20,91,92,224,225],xo=6;function Co(e){return Math.max(0,e)*.7+8}function I3(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class B3{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Fp(e.contentDOM),this.atoms=e.state.facet(sr).map(t=>t(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(h.allowMultipleSelections)&&K3(e,t),this.dragging=!!(X3(e,t)&&O0(t)==1)&&null}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&I3(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,s=0,o=0,i=0,a=this.view.win.innerWidth,r=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:r}=this.scrollParents.y.getBoundingClientRect());let t=F0(this.view);e.clientX-t.left<=o+xo?n=-Co(o-e.clientX):e.clientX+t.right>=a-xo&&(n=Co(e.clientX-a)),e.clientY-t.top<=i+xo?s=-Co(i-e.clientY):e.clientY+t.bottom>=r-xo&&(s=Co(e.clientY-r)),this.setScrollSpeed(n,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let o=0;oe.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function K3(e,t){let n=e.state.facet(j4);return n.length?n[0](t):i.mac?t.metaKey:t.ctrlKey}function Y3(e,t){let n=e.state.facet(y4);return n.length?n[0](t):i.mac?!t.altKey:!t.ctrlKey}function X3(e,t){let{main:o}=e.state.selection;if(o.empty)return!1;let n=yn(e.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let n=0;n=t.clientX&&e.top<=t.clientY&&e.bottom>=t.clientY)return!0}return!1}function sh(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,s;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(s=j.get(n))&&s.ignoreEvent(t))return!1;return!0}const he=Object.create(null),se=Object.create(null),$0=i.ie&&i.ie_version<15||i.ios&&i.webkit_version<604;function gh(e){let n=e.dom.parentNode;if(!n)return;let t=n.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{e.focus(),t.remove(),B0(e,t.value)},50)}function B0(e,n){let{state:s}=e,i,a=1,o=s.toText(n),r=o.lines==s.selection.ranges.length,c=Qo!=null&&s.selection.ranges.every(e=>e.empty)&&Qo==o.toString();if(c){let e=-1;i=s.changeByRange(i=>{let c=s.doc.lineAt(i.from);if(c.from==e)return{range:i};e=c.from;let l=s.toText((r?o.line(a++).text:n)+s.lineBreak);return{changes:{from:c.from,insert:l},range:t.cursor(i.from+l.length)}})}else r?i=s.changeByRange(e=>{let n=o.line(a++);return{changes:{from:e.from,to:e.to,insert:n.text},range:t.cursor(e.from+n.length)}}):i=s.replaceSelection(o);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}se.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},he.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),se.touchstart=(e)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},se.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},he.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let s of e.state.facet(w4))if(n=s(e,t),n)break;if(!n&&t.button==0&&(n=Ih(e,t)),n){let o=!e.hasFocus;e.inputState.startMouseSelection(new B3(e,t,n,o)),o&&e.observer.ignore(()=>{$d(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let s=e.inputState.mouseSelection;if(s)return s.start(t),s.dragging===!1}return!1};function R0(e,n,s,o){if(o==1)return t.cursor(n,s);if(o==2)return oh(e.state,n,s);let i=k.find(e.docView,n),r=e.state.doc.lineAt(i?i.posAtEnd:n),c=i?i.posAtStart:r.from,a=i?i.posAtEnd:r.to;return at>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function Fh(e,t,n,s){let o=k.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(i==0)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&N0(n,s,a))return-1;let r=o.coordsAt(i,1);return r&&N0(n,s,r)?1:a&&a.bottom>=s?-1:1}function z0(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Fh(e,n,t.clientX,t.clientY)}}const Nh=i.ie&&i.ie_version<=11;let S0=null,A0=0,C0=0;function O0(e){if(!Nh)return e.detail;let t=S0,n=C0;return S0=e,C0=Date.now(),A0=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(A0+1)%3:1}function Ih(e,n){let o=z0(e,n),i=O0(n),s=e.state.selection;return{update(e){e.docChanged&&(o.pos=e.changes.mapPos(o.pos),s=s.map(e.changes))},get(n,a,r){let l=z0(e,n),d,c=R0(e,l.pos,l.bias,i);if(o.pos!=l.pos&&!a){let s=R0(e,o.pos,o.bias,i),n=Math.min(s.from,c.from),a=Math.max(s.to,c.to);c=n1&&(d=Nm(s,l.pos))?d:r?s.addRange(c):t.create([c])}}}function Nm(e,n){for(let s=0;s=n)return t.create(e.ranges.slice(0,s).concat(e.ranges.slice(s+1)),e.mainIndex==s?0:e.mainIndex-(e.mainIndex>s?1:0))}return null}he.dragstart=(e,n)=>{let{selection:{main:s}}=e.state;if(n.target.draggable){let o=e.docView.nearest(n.target);if(o&&o.isWidget){let e=o.posAtStart,n=e+o.length;(e>=s.to||n<=s.from)&&(s=t.range(e,n))}}let{inputState:o}=e;return o.mouseSelection&&(o.mouseSelection.dragging=!0),o.draggedContent=s,n.dataTransfer&&(n.dataTransfer.setData("Text",e.state.sliceDoc(s.from,s.to)),n.dataTransfer.effectAllowed="copyMove"),!1},he.dragend=e=>(e.inputState.draggedContent=null,!1);function o0(e,t,n,s){if(!n)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=s&&i&&Y3(e,t)?{from:i.from,to:i.to}:null,c={from:o,insert:n},r=e.state.changes(a?[a,c]:c);e.focus(),e.dispatch({changes:r,selection:{anchor:r.mapPos(o,-1),head:r.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}he.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let s=Array(n.length),i=0,o=()=>{++i==n.length&&o0(e,t,s.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(s[t]=e.result),o()},e.readAsText(n[t])}return!0}let s=t.dataTransfer.getData("Text");return!!s&&(o0(e,t,s,!0),!0)},he.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=$0?null:t.clipboardData;return n?(B0(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(gh(e),!1)};function Lm(e,t){let s=e.dom.parentNode;if(!s)return;let n=s.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout(()=>{n.remove(),e.focus()},50)}function Im(e){let t=[],n=[],s=!1;for(let s of e.selection.ranges)s.empty||(t.push(e.sliceDoc(s.from,s.to)),n.push(s));if(!t.length){let o=-1;for(let{from:i}of e.selection.ranges){let s=e.doc.lineAt(i);s.number>o&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),o=s.number}s=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:s}}let Qo=null;he.copy=he.cut=(e,t)=>{let{text:n,ranges:i,linewise:o}=Im(e.state);if(!n&&!o)return!1;Qo=o?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=$0?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(Lm(e,n),!1)};const J4=$e.define();function Q4(e,t){let n=[];for(let o of e.facet(s0)){let s=o(e,t);s&&n.push(s)}return n?e.update({effects:n,annotations:J4.of(!0)}):null}function G4(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Q4(e.state,t);n?e.dispatch(n):e.update([])}},10)}se.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),G4(e)},se.blur=e=>{e.observer.clearSelectionRange(),G4(e)},se.compositionstart=se.compositionupdate=e=>{if(e.observer.editContext)return;e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},se.compositionend=e=>{if(e.observer.editContext)return;e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,i.chrome&&i.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},se.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},he.beforeinput=(e,t)=>{var s,o;if(t.inputType=="insertReplacementText"&&e.observer.editContext){let n=(s=t.dataTransfer)===null||s===void 0?void 0:s.getData("text/plain"),o=t.getTargetRanges();if(n&&o.length){let t=o[0],s=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return ji(e,{from:s,to:i,insert:e.state.toText(n)},null),!0}}let n;if(i.chrome&&i.android&&(n=u2.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let t=((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0;setTimeout(()=>{var n;(((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return i.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),i.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>se.compositionend(e,t),20),!1};const K4=new Set;function Km(e){K4.has(e)||(K4.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}const C4=["pre-wrap","normal","pre-line","break-spaces"];let Vt=!1;function p4(){Vt=!1}class N8{constructor(e){this.lineWrapping=e,this.doc=f.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;let t=1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5)));return t*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return C4.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,r=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=o,r){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|this.flags&~2}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>vo&&(Vt=!0),this.height=e)}replace(e,t,n){return U.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let o=this,i=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:r,toA:l,fromB:d,toB:u}=s[a],c=o.lineAt(r,w.ByPosNoHeight,n.setDoc(t),0,0),h=c.to>=l?c:o.lineAt(l,w.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;a>0&&c.from<=s[a-1].toA;)r=s[a-1].fromA,d=s[a-1].fromB,a--,ro*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,s-=o.size}else if(o>s*2){let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,o-=t.size}else break;else if(s=o&&i(this.blockAt(0,n,s,o))}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class le extends R1{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new Ie(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof le||s instanceof I&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof I?s=new le(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):U.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class I extends U{constructor(e){super(e,0)}heightMetrics(e,t){let o=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,n=i-o+1,s,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*n);s=t/n,this.length>n+1&&(a=(this.height-t)/(this.length-n-1))}else s=this.height/n;return{firstLine:o,lastLine:i,perLine:s,perChar:a}}blockAt(e,t,n,s){let{firstLine:i,lastLine:r,perLine:o,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let r=s+(e0){let e=n[n.length-1];e instanceof I?n[n.length-1]=new I(e.length+s):n.push(null,new I(s-1))}if(e>0){let t=n[0];t instanceof I?n[0]=new I(e+t.length):n.unshift(new I(e-1),null)}return U.of(n)}decomposeLeft(e,t){t.push(new I(e-1),null)}decomposeRight(e,t){t.push(null,new I(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let o=t+this.length;if(s&&s.from<=t+this.length&&s.more){let n=[],i=Math.max(t,s.from),a=-1;for(s.from>t&&n.push(new I(s.from-t-1).updateHeight(e,t));i<=o&&s.more;){let o=e.doc.lineAt(i).length;n.length&&n.push(null);let t=s.heights[s.index++];a==-1?a=t:Math.abs(t-a)>=vo&&(a=-2);let r=new le(o,t);r.outdated=!1,n.push(r),i+=o+1}i<=o&&n.push(null,new I(o-i).updateHeight(e,i));let r=U.of(n);return(a<0||Math.abs(r.height-this.height)>=vo||Math.abs(a-this.heightMetrics(e,t).perLine)>=vo)&&(Vt=!0),po(this,r)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class s6 extends U{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let o=n+this.left.height;return ei))return a;let l=t==w.ByPosNoHeight?w.ByPosNoHeight:w.ByPos;return c?a.join(this.right.lineAt(i,l,n,r,i)):this.left.lineAt(i,l,n,s,o).join(a)}forEachLine(e,t,n,s,o,i){let r=s+this.left.height,a=o+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,r,a,i);else{let c=this.lineAt(a,w.ByPos,n,s,o);e=e&&c.from<=t&&i(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,r,a,i)}}replace(e,t,n){let o=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-o,t-o,n));let s=[];e>0&&this.decomposeLeft(e,s);let i=s.length;for(let e of n)s.push(e);if(e>0&&k1(s,i-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let s=this.left.length,n=s+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?U.of(this.break?[e,null,t]:[e,t]):(this.left=po(this.left,e),this.right=po(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:o,right:i}=this,a=t+o.length+this.break,r=null;return s&&s.from<=t+o.length&&s.more?r=o=o.updateHeight(e,t,n,s):o.updateHeight(e,t,n),s&&s.from<=a+i.length&&s.more?r=i=i.updateHeight(e,a,n,s):i.updateHeight(e,a,n),r?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function k1(e,t){let n,s;e[t]==null&&(n=e[t-1])instanceof I&&(s=e[t+1])instanceof I&&e.splice(t-1,3,new I(n.length+1+s.length))}const r6=5;class u1{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof le?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new le(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=r6)&&this.addLineDeco(s,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new le(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new I(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof le)return e;let t=new le(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof le)&&!this.isCovered?this.nodes.push(new le(0,-1)):(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&c.overflow!="visible"){let c=n.getBoundingClientRect();s=Math.max(s,c.left),a=Math.min(a,c.right),o=Math.max(o,c.top),r=Math.min(t==e.parentNode?i.innerHeight:r,c.bottom)}t=c.position=="absolute"||c.position=="fixed"?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:o-(n.top+t),bottom:Math.max(o,r)-(n.top+t)}}function y6(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class xi{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof e!="function"&&e.class=="cm-lineWrapping");this.heightOracle=new N8(t),this.stateDeco=e.facet(Un).filter(e=>typeof e!="function"),this.heightMap=U.empty().applyChanges(this.stateDeco,f.empty,this.heightOracle.setDoc(e.doc),[new de(0,0,0,e.doc.length)]);for(let e=0;e<2;e++)if(this.viewport=this.getViewport(0,null),!this.updateForViewport())break;this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=c.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>s>=e&&s<=t)){let{from:t,to:n}=this.lineBlockAt(s);e.push(new uo(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ku:new $u(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Jn(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Un).filter(e=>typeof e!="function");let a=e.changedRanges,o=de.extendWithRanges(a,p6(i,this.stateDeco,e?e.changes:F.empty(this.state.doc.length))),r=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);p4(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=r||Vt)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let n=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headn.to)||!this.viewportIsAppropriate(n))&&(n=this.getViewport(0,t));let c=n.from!=this.viewport.from||n.to!=this.viewport.to;this.viewport=n,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(d0)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let l=e.contentDOM,c=window.getComputedStyle(l),o=this.heightOracle,b=c.whiteSpace;this.defaultTextDirection=c.direction=="rtl"?y.RTL:y.LTR;let n=this.heightOracle.mustRefreshForWrapping(b),s=l.getBoundingClientRect(),r=n||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let t=0,i=0;if(s.width&&s.height){let{scaleX:e,scaleY:o}=Rd(l,s);(e>.005&&Math.abs(this.scaleX-e)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=e,this.scaleY=o,t|=8,n=r=!0)}let v=(parseInt(c.paddingTop)||0)*this.scaleY,p=(parseInt(c.paddingBottom)||0)*this.scaleY;(this.paddingTop!=v||this.paddingBottom!=p)&&(this.paddingTop=v,this.paddingBottom=p,t|=8|2),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(r=!0),this.editorWidth=e.scrollDOM.clientWidth,t|=8);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=tu(e.scrollDOM);let u=(this.printing?y6:j6)(l,this.paddingTop),d=u.top-this.pixelViewport.top,a=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let h=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(h!=this.inView&&(this.inView=h,h&&(r=!0)),!this.inView&&!this.scrollTarget)return 0;let m=s.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,t|=8),r){let s=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(s)&&(n=!0),n||o.lineWrapping&&Math.abs(m-this.contentDOMWidth)>o.charWidth){let{lineHeight:i,charWidth:a,textHeight:r}=e.docView.measureTextSize();n=i>0&&o.refresh(b,i,a,r,m/a,s),n&&(e.docView.minWidth=0,t|=8)}d>0&&a>0?i=Math.max(d,a):d<0&&a<0&&(i=Math.min(d,a)),p4();for(let t of this.viewports){let i=t.from==this.viewport.from?s:e.docView.measureVisibleLineHeights(t);this.heightMap=(n?U.empty().applyChanges(this.stateDeco,f.empty,this.heightOracle,[new de(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,n,new L8(t.from,i))}Vt&&(t|=2)}let j=!this.viewportIsAppropriate(this.viewport,i)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return j&&(t&2&&(t|=this.updateScaler()),this.viewport=this.getViewport(i,this.scrollTarget),t|=this.updateForViewport()),(t&2||j)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,e)),t|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),t}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:r}=this,o=new uo(n.lineAt(a-i*1e3,w.ByHeight,s,0,0).from,n.lineAt(r+(1-i)*1e3,w.ByHeight,s,0,0).to);if(t){let{head:e}=t.range;if(eo.to){let r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=n.lineAt(e,w.ByPos,s,0,0),i;t.y=="center"?i=(a.top+a.bottom)/2-r/2:t.y=="start"||t.y=="nearest"&&e=a+Math.max(10,Math.min(n,250)))&&s>i-2*1e3&&o>1,r=o<<1;if(this.defaultTextDirection!=y.LTR&&!s)return[];let c=[],i=(o,r,l,d)=>{if(r-oo&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-o)e.fromt));if(!m){if(re.from<=r&&e.to>=r)){let e=n.moveToLineBoundary(t.cursor(r),!1,!0).head;e>o&&(r=e)}m=new xi(o,r,this.gapSize(l,o,r,d))}c.push(m)},l=e=>{if(e.lengthe.from&&i(e.from,a,e,t),ce.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];m.spans(t,this.viewport.from,this.viewport.to,{span(t,n){e.push({from:t,to:n})},point(){}},20);let n=e.length!=this.visibleRanges.length||this.visibleRanges.some((t,n)=>t.from!=e[n].from||t.to!=e[n].to);return this.visibleRanges=e,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Jn(this.heightMap.lineAt(e,w.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Jn(this.heightMap.lineAt(this.scaler.fromDOM(e),w.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Jn(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class uo{constructor(e,t){this.from=e,this.to=t}}function T6(e,t,n){let o=[],s=e,i=0;return m.spans(n,e,t,{span(){},point(e,t){e>s&&(o.push({from:s,to:e}),i+=e-s),s=t}},20),s=1)return t[t.length-1].to;let s=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(s<=o)return n+s;s-=o}}function ro(e,t){let n=0;for(let{from:s,to:o}of e.ranges){if(t<=o){n+=t-s;break}n+=o-s}return n/e.total}function N6(e,t){for(let n of e)if(t(n))return n}const Ku={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};class $u{constructor(e,t,n){let s=0,o=0,i=0;this.viewports=n.map(({from:n,to:o})=>{let i=t.lineAt(n,w.ByPos,e,0,0).top,a=t.lineAt(o,w.ByPos,e,0,0).bottom;return s+=a-i,{from:n,to:o,top:i,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let n=0,s=0,o=0;;n++){let t=nt.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function Jn(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),s=t.toDOM(e.bottom);return new Ie(e.from,e.length,n,s-n,Array.isArray(e._content)?e._content.map(e=>Jn(e,t)):e._content)}const ss=a.define({combine:e=>e.join(" ")}),Li=a.define({combine:e=>e.indexOf(!0)>-1}),Ri=Ze.newName(),Bu=Ze.newName(),Nu=Ze.newName(),Mu={"&light":"."+Bu,"&dark":"."+Nu};function Bi(e,t,n){return new Ze(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t=="&")return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t}})}const Y6=Bi("."+Ri,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Mu),Z6={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Wi=i.ie&&i.ie_version<=11;class tp{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Mp,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(i.ie&&i.ie_version<=11||i.ios&&e.composing)&&t.some(e=>e.type=="childList"&&e.removedNodes.length||e.type=="characterData"&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(i.chrome&&i.chrome_version<126)&&(this.editContext=new rp(e),e.state.facet(Qe)&&(e.contentDOM.editContext=this.editContext.editContext)),Wi&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var e;((e=this.view.docView)===null||e===void 0?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){if((e.type=="change"||!e.type)&&!e.matches)return;this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let o=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,t=this.selectionRange;if(n.state.facet(Qe)?n.root.activeElement!=this.dom:!go(n.dom,t))return;let s=t.anchorNode&&n.docView.nearest(t.anchorNode);if(s&&s.ignoreEvent(e)){o||(this.selectionChanged=!1);return}(i.ie&&i.ie_version<=11||i.android&&i.chrome)&&!n.state.selection.main.empty&&t.focusNode&&nn(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=yn(e.root);if(!n)return!1;let t=i.safari&&e.root.nodeType==11&&yg(this.dom.ownerDocument)==this.dom&&ap(this.view,n)||n;if(!t||this.selectionRange.eq(t))return!1;let s=go(this.dom,t);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now();let t=this.flush();!t&&e.force&&Gt(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let n=this.pendingRecords();n.length&&(this.queue=[]);let e=-1,t=-1,s=!1;for(let i of n){let o=this.readMutation(i);if(!o)continue;o.typeOver&&(s=!0),e==-1?{from:e,to:t}=o:(e=Math.min(o.from,e),t=Math.max(o.to,t))}return{from:e,to:t,typeOver:s}}readChange(){let{from:e,to:n,typeOver:s}=this.processRecords(),o=this.selectionChanged&&go(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let t=new V2(this.view,e,n,s);return this.view.docView.domChanged={newSel:t.newSel?t.newSel.main:null},t}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=D2(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=fu(t,e.previousSibling||e.target.previousSibling,-1),s=fu(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Qe)!=e.state.facet(Qe)&&(e.view.contentDOM.editContext=e.state.facet(Qe)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0?void 0:e.disconnect(),(t=this.gapIntersection)===null||t===void 0?void 0:t.disconnect(),(n=this.resizeScroll)===null||n===void 0?void 0:n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function fu(e,t,n){for(;t;){let s=j.get(t);if(s&&s.parent==e)return s;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function mu(e,t){let o=t.startContainer,i=t.startOffset,n=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return nn(a.node,a.offset,n,s)&&([o,i,n,s]=[n,s,o,i]),{anchorNode:o,anchorOffset:i,focusNode:n,focusOffset:s}}function ap(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return mu(e,n)}let n=null;function s(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",s,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",s,!0),n?mu(e,n):null}class rp{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let{anchor:o}=e.state.selection.main,s={from:this.toEditorPos(n.updateRangeStart),to:this.toEditorPos(n.updateRangeEnd),insert:f.of(n.text.split(` -`))};if(s.from==this.from&&othis.to&&(s.to=o),s.from==s.to&&!s.insert.length)return;this.pendingContextChange=s,e.state.readOnly||ji(e,s,t.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=t=>{let o=[],s=null;for(let i=this.toEditorPos(t.rangeStart),a=this.toEditorPos(t.rangeEnd);i{let n=[];for(let e of t.getTextFormats()){let s=e.underlineStyle,o=e.underlineThickness;if(s!="None"&&o!="None"){let t=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${o=="Thin"?1:2}px`;n.push(c.mark({attributes:{style:t}}).range(this.toEditorPos(e.rangeStart),this.toEditorPos(e.rangeEnd)))}}e.dispatch({effects:g0.of(c.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let e in this.handlers)n.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=yn(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,s=!1,t=this.pendingContextChange;return e.changes.iterChanges((o,i,a,r,c)=>{if(s)return;let l=c.length-(i-o);if(t&&i>=t.to){if(t.from==o&&t.to==i&&t.insert.eq(c)){t=this.pendingContextChange=null,n+=l,this.to+=l;return}t=null,this.revertPending(e.state)}if(o+=n,i+=n,i<=this.from)this.from+=l,this.to+=l;else if(othis.to||this.to-this.from+c.length>3e4){s=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),c.toString()),this.to+=l}n+=l}),t&&!s&&this.revertPending(e.state),!s}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class o{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||xp(e.parent)||document,this.viewState=new t1(e.state||h.create(e)),e.scrollTo&&e.scrollTo.is(hs)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Yn).map(e=>new yr(e));for(let e of this.plugins)e.update(this);this.observer=new tp(this),this.inputState=new k3(this),this.inputState.ensureHandlers(this.plugins),this.docView=new T0(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),((t=document.fonts)===null||t===void 0?void 0:t.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof S?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let r=!1,u=!1,n,s=this.state;for(let t of e){if(t.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=t.state}if(this.destroyed){this.viewState.state=s;return}let c=this.hasFocus,d=0,i=null;e.some(e=>e.annotation(J4))?(this.inputState.notifiedFocused=c,d=1):c!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=c,i=Q4(s,c),i||(d=1));let l=this.observer.delayedAndroidKey,a=null;if(l?(this.observer.clearDelayedAndroidKey(),a=this.observer.readChange(),(a&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(a=null)):this.observer.clear(),s.facet(h.phrases)!=this.state.facet(h.phrases))return this.setState(s);n=Fa.create(this,s,e),n.flags|=d;let o=this.viewState.scrollTarget;try{this.updateState=2;for(let n of e){if(o&&(o=o.map(n.changes)),n.scrollIntoView){let{main:e}=n.state.selection;o=new es(e.empty?e:t.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of n.effects)e.is(hs)&&(o=e.value.clip(this.state))}this.viewState.update(n,o),this.bidiCache=Ji.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),r=this.docView.update(n),this.state.facet(In)!=this.styleModules&&this.mountStyles(),u=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(ss)!=n.state.facet(ss)&&(this.viewState.mustMeasureContent=!0),(r||u||o||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),r&&this.docViewUpdate(),!n.empty)for(let e of this.state.facet(Ci))try{e(n)}catch(e){K(this.state,e,"update listener")}(i||a)&&Promise.resolve().then(()=>{i&&this.state==i.startState&&this.dispatch(i),a&&!D2(this,a)&&l.force&&Gt(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new t1(e),this.plugins=e.facet(Yn).map(e=>new yr(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new T0(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Yn),n=e.state.facet(Yn);if(t!=n){let s=[];for(let o of n){let i=t.indexOf(o);if(i<0)s.push(new yr(o));else{let t=this.plugins[i];t.mustUpdate=e,s.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:t}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(t=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(t<0)if(tu(i))o=-1,t=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(s);o=e.from,t=e.top}this.updateState=1;let r=this.viewState.measure(this);if(!r&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];r&4||([this.measureRequests,a]=[a,this.measureRequests]);let d=a.map(e=>{try{return e.read(this)}catch(e){return K(this.state,e),Yd}}),e=Fa.create(this,this.state,[]),c=!1;e.flags|=r,n?n.flags|=r:n=e,this.updateState=2,e.empty||(this.updatePlugins(e),this.inputState.update(e),this.updateAttrs(),c=this.docView.update(e),c&&this.docViewUpdate());for(let e=0;e1||e<-1){s=s+e,i.scrollTop=s/this.scaleY,t=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let e of this.state.facet(Ci))e(n)}get themeClasses(){return Ri+" "+(this.state.facet(Li)?Nu:Bu)+" "+this.state.facet(ss)}updateAttrs(){let t=qd(this,qr,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Qe)?"true":"false",class:"cm-content",style:`${i.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),qd(this,ar,e);let n=this.observer.ignore(()=>{let n=Pi(this.contentDOM,this.contentAttrs,e),s=Pi(this.dom,this.editorAttrs,t);return n||s});return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(o.announce)){t&&(this.announceDOM.textContent=""),t=!1;let n=this.announceDOM.appendChild(document.createElement("div"));n.textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(In);let e=this.state.facet(o.cspNonce);Ze.mount(this.root,this.styleModules.concat(Y6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null)for(let t=0;tt.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Ni(this,e,O2(this,e,t,n))}moveByGroup(e,t){return Ni(this,e,O2(this,e,t,t=>h3(this,e.head,t)))}visualLineSide(e,n){let s=this.bidiSpans(e),o=this.textDirectionAt(e.from),i=s[n?s.length-1:0];return t.cursor(i.side(n,o)+e.from,i.forward(!n,o)?1:-1)}moveToLineBoundary(e,t,n=!0){return p3(this,e,t,n)}moveVertically(e,t,n){return Ni(this,e,X2(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),j2(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),o=this.bidiSpans(s),i=o[Je.find(o,e-s.from,-1,t)];return yo(n,i.dir==y.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){let t=this.state.facet(l0);return!t||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Cp)return Z1(e.length);let n=this.textDirectionAt(e.from),t;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||S1(s.isolates,t=w0(this,e))))return s.order;t||(t=w0(this,e));let s=U6(e.text,n,t);return this.bidiCache.push(new Ji(e.from,e.to,n,t,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||i.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{$d(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return hs.of(new es(typeof e=="number"?t.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:s}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return hs.of(new es(t.cursor(n.from),"start","start",n.top-e,s,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return A.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return A.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Ze.newName(),s=[ss.of(n),In.of(Bi(`.${n}`,e))];return t&&t.dark&&s.push(Li.of(!0)),s}static baseTheme(e){return Re.lowest(In.of(Bi("."+Ri,e,Mu)))}static findFromDOM(e){var t;let s=e.querySelector(".cm-content"),n=s&&j.get(s)||j.get(e);return((t=n?.rootView)===null||t===void 0?void 0:t.view)||null}}o.styleModule=In,o.inputHandler=$4,o.scrollHandler=h0,o.focusChangeEffect=s0,o.perLineTextDirection=l0,o.exceptionSink=O4,o.updateListener=Ci,o.editable=Qe,o.mouseSelectionStyle=w4,o.dragMovesSelection=y4,o.clickAddsSelectionRange=j4,o.decorations=Un,o.outerDecorations=b0,o.atomicRanges=sr,o.bidiIsolatedRanges=_0,o.scrollMargins=M0,o.darkTheme=Li,o.cspNonce=a.define({combine:e=>e.length?e[0]:""}),o.contentAttributes=ar,o.editorAttributes=qr,o.lineWrapping=o.contentAttributes.of({class:"cm-lineWrapping"}),o.announce=d.define();const Cp=4096,Yd={};class Ji{constructor(e,t,n,s,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:y.LTR;for(let i=Math.max(0,e.length-10);i=0;s--){let o=i[s],a=typeof o=="function"?o(e):o;a&&Fi(a,n)}return n}const Ap=i.mac?"mac":i.windows?"win":i.linux?"linux":"key";function Zp(e,t){const s=e.split(/-(?!$)/);let n=s[s.length-1];n=="Space"&&(n=" ");let a,o,r,i;for(let n=0;ne.concat(t),[]))),n}function sg(e,t,n){return fd(xd(e.state),t,e,n)}let rt=null;const rg=4e3;function cg(e,t=Ap){let n=Object.create(null),s=Object.create(null),o=(e,t)=>{let n=s[e];if(n==null)s[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,s,i,a,r)=>{var l,d;let c=n[e]||(n[e]=Object.create(null)),u=s.split(/ (?!$)/).map(e=>Zp(e,t));for(let n=1;n{let s=rt={view:n,prefix:t,scope:e};return setTimeout(()=>{rt==s&&(rt=null)},rg),!0}]})}let h=u.join(" ");o(h,!1);let m=c[h]||(c[h]={preventDefault:!1,stopPropagation:!1,run:((d=(l=c._any)===null||l===void 0?void 0:l.run)===null||d===void 0?void 0:d.slice())||[]});i&&m.run.push(i),a&&(m.preventDefault=!0),r&&(m.stopPropagation=!0)};for(let s of e){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let t of a){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=s;for(let t in e)e[t].run.push(e=>o(e,ha))}let o=s[t]||s.key;if(!o)continue;for(let e of a)i(e,o,s.run,s.preventDefault,s.stopPropagation),s.shift&&i(e,"Shift-"+o,s.shift,s.preventDefault,s.stopPropagation)}return n}let ha=null;function fd(e,t,n,s){ha=t;let a=xg(t),g=N(a,0),u=ne(g)==a.length&&a!=" ",c="",o=!1,h=!1,m=!1;rt&&rt.view==n&&rt.scope==s&&(c=rt.prefix+" ",r2.indexOf(t.keyCode)<0&&(h=!0,rt=null));let p=new Set,l=e=>{if(e){for(let t of e.run)if(!p.has(t)&&(p.add(t),t(n)))return e.stopPropagation&&(m=!0),!0;e.preventDefault&&(e.stopPropagation&&(m=!0),h=!0)}return!1},r=e[s],d,f;return r&&(l(r[c+Gs(a,t,!u)])?o=!0:u&&(t.altKey||t.metaKey||t.ctrlKey)&&!(i.windows&&t.ctrlKey&&t.altKey)&&(d=Ae[t.keyCode])&&d!=a?l(r[c+Gs(d,t,!0)])?o=!0:t.shiftKey&&(f=Kt[t.keyCode])!=a&&f!=d&&l(r[c+Gs(f,t,!1)])&&(o=!0):u&&t.shiftKey&&l(r[c+Gs(a,t,!0)])&&(o=!0),!o&&l(r._any)&&(o=!0)),h&&(o=!0),o&&m&&t.stopPropagation(),ha=null,o}class Bs{constructor(e,t,n,s,o){this.className=e,this.left=t,this.top=n,this.width=s,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let o=Kr(e);return[new Bs(t,s.left-o.left,s.top-o.top,null,s.bottom-s.top)]}return Tg(e,t,n)}}function Kr(e){let t=e.scrollDOM.getBoundingClientRect(),n=e.textDirection==y.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX;return{left:n-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function ud(e,t,n,s){let o=e.coordsAtPos(t,n*2);if(!o)return s;let r=e.dom.getBoundingClientRect(),c=(o.top+o.bottom)/2,i=e.posAtCoords({x:r.left+1,y:c}),a=e.posAtCoords({x:r.right-1,y:c});return i==null||a==null?s:{from:Math.max(s.from,Math.min(i,a)),to:Math.min(s.to,Math.max(i,a))}}function Tg(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let j=Math.max(n.from,e.viewport.from),O=Math.min(n.to,e.viewport.to),d=e.textDirection==y.LTR,w=e.contentDOM,f=w.getBoundingClientRect(),v=Kr(e),g=w.querySelector(".cm-line"),l=g&&window.getComputedStyle(g),m=f.left+(l?parseInt(l.paddingLeft)+Math.min(0,parseInt(l.textIndent)):0),h=f.right-(l?parseInt(l.paddingRight):0),r=Ii(e,j),c=Ii(e,O),s=r.type==P.Text?r:null,o=c.type==P.Text?c:null;if(s&&(e.lineWrapping||r.widgetLineBreaks)&&(s=ud(e,j,1,s)),o&&(e.lineWrapping||c.widgetLineBreaks)&&(o=ud(e,O,-1,o)),s&&o&&s.from==o.from&&s.to==o.to)return u(p(n.from,n.to,s));let a=s?p(n.from,null,s):_(r,!1),i=o?p(null,n.to,o):_(c,!0),x=[];return(s||r).to<(o||c).from-(s&&o?1:0)||r.widgetLineBreaks>1&&a.bottom+e.defaultLineHeight/2i&&s.from=c)break;u>o&&l(Math.max(d,o),t==null&&d<=i,Math.min(u,c),n==null&&u>=a,s.dir)}if(o=r.to+1,o>=c)break}return o.length==0&&l(i,t==null,a,n==null,e.textDirection),{top:r,bottom:c,horizontal:o}}function _(e,t){let n=f.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function Ng(e,t){return e.constructor==t.constructor&&e.eq(t)}class Rg{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Ls)!=e.state.facet(Ls)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(Ls);for(;t!Ng(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ls=a.define();function Jl(e){return[A.define(t=>new Rg(t,e)),Ls.of(e)]}const Zl=!i.ios,Tn=a.define({combine(e){return ye(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Bg(e={}){return[Tn.of(e),qg,Xg,t5,d0.of(!0)]}function Gl(e){return e.startState.facet(Tn)!=e.state.facet(Tn)}const qg=Jl({above:!0,markers(e){let{state:n}=e,o=n.facet(Tn),s=[];for(let i of n.selection.ranges){let a=i==n.selection.main;if(i.empty?!a||Zl:o.drawRangeCursor){let n=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:t.cursor(i.head,i.head>i.anchor?-1:1);for(let t of Bs.forRange(e,n,o))s.push(t)}}return s},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=Gl(e);return n&&ql(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){ql(t.state,e)},class:"cm-cursorLayer"});function ql(e,t){t.style.animationDuration=e.facet(Tn).cursorBlinkRate+"ms"}const Xg=Jl({above:!1,markers(e){return e.state.selection.ranges.map(t=>t.empty?[]:Bs.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t))},update(e){return e.docChanged||e.selectionSet||e.viewportChanged||Gl(e)},class:"cm-selectionLayer"}),Sa={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Zl&&(Sa[".cm-line"].caretColor=Sa[".cm-content"].caretColor="transparent !important");const t5=Re.highest(o.theme(Sa)),Bl=d.define({map(e,t){return e==null?null:t.mapPos(e)}}),gn=R.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(Bl)?t.value:e,e)}}),n5=A.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(gn);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0?void 0:t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(gn)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,n=e.state.field(gn),t=n!=null&&e.coordsAtPos(n);if(!t)return null;let s=e.scrollDOM.getBoundingClientRect();return{left:t.left-s.left+e.scrollDOM.scrollLeft*e.scaleX,top:t.top-s.top+e.scrollDOM.scrollTop*e.scaleY,height:t.bottom-t.top}}drawCursor(e){if(this.cursor){let{scaleX:n,scaleY:t}=this.view;e?(this.cursor.style.left=e.left/n+"px",this.cursor.style.top=e.top/t+"px",this.cursor.style.height=e.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(gn)!=e&&this.view.dispatch({effects:Bl.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function $5(){return[gn,n5]}function Rl(e,t,n,s,o){t.lastIndex=0;for(let i=e.iterRange(n,s),r=n,a;!i.next().done;r+=i.value.length)if(!i.lineBreak)for(;a=t.exec(i.value);)o(r+a.index,a)}function W5(e,t){let s=e.visibleRanges;if(s.length==1&&s[0].from==e.viewport.from&&s[0].to==e.viewport.to)return s;let n=[];for(let{from:o,to:i}of s)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),n.length&&n[n.length-1].to>=o?n[n.length-1].to=i:n.push({from:o,to:i});return n}class U5{constructor(e){const{regexp:n,decoration:t,decorate:s,boundary:o,maxLength:i=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,s)this.addMatch=(e,t,n,o)=>s(o,n,n+e[0].length,e,t);else if(typeof t=="function")this.addMatch=(e,n,s,o)=>{let i=t(e,n,s);i&&o(s,s+e[0].length,i)};else if(t)this.addMatch=(e,n,s,o)=>o(s,s+e[0].length,t);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=i}createDeco(e){let t=new vt,n=t.add.bind(t);for(let{from:t,to:s}of W5(e,this.maxLength))Rl(e.state.doc,this.regexp,t,s,(t,s)=>this.addMatch(s,e,t,n));return t.finish()}updateDeco(e,t){let s=1e9,n=-1;return e.docChanged&&e.changes.iterChanges((t,o,i,a)=>{a>e.view.viewport.from&&i1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),s,n):t}updateRange(e,t,n,s){for(let a of e.visibleRanges){let i=Math.max(a.from,n),o=Math.min(a.to,s);if(o>i){let n=e.state.doc.lineAt(i),s=n.ton.from;i--)if(this.boundary.test(n.text[i-1-n.from])){r=i;break}for(;od.push(n.range(e,t));if(n==s)for(this.regexp.lastIndex=r-n.from;(l=this.regexp.exec(n.text))&&l.indexthis.addMatch(n,e,t,u));t=t.update({filterFrom:r,filterTo:c,filter:(e,t)=>ec,add:d})}}return t}}const Pa=/x/.unicode!=null?"gu":"g",K5=new RegExp(`[\x00- ---Ÿ­؜​‎‏

‭‮⁦⁧⁩-]`,Pa),q5={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ba=null;function Q5(){var e;if(Ba==null&&typeof document!="undefined"&&document.body){let t=document.body.style;Ba=((e=t.tabSize)!==null&&e!==void 0?e:t.MozTabSize)!=null}return Ba||!1}const Ss=a.define({combine(e){let t=ye(e,{render:null,specialChars:K5,addSpecialChars:null});return(t.replaceTabs=!Q5())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,Pa)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Pa)),t}});function Ml(e={}){return[Ss.of(e),Z5()]}let Sl=null;function Z5(){return Sl||(Sl=A.fromClass(class{constructor(e){this.view=e,this.decorations=c.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Ss)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new U5({regexp:e.specialChars,decoration:(t,n,s)=>{let{doc:i}=n.state,o=N(t[0],0);if(o==9){let t=i.lineAt(s),e=n.state.tabSize,o=me(t.text,e,s-t.from);return c.replace({widget:new v7((e-o%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=c.replace({widget:new h7(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Ss);e.startState.facet(Ss)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))}const J5="•";function r7(e){return e>=32?J5:e==10?"␤":String.fromCharCode(9216+e)}class h7 extends Le{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let s=r7(this.code),n=e.state.phrase("Control character")+" "+(q5[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,s);if(o)return o;let t=document.createElement("span");return t.textContent=s,t.title=n,t.setAttribute("aria-label",n),t.className="cm-specialChar",t}ignoreEvent(){return!1}}class v7 extends Le{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function y7(){return S7}const A7=c.line({class:"cm-activeLine"}),S7=A.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let o of e.state.selection.ranges){let s=e.lineBlockAt(o.head);s.from>t&&(n.push(A7.range(s.from)),t=s.from)}return c.set(n)}},{decorations:e=>e.decorations}),er=2e3;function M7(e,n,s){let i=Math.min(n.line,s.line),a=Math.max(n.line,s.line),o=[];if(n.off>er||s.off>er||n.col<0||s.col<0){let c=Math.min(n.off,s.off),r=Math.max(n.off,s.off);for(let n=i;n<=a;n++){let s=e.doc.line(n);s.length<=r&&o.push(t.range(s.from+c,s.to+r))}}else{let r=Math.min(n.col,s.col),c=Math.max(n.col,s.col);for(let s=i;s<=a;s++){let n=e.doc.line(s),l=Di(n.text,r,e.tabSize,!0);if(l<0)o.push(t.cursor(n.to));else{let s=Di(n.text,c,e.tabSize);o.push(t.range(n.from+l,n.from+s))}}}return o}function T7(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function gl(e,t){let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(s),o=s-n.from,i=o>er?-1:o==n.length?T7(e,t.clientX):me(n.text,e.state.tabSize,s-n.from);return{line:n.number,col:i,off:o}}function z7(e,n){let s=gl(e,n),o=e.state.selection;return s?{update(e){if(e.docChanged){let n=e.changes.mapPos(e.startState.doc.line(s.line).from),t=e.state.doc.lineAt(n);s={line:t.number,col:s.col,off:Math.min(s.off,t.length)},o=o.map(e.changes)}},get(n,i,a){let c=gl(e,n);if(!c)return o;let r=M7(e.state,s,c);return r.length?a?t.create(r.concat(o.ranges)):t.create(r):o}}:null}function q7(){let t=e=>e.altKey&&e.button==0;return o.mouseSelectionStyle.of((e,n)=>t(n)?z7(e,n):null)}const G7={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},mv={style:"cursor: crosshair"};function pv(e={}){let[n,t]=G7[e.key||"Alt"],s=A.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==n||t(e))},keyup(e){(e.keyCode==n||!t(e))&&this.set(!1)},mousemove(e){this.set(t(e))}}});return[s,o.contentAttributes.of(e=>{var t;return((t=e.plugin(s))===null||t===void 0?void 0:t.isDown)?mv:null})]}const vn="-10000px";class Uc{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let o=null;this.tooltipViews=this.tooltips.map(e=>o=n(e,o))}update(e,t){var o;let i=e.state.facet(this.facet),a=i.filter(e=>e);if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],n=t?[]:null;for(let o=0;ot[n]=e),t.length=n.length),this.input=i,this.tooltips=a,this.tooltipViews=s,!0}}function Mv(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const hr=a.define({combine:e=>{var t,n,s;return{position:i.ios?"absolute":((t=e.find(e=>e.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(e=>e.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((s=e.find(e=>e.tooltipSpace))===null||s===void 0?void 0:s.tooltipSpace)||Mv}}}),Pc=new WeakMap,fr=A.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(hr);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Uc(e,vr,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let s=this.manager.update(e,this.above);s&&this.observeIntersection();let n=s||e.geometryChanged,t=e.state.facet(hr);if(t.position!=this.position&&!this.madeAbsolute){this.position=t.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(t.parent!=this.parent){this.parent&&this.container.remove(),this.parent=t.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),s=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=vn,n.dom.style.left="0px",this.container.insertBefore(n.dom,s),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)===null||e===void 0?void 0:e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect(),(n=this.intersectionObserver)===null||n===void 0?void 0:n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let s=this.view.dom.getBoundingClientRect(),t=1,n=1,e=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(i.gecko)e=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==vn&&t.style.left=="0px"){let n=t.getBoundingClientRect();e=Math.abs(n.top+1e4)>1||Math.abs(n.left)>1}}if(e||this.position=="absolute")if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,n=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:n}=this.view.viewState);return{editor:s,parent:this.parent?this.container.getBoundingClientRect():s,pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(hr).tooltipSpace(this.view),scaleX:t,scaleY:n,makeAbsolute:e}}writeMeasure(e){var s;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:n,space:t,scaleX:o,scaleY:i}=e,a=[];for(let h=0;h=Math.min(n.bottom,t.bottom)||r.rightMath.min(n.right,t.right)+.1){c.style.top=vn;continue}let b=O.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,v=b?7:0,j=d.right-d.left,f=(s=Pc.get(l))!==null&&s!==void 0?s:d.bottom-d.top,m=l.offset||Tv,_=this.view.textDirection==y.LTR,g=d.width>t.right-t.left?_?t.left:t.right-d.width:_?Math.max(t.left,Math.min(r.left-(b?14:0)+m.x,t.right-j)):Math.min(Math.max(t.left,r.left-j+(b?14:0)-m.x),t.right-j),u=this.above[h];!O.strictSide&&(u?r.top-(d.bottom-d.top)-m.yt.bottom)&&u==t.bottom-r.bottom>r.top-t.top&&(u=this.above[h]=!u);let w=(u?r.top-t.top:t.bottom-r.bottom)-v;if(wg&&e.topp&&(p=u?e.top-f-2-v:e.bottom+v+2);if(this.position=="absolute"?(c.style.top=(p-e.parent.top)/i+"px",c.style.left=(g-e.parent.left)/o+"px"):(c.style.top=p/i+"px",c.style.left=g/o+"px"),b){let e=r.left+(_?m.x:-m.x)-(g+14-7);b.style.left=e/o+"px"}l.overlap!==!0&&a.push({left:g,top:p,right:x,bottom:p+f}),c.classList.toggle("cm-tooltip-above",u),c.classList.toggle("cm-tooltip-below",!u),l.positioned&&l.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=vn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Fv=o.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Tv={x:0,y:0},vr=a.define({enables:[fr,Fv]}),ys=a.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class jr{static create(e){return new jr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Uc(e,ys,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0?void 0:e.call(t)}passProp(e){let t=void 0;for(let s of this.manager.tooltipViews){let n=s[e];if(n!==void 0)if(t===void 0)t=n;else if(t!==n)return void 0}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Nv=vr.compute([ys],e=>{let t=e.facet(ys);return t.length===0?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return(t=e.end)!==null&&t!==void 0?t:e.pos})),create:jr.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class Rv{constructor(e,t,n,s,o){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;et.bottom||s.xt.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(n)).find(e=>e.from<=n&&e.to>=n),a=o&&o.dir==y.RTL?-1:1;i=s.x{this.pending==s&&(this.pending=null,t&&!(Array.isArray(t)&&!t.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(t)?t:[t])}))},t=>K(e.state,t,"hover tooltip"))}else t&&!(Array.isArray(t)&&!t.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(t)?t:[t])})}get tooltip(){let e=this.view.plugin(fr),t=e?e.manager.tooltips.findIndex(e=>e.create==jr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:o}=this;if(s.length&&o&&!Uv(o.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,i=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==i?this.view.posAtCoords(this.lastMove)!=o:!i9(this.view,o,i,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this,n=t&&t.dom.contains(e.relatedTarget);n?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const bs=4;function Uv(e,t){let n=e.getBoundingClientRect();return t.clientX>=n.left-bs&&t.clientX<=n.right+bs&&t.clientY>=n.top-bs&&t.clientY<=n.bottom+bs}function i9(e,t,n,s,o){let a=e.scrollDOM.getBoundingClientRect(),c=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>s||a.righto||Math.min(a.bottom,c)=t&&r<=n}function d9(e,t={}){let s=d.define(),n=R.define({create(){return[]},update(e,n){if(e.length&&(t.hideOnChange&&(n.docChanged||n.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(n,e))),n.docChanged)){let t=[];for(let s of e){let o=n.changes.mapPos(s.pos,-1,z.TrackDel);if(o!=null){let e=Object.assign(Object.create(null),s);e.pos=o,e.end!=null&&(e.end=n.changes.mapPos(e.end)),t.push(e)}}e=t}for(let t of n.effects)t.is(s)&&(e=t.value),t.is(g9)&&(e=[]);return e},provide:e=>ys.from(e)});return{active:n,extension:[n,A.define(o=>new Rv(o,e,n,s,t.hoverTime||300)),Nv]}}function Oc(e,t){let n=e.plugin(fr);if(!n)return null;let s=n.manager.tooltips.indexOf(t);return s<0?null:n.manager.tooltipViews[s]}const g9=d.define(),jc=a.define({combine(e){let t,n;for(let s of e)t=t||s.topContainer,n=n||s.bottomContainer;return{topContainer:t,bottomContainer:n}}});function zn(e,t){let n=e.plugin(vc),s=n?n.specs.indexOf(t):-1;return s>-1?n.panels[s]:null}const vc=A.fromClass(class{constructor(e){this.input=e.state.facet(Rn),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(jc);this.top=new ps(e,!0,t.topContainer),this.bottom=new ps(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(jc);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ps(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ps(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(Rn);if(n!=this.input){let t=n.filter(e=>e),s=[],o=[],i=[],a=[];for(let r of t){let c=this.specs.indexOf(r),n;c<0?(n=r(e.view),a.push(n)):(n=this.panels[c],n.update&&n.update(e)),s.push(n),(n.top?o:i).push(n)}this.specs=t,this.panels=s,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>o.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class ps{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=gc(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=gc(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!this.container||this.classes==this.view.themeClasses)return;for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}function gc(e){let t=e.nextSibling;return e.remove(),t}const Rn=a.define({enables:vc});class ze extends ht{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(){return!1}destroy(){}}ze.prototype.elementClass="",ze.prototype.toDOM=void 0,ze.prototype.mapMode=z.TrackBefore,ze.prototype.startSide=ze.prototype.endSide=-1,ze.prototype.point=!0;const us=a.define(),v9=a.define(),O9={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>m.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Wn=a.define();function x9(e){return[lc(),Wn.of(Object.assign(Object.assign({},O9),e))]}const dc=a.define({combine:e=>e.some(e=>e)});function lc(){let t=[A9];return t}const A9=A.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(Wn).map(t=>new Qr(e,t));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(dc),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let n=this.prevViewport,t=e.view.viewport,s=Math.min(n.to,t.to)-Math.max(n.from,t.from);this.syncGutters(s<(t.to-t.from)*.8)}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(dc)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let o=this.dom.nextSibling;e&&this.dom.remove();let s=m.iter(this.view.state.facet(us),this.view.viewport.from),t=[],n=this.gutters.map(e=>new V9(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(t.length&&(t=[]),Array.isArray(e.type)){{let o=!0;for(let i of e.type)if(i.type==P.Text&&o){Wr(s,t,i.from);for(let e of n)e.line(this.view,i,t);o=!1}else if(i.widget)for(let e of n)e.widget(this.view,i)}}else if(e.type==P.Text){Wr(s,t,e.from);for(let s of n)s.line(this.view,e,t)}else if(e.widget)for(let t of n)t.widget(this.view,e);for(let e of n)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,o)}updateGutters(e){let n=e.startState.facet(Wn),s=e.state.facet(Wn),t=e.docChanged||e.heightChanged||e.viewportChanged||!m.eq(e.startState.facet(us),e.state.facet(us),e.view.viewport.from,e.view.viewport.to);if(n==s)for(let n of this.gutters)n.update(e)&&(t=!0);else{t=!0;let o=[];for(let i of s){let t=n.indexOf(i);t<0?o.push(new Qr(this.view,i)):(this.gutters[t].update(e),o.push(this.gutters[t]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)this.dom.appendChild(e.dom);this.gutters=o}return t}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>o.scrollMargins.of(t=>{let n=t.plugin(e);return!n||n.gutters.length==0||!n.fixed?null:t.textDirection==y.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}})});function Jr(e){return Array.isArray(e)?e:[e]}function Wr(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class V9{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=m.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==s.elements.length){let t=new v0(e,i,o,n);s.elements.push(t),s.dom.appendChild(t.dom)}else s.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];Wr(this.cursor,s,t.from),n.length&&(s=s.concat(n));let o=this.gutter.config.lineMarker(e,t,s);o&&s.unshift(o);let i=this.gutter;if(s.length==0&&!i.config.renderEmptyElements)return;this.addElement(e,t,s)}widget(e,t){let s=this.gutter.config.widgetMarker(e,t.widget,t),n=s?[s]:null;for(let o of e.state.facet(v9)){let s=o(e,t.widget,t);s&&(n||(n=[])).push(s)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Qr{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let o=s.target,i;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=s.clientY;let a=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Jr(t.markers(e)),t.initialSpacer&&(this.spacer=new v0(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Jr(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let t=e.view.viewport;return!m.eq(this.markers,n,t.from,t.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class v0{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Q9(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let s="cm-gutterElement",n=this.dom.firstChild;for(let c=0,i=0;;){let a=i,o=cs(e,t,n)||o(e,t,n):o}return n}})}});class Ur extends ze{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function $r(e,t){return e.state.facet(qt).formatNumber(t,e.state)}const B9=Wn.compute([qt],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(X9)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Ur($r(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let o of e.state.facet(U9)){let s=o(e,t,n);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(qt)!=e.state.facet(qt),initialSpacer(e){return new Ur($r(e,nc(e.state.doc.lines)))},updateSpacer(e,t){let n=$r(t.view,nc(t.view.state.doc.lines));return n==e.number?e:new Ur(n)},domEventHandlers:e.facet(qt).domEventHandlers}));function tc(e={}){return[qt.of(e),lc(),B9]}function nc(e){let t=9;for(;t{let t=[],n=-1;for(let o of e.selection.ranges){let s=e.doc.lineAt(o.head).from;s>n&&(n=s,t.push(P9.range(s)))}return m.of(t)});function D9(){return N9}const ac=1024;let F9=0;class X{constructor(e,t){this.from=e,this.to=t}}class l{constructor(e={}){this.id=F9++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=T.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}l.closedBy=new l({deserialize:e=>e.split(" ")}),l.openedBy=new l({deserialize:e=>e.split(" ")}),l.group=new l({deserialize:e=>e.split(" ")}),l.isolate=new l({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),l.contextHash=new l({perNode:!0}),l.lookAhead=new l({perNode:!0}),l.mounted=new l({perNode:!0});class Gn{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[l.mounted.id]}}const E9=Object.create(null);class T{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):E9,s=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new T(e.name||"",t,e.id,s);if(e.props)for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(l.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return e=>{for(let s=e.prop(l.group),n=-1;n<(s?s.length:0);n++){let o=t[n<0?e.name:s[n]];if(o)return o}}}}T.none=new T("",Object.create(null),0,8);class ls{constructor(e){this.types=e;for(let t=0;t0;for(let e=this.cursor(n|b.IncludeAnonymous);;){let r=!1;if(e.from<=a&&e.to>=i&&(!s&&e.type.isAnonymous||o(e)!==!1)){if(e.firstChild())continue;r=!0}for(;;){if(r&&t&&(s||!e.type.isAnonymous)&&t(e),e.nextSibling())break;if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:gr(T.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new p(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new p(T.none,e,t,n)))}static build(e){return Lv(e)}}p.empty=new p(T.none,[],[],0);class bc{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new bc(this.buffer,this.index)}}class pt{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return T.none}toString(){let e=[];for(let t=0;t0))break;return a}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),i=0;for(let a=e,r=0;a=t&&nt;case 1:return n<=t&&s>t;case 2:return s>t;case 4:return!0}}function Cn(e,t,n,s){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?c.length:-1;e!=d;e+=t){let a=c[e],r=l[e]+i.from;if(!yc(s,n,r,r+a.length))continue;if(a instanceof pt){{if(o&b.ExcludeBuffers)continue;let c=a.findChild(0,a.buffer.length,t,n-r,s);if(c>-1)return new De(new r9(i,a,e,r),null,c)}}else if(o&b.IncludeAnonymous||!a.type.isAnonymous||_r(a)){let c;if(!(o&b.IgnoreMounts)&&(c=Gn.get(a))&&!c.overlay)return new W(c.tree,r,e,i);let l=new W(a,r,e,i);return o&b.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?a.children.length-1:0,t,n,s)}}if(o&b.IncludeAnonymous||!i.type.isAnonymous)return null;if(i.index>=0?e=i.index+t:e=t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let s;if(!(n&b.IgnoreOverlays)&&(s=Gn.get(this._tree))&&s.overlay){let n=e-this.from;for(let{from:e,to:o}of s.overlay)if((t>0?e<=n:e=n:o>n))return new W(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function xc(e,t,n,s){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(n!=null)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(s!=null&&o.type.is(s))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return s==null?i:[]}}function Cr(e,t,n=t.length-1){for(let s=e.parent;n>=0;s=s.parent){if(!s)return!1;if(!s.type.isAnonymous){if(t[n]&&t[n]!=s.name)return!1;n--}}return!0}class r9{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class De extends wc{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new De(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&b.ExcludeBuffers)return null;let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new De(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new De(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new De(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:e}=this.context,s=this.index+4,o=e.buffer[this.index+3];if(o>s){let i=e.buffer[this.index+1];t.push(e.slice(s,o,i)),n.push(0)}return new p(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ac(e){if(!e.length)return null;let n=0,t=e[0];for(let s=1;st.from||o.to=t){let a=new W(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[s])).push(Cn(a,t,n,!1))}}return o?Ac(o):s}class vs{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof W)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:s,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=s+n.buffer[e+1],this.to=s+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof W?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&b.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&b.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&b.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:n}=this.buffer,t=this.stack.length-1;if(e<0){{let e=t<0?0:this.stack[t]+4;if(this.index!=e)return this.yieldBuf(n.findChild(e,this.index,-1,0,4))}}else{let e=n.buffer[this.index+3];if(e<(t<0?n.buffer.length:n.buffer[this.stack[t]+3]))return this.yieldBuf(e)}return t<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,t,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let s=n+e,i=e<0?-1:t._tree.children.length;s!=i;s+=e){let o=t._tree.children[s];if(this.mode&b.IncludeAnonymous||o instanceof pt||!o.type.isAnonymous||_r(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let i=t;i;i=i._parent)if(i.index==s){if(s==this.index)return i;e=i,n=o+1;break scan}s=this.stack[--o]}for(let t=n;t=0;o--){if(o<0)return Cr(this.node,e,s);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[s]&&e[s]!=i.name)return!1;s--}}return!0}}function _r(e){return e.children.some(e=>e instanceof pt||!e.type.isAnonymous||_r(e))}function Lv(e){let{buffer:s,nodeSet:n,maxBufferLength:o=ac,reused:_=[],minRepeatType:i=n.types.length}=e,t=Array.isArray(s)?new bc(s,s.length):s,v=n.types,r=0,u=0;function m(e,s,a,l,d,h){let{id:O,start:p,end:x,size:C}=t,k=u;for(;C<0;){if(t.next(),C==-1){let t=_[O];a.push(t),l.push(p-e);return}if(C==-3){r=O;return}if(C==-4){u=O;return}throw new RangeError(`Unrecognized record size: ${C}`)}let A=v[O],E,w,S=p-e;if(x-p<=o&&(w=y(t.pos-s,d))){let s=new Uint16Array(w.size-w.skip),i=t.pos-w.size,o=s.length;for(;t.pos>i;)o=g(w.start,s,o);E=new pt(s,x-w.start,n),S=w.start-e}else{let l=t.pos-C;t.next();let e=[],n=[],s=O>=i?O:-1,a=0,r=x;for(;t.pos>l;)s>=0&&t.id==s&&t.size>=0?(t.end<=r-o&&(f(e,n,p,a,t.end,r,s,k),a=e.length,r=t.end),t.next()):h>2500?j(p,l,e,n):m(p,l,e,n,s,h+1);if(s>=0&&a>0&&a-1&&a>0){let t=b(A);E=gr(A,e,n,0,e.length,0,x-p,t,t)}else E=c(A,e,n,x-p,k-x)}a.push(E),l.push(S)}function j(e,s,i,a){let r=[],l=0,c=-1;for(;t.pos>s;){let{id:s,start:e,end:n,size:i}=t;if(i>4)t.next();else if(c>-1&&e=0;e-=3)t[n++]=r[e],t[n++]=r[e+1]-s,t[n++]=r[e+2]-s,t[n++]=n;i.push(new pt(t,r[2]-s,n)),a.push(s-e)}}function b(e){return(t,n,s)=>{let a=0,i=t.length-1,o,r;if(i>=0&&(o=t[i])instanceof p){if(!i&&o.type==e&&o.length==s)return o;(r=o.prop(l.lookAhead))&&(a=n[i]+o.length+r)}return c(e,t,n,s,a)}}function f(e,t,s,o,i,a,r,l){let d=[],u=[];for(;e.length>o;)d.push(e.pop()),u.push(t.pop()+s-i);e.push(c(n.types[r],d,u,a-i,l-a)),t.push(i-s)}function c(e,t,n,s,o=0,i){if(r){let e=[l.contextHash,r];i=i?[e].concat(i):[e]}if(o>25){let e=[l.lookAhead,o];i=i?[e].concat(i):[e]}return new p(e,t,n,s,i)}function y(e,n){let s=t.fork(),r=0,l=0,c=0,d=s.end-o,a={size:0,start:0,skip:0};scan:for(let u=s.pos-e;s.pos>u;){let t=s.size;if(s.id==n&&t>=0){a.size=r,a.start=l,a.skip=c,c+=4,r+=4,s.next();continue}let h=s.pos-t;if(t<0||h=i?4:0,m=s.start;for(s.next();s.pos>h;){if(s.size<0)if(s.size==-3)o+=4;else break scan;else s.id>=i&&(o+=4);s.next()}l=m,r+=t,c+=o}return(n<0||r==e)&&(a.size=r,a.start=l,a.skip=c),a.size>4?a:void 0}function g(e,n,s){let{id:a,start:c,end:l,size:o}=t;if(t.next(),o>=0&&a4){let i=t.pos-(o-4);for(;t.pos>i;)s=g(e,n,s)}n[--s]=i,n[--s]=l-e,n[--s]=c-e,n[--s]=a}else o==-3?r=a:o==-4&&(u=a);return s}let a=[],d=[];for(var h;t.pos>0;)m(e.start||0,e.bufferStart||0,a,d,-1,0);let w=(h=e.length)!==null&&h!==void 0?h:a.length?d[0]+a[0].length:0;return new p(v[e.topID],a.reverse(),d.reverse(),w)}const Dc=new WeakMap;function js(e,t){if(!e.isAnonymous||t instanceof pt||t.type!=e)return 1;let n=Dc.get(t);if(n==null){n=1;for(let s of t.children){if(s.type!=e||!(s instanceof p)){n=1;break}n+=js(e,s)}Dc.set(t,n)}return n}function gr(e,t,n,s,o,i,a,r,c){let d=0;for(let n=s;n=u)break;p+=n}if(r==d+1){if(p>u){let e=t[d];m(e.children,e.positions,0,e.children.length,n[d]+a);continue}l.push(t[d])}else{let s=n[r-1]+t[r-1].length-f;l.push(gr(e,t,n,d,r,f,s,null,c))}h.push(f+a-i)}}return m(t,n,s,o,0),(r||c)(l,h,a)}class pr{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof De?this.setBuffer(e.context.buffer,e.index,t):e instanceof W&&this.map.set(e.tree,t)}get(e){return e instanceof De?this.getBuffer(e.context.buffer,e.index):e instanceof W?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ye{constructor(e,t,n,s,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(o?1:0)|(i?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new Ye(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&s.push(n);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],i=1,s=e.length?e[0]:null;for(let l=0,d=0,r=0;;l++){let a=l=n)for(;s&&s.from=t.from||c<=t.to||r){let e=Math.max(t.from,d)-r,n=Math.min(t.to,c)-r;t=e>=n?null:new Ye(e,n,t.tree,t.offset+r,l>0,!!a)}if(t&&o.push(t),s.to>c)break;s=inew X(e.from,e.to)):[new X(0,0)]:[new X(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let e=s.advance();if(e)return e}}}class Sv{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Bc(e){return(t,n,s,o)=>new wv(t,e,n,s,o)}class Vc{constructor(e,t,n,s,o){this.parser=e,this.parse=t,this.overlay=n,this.target=s,this.from=o}}function $c(e){if(!e.length||e.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class Av{constructor(e,t,n,s,o,i,a){this.parser=e,this.predicate=t,this.mounts=n,this.index=s,this.start=o,this.target=i,this.prev=a,this.depth=0,this.ranges=[]}}const dr=new l({perNode:!0});class wv{constructor(e,t,n,s,o){this.nest=t,this.input=n,this.fragments=s,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new p(e.type,e.children,e.positions,e.length,e.propValues.concat([[dr,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[l.mounted.id]=new Gn(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)a=!1;else if(s.hasNode(e)){if(t){let n=t.mounts.find(t=>t.frag.from<=e.from&&t.frag.to>=e.to&&t.mount.overlay);if(n)for(let i of n.mount.overlay){let s=i.from+n.pos,o=i.to+n.pos;s>=e.from&&o<=e.to&&!t.ranges.some(e=>e.froms)&&t.ranges.push({from:s,to:o})}}a=!1}else if(n&&(r=_v(n.ranges,e.from,e.to)))a=r!=2;else if(!e.type.isAnonymous&&(o=this.nest(e,this.input))&&(e.fromnew X(t.from-e.from,t.to-e.from)):null,e.tree,t.length?t[0].from:e.from)),o.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):a=!1}}else t&&(i=t.predicate(e))&&(i===!0&&(i=new X(e.from,e.to)),i.fromnew X(e.from-t.start,e.to-t.start)),t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function _v(e,t,n){for(let s of e){if(s.from>=n)break;if(s.to>t)return s.from<=t&&s.to>=n?2:1}return 0}function Yc(e,t,n,s,o,i){if(t=e&&t.enter(n,1,b.IgnoreOverlays|b.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof p)t=t.children[0];else break}return!1}}let bv=class FragmentCursor{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(dr))!==null&&t!==void 0?t:n.to,this.inner=new Xc(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(dr))!==null&&e!==void 0?e:t.to,this.inner=new Xc(t.tree,-t.offset)}}findMounts(e,t){var n;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let o=(n=e.tree)===null||n===void 0?void 0:n.prop(l.mounted);if(o&&o.parser==t)for(let n=this.fragI;n=e.to)break;t.tree==this.curFrag.tree&&s.push({frag:t,pos:e.from-t.offset,mount:o})}}}return s}};function Zc(e,t){let n=null,s=t;for(let a=1,o=0;a=i)break;if(e.to<=r)continue;n||(s=n=t.slice()),e.fromi&&n.splice(o+1,0,new X(i,e.to))):e.to>i?n[o--]=new X(i,e.to):n.splice(o--,1)}}return s}function vv(e,t,n,s){let r=0,c=0,o=!1,i=!1,a=-1e9,l=[];for(;;){let d=r==e.length?1e9:o?e[r].to:e[r].from,u=c==t.length?1e9:i?t[c].to:t[c].from;if(o!=i){let e=Math.max(a,n),t=Math.min(d,u,s);enew X(e.from+a,e.to+a)),e=vv(t,l,r,c);for(let t=0,a=r;;t++){let d=t==e.length,l=d?c:e[t].from;if(l>a&&n.push(new Ye(a,l,o.tree,-i,s.from>=a||s.openStart,s.to<=l||s.openEnd)),d)break;a=e[t].to}}else n.push(new Ye(r,c,o.tree,-i,s.from>=i||s.openStart,s.to<=l||s.openEnd))}return n}let gv=0,je=class Tag{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=gv++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let s=typeof e=="string"?e:"?";if(e instanceof Ma&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let n=new Ma(s,[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new rr(e);return e=>e.modified.indexOf(t)>-1?e:rr.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},fv=0;class rr{constructor(e){this.name=e,this.instances=[],this.id=fv++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>n.base==e&&iv(t,n.modified));if(n)return n;let s=[],o=new je(e.name,s,e,t);for(let e of t)e.instances.push(o);let i=Z7(t);for(let t of e.set)if(!t.modified.length)for(let e of i)s.push(rr.get(t,e));return o}}function iv(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Z7(e){let t=[[]];for(let n=0;nt.length-e.length)}function fe(e){let t=Object.create(null);for(let s in e){let n=e[s];Array.isArray(n)||(n=[n]);for(let e of s.split(" "))if(e){let s=[],o=2,i=e;for(let t=0;;){if(i=="..."&&t>0&&t+3==e.length){o=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^/!]+/.exec(i);if(!n)throw new RangeError("Invalid path: "+e);if(s.push(n[0]=="*"?"":n[0][0]=='"'?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&a=="!"){o=0;break}if(a!="/")throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=s.length-1,r=s[a];if(!r)throw new RangeError("Invalid path: "+e);let c=new Os(n,o,a>0?s.slice(0,a):null);t[r]=c.sort(t[r])}}return cl.add(t)}const cl=new l;class Os{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let t=o;for(let s of e)for(let o of s.set){let e=n[o.id];if(e){t=t?t+" "+e:e;break}}return t},scope:s}}function W7(e,t){let n=null;for(let o of e){let s=o.style(t);s&&(n=n?n+" "+s:s)}return n}function I7(e,t,n,s=0,o=e.length){let i=new H7(s,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),s,o,"",i.highlighters),i.flush(o)}class H7{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,o){let{type:u,from:i,to:h}=e;if(i>=n||h<=t)return;u.isTop&&(o=this.highlighters.filter(e=>!e.scope||e.scope(u)));let a=s,c=D7(e)||Os.empty,d=W7(o,c.tags);if(d&&(a&&(a+=" "),a+=d,c.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(t,i),a),c.opaque)return;let r=e.tree&&e.tree.prop(l.mounted);if(r&&r.overlay){let l=e.node.enter(r.overlay[0].from+i,1),d=this.highlighters.filter(e=>!e.scope||e.scope(r.tree.type)),c=e.firstChild();for(let p=0,u=i;;p++){let m=p=g||!e.nextSibling())break;if(!m||g>n)break;u=m.to+i,u>t&&(this.highlightRange(l.cursor(),Math.max(t,m.from+i),Math.min(n,u),"",d),this.startSpan(Math.min(n,u),a))}c&&e.parent()}else if(e.firstChild()){r&&(s="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,s,o),this.startSpan(Math.min(n,e.to),a)}while(e.nextSibling())e.parent()}}}function D7(e){let t=e.type.prop(cl);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const s=je.define,xs=s(),it=s(),bl=s(it),jl=s(it),tt=s(),Cs=s(tt),Za=s(tt),ke=s(),gt=s(ke),pe=s(),Oe=s(),qa=s(),Pn=s(qa),ks=s(),e={comment:xs,lineComment:s(xs),blockComment:s(xs),docComment:s(xs),name:it,variableName:s(it),typeName:bl,tagName:s(bl),propertyName:jl,attributeName:s(jl),className:s(it),labelName:s(it),namespace:s(it),macroName:s(it),literal:tt,string:Cs,docString:s(Cs),character:s(Cs),attributeValue:s(Cs),number:Za,integer:s(Za),float:s(Za),bool:s(tt),regexp:s(tt),escape:s(tt),color:s(tt),url:s(tt),keyword:pe,self:s(pe),null:s(pe),atom:s(pe),unit:s(pe),modifier:s(pe),operatorKeyword:s(pe),controlKeyword:s(pe),definitionKeyword:s(pe),moduleKeyword:s(pe),operator:Oe,derefOperator:s(Oe),arithmeticOperator:s(Oe),logicOperator:s(Oe),bitwiseOperator:s(Oe),compareOperator:s(Oe),updateOperator:s(Oe),definitionOperator:s(Oe),typeOperator:s(Oe),controlOperator:s(Oe),punctuation:qa,separator:s(qa),bracket:Pn,angleBracket:s(Pn),squareBracket:s(Pn),paren:s(Pn),brace:s(Pn),content:ke,heading:gt,heading1:s(gt),heading2:s(gt),heading3:s(gt),heading4:s(gt),heading5:s(gt),heading6:s(gt),contentSeparator:s(ke),list:s(ke),quote:s(ke),emphasis:s(ke),strong:s(ke),link:s(ke),monospace:s(ke),strikethrough:s(ke),inserted:s(),deleted:s(),changed:s(),invalid:s(),meta:ks,documentMeta:s(ks),annotation:s(ks),processingInstruction:s(ks),definition:je.defineModifier("definition"),constant:je.defineModifier("constant"),function:je.defineModifier("function"),standard:je.defineModifier("standard"),local:je.defineModifier("local"),special:je.defineModifier("special")};for(let t in e){let n=e[t];n instanceof je&&(n.name=t)}dl([{tag:e.link,class:"tok-link"},{tag:e.heading,class:"tok-heading"},{tag:e.emphasis,class:"tok-emphasis"},{tag:e.strong,class:"tok-strong"},{tag:e.keyword,class:"tok-keyword"},{tag:e.atom,class:"tok-atom"},{tag:e.bool,class:"tok-bool"},{tag:e.url,class:"tok-url"},{tag:e.labelName,class:"tok-labelName"},{tag:e.inserted,class:"tok-inserted"},{tag:e.deleted,class:"tok-deleted"},{tag:e.literal,class:"tok-literal"},{tag:e.string,class:"tok-string"},{tag:e.number,class:"tok-number"},{tag:[e.regexp,e.escape,e.special(e.string)],class:"tok-string2"},{tag:e.variableName,class:"tok-variableName"},{tag:e.local(e.variableName),class:"tok-variableName tok-local"},{tag:e.definition(e.variableName),class:"tok-variableName tok-definition"},{tag:e.special(e.variableName),class:"tok-variableName2"},{tag:e.definition(e.propertyName),class:"tok-propertyName tok-definition"},{tag:e.typeName,class:"tok-typeName"},{tag:e.namespace,class:"tok-namespace"},{tag:e.className,class:"tok-className"},{tag:e.macroName,class:"tok-macroName"},{tag:e.propertyName,class:"tok-propertyName"},{tag:e.operator,class:"tok-operator"},{tag:e.comment,class:"tok-comment"},{tag:e.meta,class:"tok-meta"},{tag:e.invalid,class:"tok-invalid"},{tag:e.punctuation,class:"tok-punctuation"}]);const Ct=new l;function Ha(e){return a.define({combine:e?t=>t.concat(e):void 0})}const Ra=new l;class te{constructor(e,t,n=[],s=""){this.data=e,this.name=s,h.prototype.hasOwnProperty("tree")||Object.defineProperty(h.prototype,"tree",{get(){return g(this)}}),this.parser=t,this.extension=[ot.of(this),h.languageData.of((e,t,n)=>{let s=Ll(e,t,n),o=s.type.prop(Ct);if(!o)return[];let i=e.facet(o),a=s.type.prop(Ra);if(a){let o=s.resolve(t-s.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return t.type=="replace"?n:n.concat(i)}}return i})].concat(n)}isActiveAt(e,t,n=-1){return Ll(e,t,n).type.prop(Ct)==this.data}findRegions(e){let n=e.facet(ot);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let t=[],s=(e,n)=>{if(e.prop(Ct)==this.data){t.push({from:n,to:n+e.length});return}let o=e.prop(l.mounted);if(o){if(o.tree.prop(Ct)==this.data){if(o.overlay)for(let e of o.overlay)t.push({from:e.from+n,to:e.to+n});else t.push({from:n,to:n+e.length});return}if(o.overlay){let e=t.length;if(s(o.tree,o.overlay[0].from+n),t.length>e)return}}for(let t=0;te.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ee(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(e){let t=e.field(te.state,!1);return t?t.tree:p.empty}class E5{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let on=null;class Fs{constructor(e,t,n=[],s,o,i,a,r){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=r,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Fs(e,t,[],p.empty,0,n,[],null)}startParse(){return this.parser.startParse(new E5(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=p.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e=="number"){let t=Date.now()+e;e=()=>Date.now()>t}this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ye.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=on;on=this;try{return e()}finally{on=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Vl(e,t.from,t.to);return e}changes(e,t){let{fragments:s,tree:i,treeLen:a,viewport:n,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,s,o)=>t.push({fromA:e,toA:n,fromB:s,toB:o})),s=Ye.applyChanges(s,t),i=p.empty,a=0,n={from:e.mapPos(n.from,-1),to:e.mapPos(n.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),s=e.mapPos(t.to,-1);ne.from&&(this.fragments=Vl(this.fragments,n,s),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ur{createParse(t,n,s){let o=s[0].from,i=s[s.length-1].to,a={parsedPos:o,advance(){let t=on;if(t){for(let e of s)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new p(T.none,[],[],i-o)},stoppedAt:null,stopAt(){}};return a}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return on}}function Vl(e,t,n){return Ye.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class _n{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new _n(t)}static init(e){let n=Math.min(3e3,e.doc.length),t=Fs.create(e.facet(ot).parser,e,{from:0,to:n});return t.work(20,n)||t.takeTree(),new _n(t)}}te.state=R.define({create:_n.init,update(e,t){for(let e of t.effects)if(e.is(te.setState))return e.value;return t.startState.facet(ot)!=t.state.facet(ot)?_n.init(t.state):e.apply(t)}});let Wl=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback!="undefined"&&(Wl=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:500-100})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Aa=typeof navigator!="undefined"&&((Va=navigator.scheduling)===null||Va===void 0?void 0:Va.isInputPending)?()=>navigator.scheduling.isInputPending():null,Yg=A.fromClass(class ParseWorker{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(te.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(te.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=Wl(this.work))}work(e){this.working=null;let s=Date.now();if(this.chunkEndn+1e3,a=t.context.work(()=>Aa&&Aa()||Date.now()>r,n+(i?0:1e5));this.chunkBudget-=Date.now()-s,(a||this.chunkBudget<=0)&&(t.context.takeTree(),this.view.dispatch({effects:te.setState.of(new _n(t.context))})),this.chunkBudget>0&&!(a&&!i)&&this.scheduleWork(),this.checkAsyncSchedule(t.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>K(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ot=a.define({combine(e){return e.length?e[0]:null},enables:e=>[te.state,Yg,o.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class We{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ca{constructor(e,t,n,s,o,i=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=s,this.loadFunc=o,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new Ca(e.name,(e.alias||[]).concat(e.name).map(e=>e.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n)for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t;return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let n of e)if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let s=t.indexOf(e);if(s>-1&&(e.length>2||!/\w/.test(t[s-1])&&!/\w/.test(t[s+e.length])))return n}return null}}const Wg=a.define(),Fn=a.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Ns(e){let t=e.facet(Fn);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function $n(e,t){let n="",o=e.tabSize,s=e.facet(Fn)[0];if(s==" "){for(;t>=o;)n+=" ",t-=o;s=" "}for(let e=0;e=t?Fg(e,n,t):null}class Hs{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ns(e)}lineAt(e,t=1){let s=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:o}=this.options;return n!=null&&n>=s.from&&n<=s.to?o&&n==e?{text:"",from:e}:(t<0?n-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return me(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(o);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Te=new l;function Fg(e,t,n){let s=t.resolveStack(n),o=s.node.enterUnfinishedNodesBefore(n);if(o!=s.node){let e=[];for(let t=o;t!=s.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)s={node:e[t],next:s}}return od(s,e,n)}function od(e,t,n){for(let s=e;s;s=s.next){let o=Sg(s.node);if(o)return o(cd.create(t,n,s))}return 0}function Mg(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Sg(e){let t=e.type.prop(Te);if(t)return t;let n=e.firstChild,s;if(n&&(s=n.type.prop(l.closedBy))){let t=e.lastChild,n=t&&s.indexOf(t.name)>-1;return e=>hd(e,!0,1,void 0,n&&!Mg(e)?t.from:void 0)}return e.parent==null?kg:null}function kg(){return 0}class cd extends Hs{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new cd(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(jg(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return od(this.context.next,this.base,this.pos)}}function jg(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function bg(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let s=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=s==null||s<=o.from?o.to:Math.min(o.to,s);for(let s=n.to;;){let e=t.childAfter(s);if(!e||e==i)return null;if(!e.type.isSkipped)return e.fromhd(s,t,n,e)}function hd(e,t,n,s,o){let r=e.textAfter,i=r.match(/^\s*/)[0].length,c=s&&r.slice(i,i+s.length)==s||o==e.pos+i,a=t?bg(e):null;return a?c?e.column(a.from):e.column(a.to):e.baseIndent+(c?0:e.unit*n)}const vg=e=>e.baseIndent;function Tt({except:e,units:t=1}={}){return n=>{let s=e&&e.test(n.textAfter);return n.baseIndent+(s?0:t*n.unit)}}const mg=200;function dg(){return h.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let o=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!o.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,a=i.lineAt(n);if(n>a.from+mg)return e;let c=i.sliceString(a.from,n);if(!o.some(e=>e.test(c)))return e;let{state:t}=e,r=-1,s=[];for(let{head:a}of t.selection.ranges){let e=t.doc.lineAt(a);if(e.from==r)continue;r=e.from;let n=ja(t,e.from);if(n==null)continue;let o=/^\s*/.exec(e.text)[0],i=$n(t,n);o!=i&&s.push({from:e.from,to:e.from+o.length,insert:i})}return s.length?[e,{changes:s,sequential:!0}]:e})}const vd=a.define(),Ce=new l;function On(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(o&&a.from=t&&s.to>n&&(o=s)}}return o}function og(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Ws(e,t,n){for(let o of e.facet(vd)){let s=o(e,t,n);if(s)return s}return ag(e,t,n)}function Od(e,t){let n=t.mapPos(e.from,1),s=t.mapPos(e.to,-1);return n>=s?void 0:{from:n,to:s}}const Ks=d.define({map:Od}),tn=d.define({map:Od});function Ed(e){let t=[];for(let{head:n}of e.state.selection.ranges){if(t.some(e=>e.from<=n&&e.to>=n))continue;t.push(e.lineBlockAt(n))}return t}const _t=R.define({create(){return c.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(Ks)&&!Qp(e,n.value.from,n.value.to)){let{preparePlaceholder:s}=t.state.facet(Pd),o=s?c.replace({widget:new Tp(s(t.state,n.value))}):Bd;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(tn)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let s=!1,{head:n}=t.selection.main;e.between(n,n,(e,t)=>{en&&(s=!0)}),s&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>o.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{(!s||s.from>e)&&(s={from:e,to:t})}),s}function Qp(e,t,n){let s=!1;return e.between(t,t,(e,o)=>{e==t&&o==n&&(s=!0)}),s}function Md(e,t){return e.field(_t,!1)?t:t.concat(d.appendConfig.of(Hd()))}const Xp=e=>{for(let n of Ed(e)){let t=Ws(e.state,n.from,n.to);if(t)return e.dispatch({effects:Md(e.state,[Ks.of(t),zd(e,t)])}),!0}return!1},$p=e=>{if(!e.state.field(_t,!1))return!1;let t=[];for(let s of Ed(e)){let n=Xs(e.state,s.from,s.to);n&&t.push(tn.of(n),zd(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function zd(e,t,n=!0){let s=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return o.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${s} ${e.state.phrase("to")} ${i}.`)}const Pp=e=>{let{state:n}=e,t=[];for(let o=0;o{let t=e.state.field(_t,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(tn.of({from:e,to:t}))}),e.dispatch({effects:n}),!0},Lp=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Xp},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:$p},{key:"Ctrl-Alt-[",run:Pp},{key:"Ctrl-Alt-]",run:Rp}],Dp={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Pd=a.define({combine(e){return ye(e,Dp)}});function Hd(){let t=[_t,Ep];return t}function Id(e,t){let{state:s}=e,o=s.facet(Pd),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),s=Xs(e.state,n.from,n.to);s&&e.dispatch({effects:tn.of(s)}),t.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(e,i,t);let n=document.createElement("span");return n.textContent=o.placeholderText,n.setAttribute("aria-label",s.phrase("folded code")),n.title=s.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const Bd=c.replace({widget:new class extends Le{toDOM(e){return Id(e,null)}}});class Tp extends Le{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Id(e,this.value)}}const Sp={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ta extends ze{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function kp(e={}){let t=Object.assign(Object.assign({},Sp),e),o=new ta(t,!0),i=new ta(t,!1),s=A.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ot)!=e.state.facet(ot)||e.startState.field(_t,!1)!=e.state.field(_t,!1)||g(e.startState)!=g(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new vt;for(let n of e.viewportLineBlocks){let s=Xs(e.state,n.from,n.to)?i:Ws(e.state,n.from,n.to)?o:null;s&&t.add(n.from,n.from,s)}return t.finish()}}),{domEventHandlers:n}=t;return[s,x9({class:"cm-foldGutter",markers(e){var t;return((t=e.plugin(s))===null||t===void 0?void 0:t.markers)||m.empty},initialSpacer(){return new ta(t,!1)},domEventHandlers:Object.assign(Object.assign({},n),{click:(e,t,s)=>{if(n.click&&n.click(e,t,s))return!0;let o=Xs(e.state,t.from,t.to);if(o)return e.dispatch({effects:tn.of(o)}),!0;let i=Ws(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:Ks.of(i)}),!0)}})}),Hd()]}const Ep=o.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Zs{constructor(e,t){this.specs=e;let n;function o(e){let t=Ze.newName();return(n||(n=Object.create(null)))["."+t]=e,t}const i=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,s=t.scope;this.scope=s instanceof te?e=>e.prop(Ct)==s.data:s?e=>e==s:void 0,this.style=dl(e.map(e=>({tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Ze(n):null,this.themeType=t.themeType}static define(e,t){return new Zs(e,t||{})}}const Zi=a.define(),Gd=a.define({combine(e){return e.length?[e[0]]:null}});function Qi(e){let t=e.facet(Zi);return t.length?t:e.facet(Gd)}function Qd(e,t){let n=[wp],s;return e instanceof Zs&&(e.module&&n.push(o.styleModule.of(e.module)),s=e.themeType),t?.fallback?n.push(Gd.of(e)):s?n.push(Zi.computeN([o.darkTheme],t=>t.facet(o.darkTheme)==(s=="dark")?[e]:[])):n.push(Zi.of(e)),n}class Op{constructor(e){this.markCache=Object.create(null),this.tree=g(e.state),this.decorations=this.buildDeco(e,Qi(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=g(e.state),s=Qi(e.state),o=s!=Qi(e.startState),{viewport:n}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length=n.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,s),this.decoratedTo=n.to)}buildDeco(e,t){if(!t||!this.tree.length)return c.none;let n=new vt;for(let{from:s,to:o}of e.visibleRanges)I7(this.tree,t,(e,t,s)=>{n.add(e,t,this.markCache[s]||(this.markCache[s]=c.mark({class:s})))},s,o);return n.finish()}}const wp=Re.high(A.fromClass(Op,{decorations:e=>e.decorations})),_p=Zs.define([{tag:e.meta,color:"#404740"},{tag:e.link,textDecoration:"underline"},{tag:e.heading,textDecoration:"underline",fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strong,fontWeight:"bold"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.keyword,color:"#708"},{tag:[e.atom,e.bool,e.url,e.contentSeparator,e.labelName],color:"#219"},{tag:[e.literal,e.inserted],color:"#164"},{tag:[e.string,e.deleted],color:"#a11"},{tag:[e.regexp,e.escape,e.special(e.string)],color:"#e40"},{tag:e.definition(e.variableName),color:"#00f"},{tag:e.local(e.variableName),color:"#30a"},{tag:[e.typeName,e.namespace],color:"#085"},{tag:e.className,color:"#167"},{tag:[e.special(e.variableName),e.macroName],color:"#256"},{tag:e.definition(e.propertyName),color:"#00c"},{tag:e.comment,color:"#940"},{tag:e.invalid,color:"#f00"}]),jp=o.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),nu=1e4,su="()[]{}",ou=a.define({combine(e){return ye(e,{afterCursor:!0,brackets:su,maxScanDistance:nu,renderMatch:gp})}}),bp=c.mark({class:"cm-matchingBracket"}),vp=c.mark({class:"cm-nonmatchingBracket"});function gp(e){let t=[],n=e.matched?bp:vp;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const dp=R.define({create(){return c.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let s=[],n=t.state.facet(ou);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=_e(t.state,e.head,-1,n)||e.head>0&&_e(t.state,e.head-1,1,n)||n.afterCursor&&(_e(t.state,e.head,1,n)||e.heado.decorations.from(e)}),cp=[dp,jp];function du(e={}){return[ou.of(e),cp]}const Gi=new l;function Yi(e,t,n){let s=e.prop(t<0?l.openedBy:l.closedBy);if(s)return s;if(e.name.length==1){let s=n.indexOf(e.name);if(s>-1&&s%2==(t<0?1:0))return[n[s+t]]}return null}function qi(e){let t=e.type.prop(Gi);return t?t(e.node):e}function _e(e,t,n,s={}){let r=s.maxScanDistance||nu,o=s.brackets||su,i=g(e),a=i.resolveInner(t,n);for(let s=a;s;s=s.parent){let i=Yi(s.type,n,o);if(i&&s.from0?t>=a.from&&ta.from&&t<=a.to))return ip(e,t,n,s,a,i,o)}}return op(e,t,n,i,a.type,r,o)}function ip(e,t,n,s,o,i,a){let l=s.parent,d={from:o.from,to:o.to},c=0,r=l?.cursor();if(r&&(n<0?r.childBefore(s.from):r.childAfter(s.to)))do if(n<0?r.to<=s.from:r.from>=s.to){if(c==0&&i.indexOf(r.type.name)>-1&&r.from0)return null;let d={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),l=0;for(let u=0;!c.next().done&&u<=i;){let e=c.value;n<0&&(u+=e.length);let h=t+u*n;for(let t=n>0?0:e.length-1,c=n>0?e.length:-1;t!=c;t+=n){let i=a.indexOf(e[t]);if(i<0||s.resolveInner(h+t,1).type!=o)continue;if(i%2==0==n>0)l++;else if(l==1)return{start:d,end:{from:h+t,to:h+t+1},matched:i>>1==r>>1};else l--}n>0&&(u+=e.length)}return c.done?{start:d,matched:!1}:null}const sp=Object.create(null),bu=[T.none],ju=[],yu=Object.create(null),np=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])np[e]=ep(sp,t);function Ui(e,t){if(ju.indexOf(e)>-1)return;ju.push(e),console.warn(t)}function ep(t,n){let s=[];for(let i of n.split(" ")){let o=[];for(let n of i.split(".")){let s=t[n]||e[n];s?typeof s=="function"?o.length?o=o.map(s):Ui(n,`Modifier ${n} used at start of tag`):o.length?Ui(n,`Tag ${n} used as modifier`):o=Array.isArray(s)?s:[s]:Ui(n,`Unknown highlighting tag ${n}`)}for(let e of o)s.push(e)}if(!s.length)return 0;let o=n.replace(/ /g,"_"),i=o+" "+s.map(e=>e.id),a=yu[i];if(a)return a.id;let r=yu[i]=T.define({id:bu.length,name:o,props:[fe({[o]:s})]});return bu.push(r),r.id}({rtl:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:y.RTL}),ltr:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:y.LTR}),auto:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})});const J6=e=>{let{state:t}=e,s=t.doc.lineAt(t.selection.main.from),n=Vi(e.state,s.from);return n.line?Q6(e):!!n.block&&G6(e)};function $i(e,t){return({state:n,dispatch:s})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(s(n.update(o)),!0)}}const Q6=$i(yf,0),X6=$i(zu,0),G6=$i((e,t)=>zu(e,t,K6(t)),0);function Vi(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const bn=50;function q6(e,{open:t,close:n},s,o){let l=e.sliceDoc(s-bn,s),h=e.sliceDoc(o,o+bn),d=/\s*$/.exec(l)[0].length,r=/^\s*/.exec(h)[0].length,m=l.length-d;if(l.slice(m-t.length,m)==t&&h.slice(r,r+n.length)==n)return{open:{pos:s-d,margin:d&&1},close:{pos:o+r,margin:r&&1}};let a,i;o-s<=2*bn?a=i=e.sliceDoc(s,o):(a=e.sliceDoc(s,s+bn),i=e.sliceDoc(o-bn,o));let c=/^\s*/.exec(a)[0].length,f=/\s*$/.exec(i)[0].length,u=i.length-f-n.length;return a.slice(c,c+t.length)==t&&i.slice(u,u+n.length)==n?{open:{pos:s+c+t.length,margin:/\s/.test(a.charAt(c+t.length))?1:0},close:{pos:o-f-n.length,margin:/\s/.test(i.charAt(u-1))?1:0}}:null}function K6(e){let t=[];for(let s of e.selection.ranges){let n=e.doc.lineAt(s.from),i=s.to<=n.to?n:e.doc.lineAt(s.to),o=t.length-1;o>=0&&t[o].to>n.from?t[o].to=i.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:i.to})}return t}function zu(e,t,n=t.selection.ranges){let s=n.map(e=>Vi(t,e.from).block);if(!s.every(e=>e))return null;let o=n.map((e,n)=>q6(t,s[n],e.from,e.to));if(e!=2&&!o.every(e=>e))return{changes:t.changes(n.map((e,t)=>o[t]?[]:[{from:e.from,insert:s[t].open+" "},{from:e.to,insert:" "+s[t].close}]))};if(e!=1&&o.some(e=>e)){let e=[];for(let t=0,n;to&&(a==r||r>n.from)){o=n.from;let t=/^\s*/.exec(n.text)[0].length,a=t==n.length,r=n.text.slice(t,t+i.length)==i?t:-1;te.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of s)(a||!i)&&e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&s.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:o}of s)if(n>=0){let i=t.from+n,s=i+o.length;t.text[s-t.from]==" "&&s++,e.push({from:i,to:s})}return{changes:e}}return null}const Hi=$e.define(),N2=$e.define(),V6=a.define(),Pu=a.define({combine(e){return ye(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),Hu=R.define({create(){return Ue.empty},update(e,t){let o=t.state.facet(Pu),n=t.annotation(Hi);if(n){let a=Z.fromTransaction(t,n.selection),i=n.side,s=i==0?e.undone:e.done;return a?s=ao(s,s.length,o.minDepth,a):s=Ju(s,t.startState.selection),new Ue(i==0?n.rest:s,i==0?s:n.rest)}let s=t.annotation(N2);if((s=="full"||s=="before")&&(e=e.isolate()),t.annotation(S.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let i=Z.fromTransaction(t),a=t.annotation(S.time),r=t.annotation(S.userEvent);return i?e=e.addChanges(i,a,r,o,t):t.selection&&(e=e.addSelection(t.startState.selection,a,r,o.newGroupDelay)),(s=="full"||s=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new Ue(e.done.map(Z.fromJSON),e.undone.map(Z.fromJSON))}});function Iu(e={}){return[Hu,Pu.of(e),o.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Vu:e.inputType=="historyRedo"?zi:null;return!!n&&(e.preventDefault(),n(t))}})]}function to(e,t){return function({state:n,dispatch:s}){if(!t&&n.readOnly)return!1;let o=n.field(Hu,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(s(i),!0)}}const Vu=to(0,!1),zi=to(1,!1),P6=to(0,!0),L6=to(1,!0);class Z{constructor(e,t,n,s,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=o}setSelAfter(e){return new Z(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new Z(e.changes&&F.fromJSON(e.changes),[],e.mapped&&Ne.fromJSON(e.mapped),e.startSelection&&t.fromJSON(e.startSelection),e.selectionsAfter.map(t.fromJSON))}static fromTransaction(e,t){let n=ie;for(let s of e.startState.facet(V6)){let t=s(e);t.length&&(n=n.concat(t))}return!n.length&&e.changes.empty?null:new Z(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,ie)}static selection(e){return new Z(void 0,ie,void 0,void 0,e)}}function ao(e,t,n,s){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(s),o}function D6(e,t){let n=[],s=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,o,i)=>{for(let e=0;e=t&&o<=a&&(s=!0)}}),s}function z6(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Xu(e,t){return e.length?t.length?e.concat(t):e:t}const ie=[],F6=200;function Ju(e,t){if(e.length){let s=e[e.length-1],n=s.selectionsAfter.slice(Math.max(0,s.selectionsAfter.length-F6));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),ao(e,e.length-1,1e9,s.setSelAfter(n)))}return[Z.selection([t])]}function k6(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ei(e,t){if(!e.length)return e;let n=e.length,s=ie;for(;n;){let o=O6(e[n-1],t,s);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,s=o.selectionsAfter}return s.length?[Z.selection(s)]:ie}function O6(e,t,n){let o=Xu(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):ie,n);if(!e.changes)return Z.selection(o);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(s):s;return new Z(i,d.mapEffects(e.effects,t),a,e.startSelection.map(s),o)}const w6=/^(input\.type|delete)($|\.)/;class Ue{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new Ue(this.done,this.undone):this}addChanges(e,t,n,s,o){let i=this.done,a=i[i.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||w6.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimen.empty?e.moveByChar(n,t):ho(n,t))}function H(e){return e.textDirectionAt(e.state.selection.main.head)==y.LTR}const h1=e=>d1(e,!H(e)),m1=e=>d1(e,H(e));function f1(e,t){return ue(e,n=>n.empty?e.moveByGroup(n,t):ho(n,t))}const f6=e=>f1(e,!H(e)),h6=e=>f1(e,H(e));function d6(e,t,n){if(t.type.prop(n))return!0;let s=t.to-t.from;return s&&(s>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function fo(e,n,s){let o=g(e).resolveInner(n.head),r=s?l.closedBy:l.openedBy;for(let i=n.head;;){let t=s?o.childAfter(i):o.childBefore(i);if(!t)break;d6(e,t,r)?o=t:i=s?t.to:t.from}let c=o.type.prop(r),i,a;return c&&(i=s?_e(e,o.from,1):_e(e,o.to,-1))&&i.matched?a=s?i.end.to:i.end.from:a=s?o.to:o.from,t.cursor(a,s?-1:1)}const a6=e=>ue(e,t=>fo(e.state,t,!H(e))),o6=e=>ue(e,t=>fo(e.state,t,H(e)));function _1(e,t){return ue(e,n=>{if(!n.empty)return ho(n,t);let s=e.moveVertically(n,t);return s.head!=n.head?s:e.moveToLineBoundary(n,t)})}const w1=e=>_1(e,!1),O1=e=>_1(e,!0);function x1(e){let i=e.scrollDOM.clientHeights.empty?e.moveVertically(s,t,n.height):ho(s,t));if(i.eq(s.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(s.selection.main.head),r=e.scrollDOM.getBoundingClientRect(),c=r.top+n.marginTop,l=r.bottom-n.marginBottom;t&&t.top>c&&t.bottomC1(e,!1),vi=e=>C1(e,!0);function at(e,n,s){let o=e.lineBlockAt(n.head),i=e.moveToLineBoundary(n,s);if(i.head==n.head&&i.head!=(s?o.to:o.from)&&(i=e.moveToLineBoundary(n,s,!1)),!s&&i.head==o.from&&o.length){let s=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;s&&n.head!=o.from+s&&(i=t.cursor(o.from+s))}return i}const Qf=e=>ue(e,t=>at(e,t,!0)),Wf=e=>ue(e,t=>at(e,t,!1)),Pf=e=>ue(e,t=>at(e,t,!H(e))),Lf=e=>ue(e,t=>at(e,t,H(e))),Nf=e=>ue(e,n=>t.cursor(e.lineBlockAt(n.head).from,1)),Df=e=>ue(e,n=>t.cursor(e.lineBlockAt(n.head).to,-1));function zf(e,n){let o=!1,i=Dt(e.selection,n=>{let s=_e(e,n.head,-1)||_e(e,n.head,1)||n.head>0&&_e(e,n.head-1,1)||n.headzf(e,t);function ce(e,n){let s=Dt(e.state.selection,e=>{let s=n(e);return t.range(e.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return!s.eq(e.state.selection)&&(e.dispatch(ve(e.state,s)),!0)}function P1(e,t){return ce(e,n=>e.moveByChar(n,t))}const H1=e=>P1(e,!H(e)),I1=e=>P1(e,H(e));function B1(e,t){return ce(e,n=>e.moveByGroup(n,t))}const _f=e=>B1(e,!H(e)),bf=e=>B1(e,H(e)),gf=e=>ce(e,t=>fo(e.state,t,!H(e))),pf=e=>ce(e,t=>fo(e.state,t,H(e)));function K1(e,t){return ce(e,n=>e.moveVertically(n,t))}const q1=e=>K1(e,!1),Y1=e=>K1(e,!0);function G1(e,t){return ce(e,n=>e.moveVertically(n,t,x1(e).height))}const X1=e=>G1(e,!1),Q1=e=>G1(e,!0),mf=e=>ce(e,t=>at(e,t,!0)),lf=e=>ce(e,t=>at(e,t,!1)),cf=e=>ce(e,t=>at(e,t,!H(e))),L2=e=>ce(e,t=>at(e,t,H(e))),af=e=>ce(e,n=>t.cursor(e.lineBlockAt(n.head).from)),sf=e=>ce(e,n=>t.cursor(e.lineBlockAt(n.head).to)),o4=({state:e,dispatch:t})=>(t(ve(e,{anchor:0})),!0),i4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.doc.length})),!0),a4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.selection.main.anchor,head:0})),!0),r4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),tf=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),Y8=({state:e,dispatch:n})=>{let s=wo(e).map(({from:n,to:s})=>t.range(n,Math.min(s+1,e.doc.length)));return n(e.update({selection:t.create(s),userEvent:"select"})),!0},W8=({state:e,dispatch:n})=>{let s=Dt(e.selection,n=>{var s;let o=g(e).resolveStack(n.from,1);for(let i=o;i;i=i.next){let{node:e}=i;if((e.from=n.to||e.to>n.to&&e.from<=n.from)&&((s=e.parent)===null||s===void 0?void 0:s.parent))return t.range(e.to,e.from)}return n});return n(ve(e,s)),!0},B8=({state:e,dispatch:n})=>{let s=e.selection,o=null;return s.ranges.length>1?o=t.create([s.main]):s.main.empty||(o=t.create([t.cursor(s.main.head)])),!!o&&(n(ve(e,o)),!0)};function En(e,n){if(e.state.readOnly)return!1;let s="delete.selection",{state:i}=e,a=i.changeByRange(o=>{let{from:i,to:a}=o;if(i==a){let t=n(o);ti&&(s="delete.forward",t=_o(e,t,!0)),i=Math.min(i,t),a=Math.max(a,t)}else i=_o(e,i,!1),a=_o(e,a,!0);return i==a?{range:o}:{changes:{from:i,to:a},range:t.cursor(i,it(e)))s.between(t,t,(e,s)=>{et&&(t=n?s:e)});return t}const f4=(e,t,n)=>En(e,s=>{let i=s.from,{state:c}=e,o=c.doc.lineAt(i),r,a;if(n&&!t&&i>o.from&&if4(e,!1,!0),g4=e=>f4(e,!0,!1),v4=(e,t)=>En(e,n=>{let s=n.head,{state:i}=e,o=i.doc.lineAt(s),a=i.charCategorizer(s);for(let e=null;;){if(s==(t?o.to:o.from)){s==n.head&&o.number!=(t?i.doc.lines:1)&&(s+=t?1:-1);break}let r=L(o.text,s-o.from,t)+o.from,c=o.text.slice(Math.min(s,r)-o.from,Math.max(s,r)-o.from),l=a(c);if(e!=null&&l!=e)break;(c!=" "||s!=n.head)&&(e=l),s=r}return s}),b4=e=>v4(e,!1),D8=e=>v4(e,!0),z8=e=>En(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headEn(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),O8=e=>En(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let s=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:f.of(["",""])},range:t.cursor(e.from)}));return n(e.update(s,{scrollIntoView:!0,userEvent:"input"})),!0},f8=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let s=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let s=n.from,o=e.doc.lineAt(s),a=s==o.from?s-1:L(o.text,s-o.from,!1)+o.from,i=s==o.to?s+1:L(o.text,s-o.from,!0)+o.from;return{changes:{from:a,to:i,insert:e.doc.slice(s,i).append(e.doc.slice(a,s))},range:t.cursor(i)}});return!s.changes.empty&&(n(e.update(s,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function wo(e){let t=[],n=-1;for(let s of e.selection.ranges){let i=e.doc.lineAt(s.from),o=e.doc.lineAt(s.to);if(!s.empty&&s.to==o.from&&(o=e.doc.lineAt(s.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(s)}else t.push({from:i.from,to:o.to,ranges:[s]});n=o.number+1}return t}function E4(e,n,s){if(e.readOnly)return!1;let o=[],i=[];for(let n of wo(e)){if(s?n.to==e.doc.length:n.from==0)continue;let a=e.doc.lineAt(s?n.to+1:n.from-1),r=a.length+1;if(s){o.push({from:n.to,to:a.to},{from:n.from,insert:a.text+e.lineBreak});for(let s of n.ranges)i.push(t.range(Math.min(e.doc.length,s.anchor+r),Math.min(e.doc.length,s.head+r)))}else{o.push({from:a.from,to:n.from},{from:n.to,insert:e.lineBreak+a.text});for(let e of n.ranges)i.push(t.range(e.anchor-r,e.head-r))}}return!!o.length&&(n(e.update({changes:o,scrollIntoView:!0,selection:t.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}const u8=({state:e,dispatch:t})=>E4(e,t,!1),d8=({state:e,dispatch:t})=>E4(e,t,!0);function S4(e,t,n){if(e.readOnly)return!1;let s=[];for(let t of wo(e))n?s.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):s.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:s,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const r8=({state:e,dispatch:t})=>S4(e,t,!1),Jm=({state:e,dispatch:t})=>S4(e,t,!0),Qm=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(wo(t).map(({from:e,to:n})=>(e>0?e--:n{let n=void 0;if(e.lineWrapping){let o=e.lineBlockAt(t.head),s=e.coordsAtPos(t.head,t.assoc||1);s&&(n=o.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:s,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Gm(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let o=g(e).resolveInner(t),n=o.childBefore(t),s=o.childAfter(t),i;return n&&s&&n.to<=t&&s.from>=t&&(i=n.type.prop(l.closedBy))&&i.indexOf(s.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const Ym=L4(!1),qm=L4(!0);function L4(e){return({state:n,dispatch:s})=>{if(n.readOnly)return!1;let o=n.changeByRange(s=>{let{from:o,to:a}=s,i=n.doc.lineAt(o),r=!e&&o==a&&Gm(n,o);e&&(o=a=(a<=i.to?i:n.doc.lineAt(a)).to);let d=new Hs(n,{simulateBreak:o,simulateDoubleBreak:!!r}),c=ja(d,o);for(c==null&&(c=me(/^\s*/.exec(n.doc.lineAt(o).text)[0],n.tabSize));ai.from&&o{let i=[];for(let a=o.from;a<=o.to;){let t=e.doc.lineAt(a);t.number>s&&(o.empty||o.to>t.from)&&(n(t,i,o),s=t.number),a=t.to+1}let a=e.changes(i);return{changes:i,range:t.range(a.mapPos(o.anchor,1),a.mapPos(o.head,1))}})}const Um=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),o=new Hs(e,{overrideIndentation:e=>{let t=n[e];return t??-1}}),s=ni(e,(t,s,i)=>{let a=ja(o,t.from);if(a==null)return;/\S/.test(t.text)||(a=0);let r=/^\s*/.exec(t.text)[0],c=$n(e,a);(r!=c||i.from!e.readOnly&&(t(e.update(ni(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Fn)})}),{userEvent:"input.indent"})),!0),I4=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(ni(e,(t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let a=me(o,e.tabSize),s=0,i=$n(e,Math.max(0,a-Ns(e)));for(;s(e.setTabFocusMode(),!0),V4=[{key:"Ctrl-b",run:h1,shift:H1,preventDefault:!0},{key:"Ctrl-f",run:m1,shift:I1},{key:"Ctrl-p",run:w1,shift:q1},{key:"Ctrl-n",run:O1,shift:Y1},{key:"Ctrl-a",run:Nf,shift:af},{key:"Ctrl-e",run:Df,shift:sf},{key:"Ctrl-d",run:g4},{key:"Ctrl-h",run:ii},{key:"Ctrl-k",run:z8},{key:"Ctrl-Alt-h",run:b4},{key:"Ctrl-o",run:g8},{key:"Ctrl-t",run:f8},{key:"Ctrl-v",run:vi}],$m=[{key:"ArrowLeft",run:h1,shift:H1,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:f6,shift:_f,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Pf,shift:cf,preventDefault:!0},{key:"ArrowRight",run:m1,shift:I1,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:h6,shift:bf,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Lf,shift:L2,preventDefault:!0},{key:"ArrowUp",run:w1,shift:q1,preventDefault:!0},{mac:"Cmd-ArrowUp",run:o4,shift:a4},{mac:"Ctrl-ArrowUp",run:E1,shift:X1},{key:"ArrowDown",run:O1,shift:Y1,preventDefault:!0},{mac:"Cmd-ArrowDown",run:i4,shift:r4},{mac:"Ctrl-ArrowDown",run:vi,shift:Q1},{key:"PageUp",run:E1,shift:X1},{key:"PageDown",run:vi,shift:Q1},{key:"Home",run:Wf,shift:lf,preventDefault:!0},{key:"Mod-Home",run:o4,shift:a4},{key:"End",run:Qf,shift:mf,preventDefault:!0},{key:"Mod-End",run:i4,shift:r4},{key:"Enter",run:Ym},{key:"Mod-a",run:tf},{key:"Backspace",run:ii,shift:ii},{key:"Delete",run:g4},{key:"Mod-Backspace",mac:"Alt-Backspace",run:b4},{key:"Mod-Delete",mac:"Alt-Delete",run:D8},{mac:"Mod-Backspace",run:x8},{mac:"Mod-Delete",run:O8}].concat(V4.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),W4=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:a6,shift:gf},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:o6,shift:pf},{key:"Alt-ArrowUp",run:u8},{key:"Shift-Alt-ArrowUp",run:r8},{key:"Alt-ArrowDown",run:d8},{key:"Shift-Alt-ArrowDown",run:Jm},{key:"Escape",run:B8},{key:"Mod-Enter",run:qm},{key:"Alt-l",mac:"Ctrl-l",run:Y8},{key:"Mod-i",run:W8,preventDefault:!0},{key:"Mod-[",run:I4},{key:"Mod-]",run:H4},{key:"Mod-Alt-\\",run:Um},{key:"Shift-Mod-k",run:Qm},{key:"Shift-Mod-\\",run:Ff},{key:"Mod-/",run:J6},{key:"Alt-A",run:X6},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Wm}].concat($m),Bm={key:"Tab",run:H4,shift:I4};function _(){e=arguments[0],typeof e=="string"&&(e=document.createElement(e));var e,n,o,s=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n=t[o],typeof n=="string"?e.setAttribute(o,n):n!=null&&(e[o]=n));s++}for(;se.normalize("NFKD"):e=>e;class Ft{constructor(e,t,n=0,s=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=o?e=>o(Y4(e)):Y4,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return N(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=xr(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ne(e);let s=this.normalize(t);for(let e=0,o=n;;e++){let i=s.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==s.length-1){if(a)return this.value=a,this;break}o==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,s=n+e[0].length;if(this.matchPos=Eo(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,s,e)))return this.value={from:n,to:s,match:e},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||s.to<=t){let s=new Qn(t,e.sliceString(t,n));return Zo.set(e,s),s}if(s.from==t&&s.to==n)return s;let{text:i,from:o}=s;return o>t&&(i=e.sliceString(t,o)+i,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,n=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,n,e)))return this.value={from:t,to:n,match:e},this.matchPos=Eo(this.text,n+(t==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Qn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(Z4.prototype[Symbol.iterator]=t0.prototype[Symbol.iterator]=function(){return this});function Hm(e){try{return new RegExp(e,Jo),!0}catch{return!1}}function Eo(e,t){if(t>=e.length)return t;let n=e.lineAt(t),s;for(;t=56320&&s<57344;)t++;return t}function Yo(e){let i=String(e.state.doc.lineAt(e.state.selection.main.head).number),n=_("input",{class:"cm-textfield",name:"line",value:i}),a=_("form",{class:"cm-gotoLine",onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:Fo.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),s())},onsubmit:e=>{e.preventDefault(),s()}},_("label",e.state.phrase("Go to line"),": ",n)," ",_("button",{class:"cm-button",type:"submit"},e.state.phrase("go")));function s(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!l)return;let{state:s}=e,c=s.doc.lineAt(s.selection.main.head),[,a,r,d,m]=l,f=d?+d.slice(1):0,i=r?+r:c.number;if(r&&m){let e=i/100;a&&(e=e*(a=="-"?-1:1)+c.number/s.doc.lines),i=Math.round(s.doc.lines*e)}else r&&a&&(i=i*(a=="-"?-1:1)+c.number);let u=s.doc.line(Math.max(1,Math.min(s.doc.lines,i))),h=t.cursor(u.from+Math.max(0,Math.min(f,u.length)));e.dispatch({effects:[Fo.of(!1),o.scrollIntoView(h.from,{y:"center"})],selection:h}),e.focus()}return{dom:a}}const Fo=d.define(),a0=R.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(Fo)&&(e=n.value);return e},provide:e=>Rn.from(e,e=>e?Yo:null)}),Dm=e=>{let t=zn(e,Yo);if(!t){let n=[Fo.of(!0)];e.state.field(a0,!1)==null&&n.push(d.appendConfig.of([a0,Tm])),e.dispatch({effects:n}),t=zn(e,Yo)}return t&&t.dom.querySelector("input").select(),!0},Tm=o.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Cm={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},mm=a.define({combine(e){return ye(e,Cm,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function um(){let t=[Yh,Xh];return t}const dm=c.mark({class:"cm-selectionMatch"}),em=c.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function f0(e,t,n,s){return(n==0||e(t.sliceDoc(n-1,n))!=O.Word)&&(s==t.doc.length||e(t.sliceDoc(s,s+1))!=O.Word)}function Zh(e,t,n,s){return e(t.sliceDoc(n,n+1))==O.Word&&e(t.sliceDoc(s-1,s))==O.Word}const Xh=A.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let i=e.state.facet(mm),{state:n}=e,r=n.selection;if(r.ranges.length>1)return c.none;let t=r.main,o,s=null;if(t.empty){if(!i.highlightWordAroundCursor)return c.none;let e=n.wordAt(t.head);if(!e)return c.none;s=n.charCategorizer(t.head),o=n.sliceDoc(e.from,e.to)}else{let e=t.to-t.from;if(e200)return c.none;if(i.wholeWords){if(o=n.sliceDoc(t.from,t.to),s=n.charCategorizer(t.head),!f0(s,n,t.from,t.to)||!Zh(s,n,t.from,t.to))return c.none}else if(o=n.sliceDoc(t.from,t.to),!o)return c.none}let a=[];for(let r of e.visibleRanges){let l=new Ft(n.doc,o,r.from,r.to);for(;!l.next().done;){let{from:e,to:o}=l.value;if((!s||f0(s,n,e,o))&&(t.empty&&e<=t.from&&o>=t.to?a.push(em.range(e,o)):(e>=t.to||o<=t.from)&&a.push(dm.range(e,o)),a.length>i.maxMatches))return c.none}}return c.set(a)}},{decorations:e=>e.decorations}),Yh=o.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qh=({state:e,dispatch:n})=>{let{selection:s}=e,o=t.create(s.ranges.map(n=>e.wordAt(n.head)||t.cursor(n.head)),s.mainIndex);return!o.eq(s)&&(n(e.update({selection:o})),!0)};function Uh(e,t){let{main:s,ranges:n}=e.selection,o=e.wordAt(s.head),i=o&&o.from==s.from&&o.to==s.to;for(let o=!1,s=new Ft(e.doc,t,n[n.length-1].to);;)if(s.next(),s.done){if(o)return null;s=new Ft(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(e=>e.from==s.value.from))continue;if(i){let t=e.wordAt(s.value.from);if(!t||t.from!=s.value.from||t.to!=s.value.to)continue}return s.value}}const Bh=({state:e,dispatch:n})=>{let{ranges:i}=e.selection;if(i.some(e=>e.from===e.to))return qh({state:e,dispatch:n});let a=e.sliceDoc(i[0].from,i[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=a))return!1;let s=Uh(e,a);return!!s&&(n(e.update({selection:e.selection.addRange(t.range(s.from,s.to),!1),effects:o.scrollIntoView(s.to)})),!0)},Et=a.define({combine(e){return ye(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new G3(e),scrollToMatch:e=>o.scrollIntoView(e)})}});function Hh(e){return e?[Et.of(e),ei]:ei}class Uo{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Hm(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t=="n"?` -`:t=="r"?"\r":t=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new zh(this):new Lh(this)}getCursor(e,t=0,n){let s=e.doc?e:h.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Pt(this,s,t,n):Lt(this,s,t,n)}}class x0{constructor(e){this.spec=e}}function Lt(e,t,n,s){return new Ft(t.doc,e.unquoted,n,s,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?Rh(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function Rh(e,t){return(n,s,o,i)=>((i>n||i+o.length=t)return null;n.push(s.value)}return n}highlight(e,t,n,s){let o=Lt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}function Pt(e,t,n,s){return new Z4(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?Dh(t.charCategorizer(t.selection.main.head)):void 0},n,s)}function To(e,t){return e.slice(L(e,t,!1),t)}function zo(e,t){return e.slice(t,L(e,t))}function Dh(e){return(t,n,s)=>!s[0].length||(e(To(s.input,s.index))!=O.Word||e(zo(s.input,s.index))!=O.Word)&&(e(zo(s.input,s.index+s[0].length))!=O.Word||e(To(s.input,s.index+s[0].length))!=O.Word)}class zh extends x0{nextMatch(e,t,n){let s=Pt(this.spec,e,n,e.doc.length).next();return s.done&&(s=Pt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let s=Math.max(t,n-i*1e4),a=Pt(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n=t)return null;n.push(s.value)}return n}highlight(e,t,n,s){let o=Pt(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}const Ht=d.define(),Ho=d.define(),He=R.define({create(e){return new Ro(Mo(e).create(),null)},update(e,t){for(let n of t.effects)n.is(Ht)?e=new Ro(n.value.create(),e.panel):n.is(Ho)&&(e=new Ro(e.query,n.value?qo:null));return e},provide:e=>Rn.from(e,e=>e.panel)});function L0(e){let t=e.field(He,!1);return t?t.query.spec:Mo(e)}class Ro{constructor(e,t){this.query=e,this.panel=t}}const Sh=c.mark({class:"cm-searchMatch"}),Eh=c.mark({class:"cm-searchMatch cm-searchMatch-selected"}),bh=A.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(He))}update(e){let t=e.state.field(He);(t!=e.startState.field(He)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return c.none;let{view:n}=this,s=new vt;for(let t=0,o=n.visibleRanges,a=o.length;to[t+1].from-2*250;)i=o[++t].to;e.highlight(n.state,r,i,(e,t)=>{let o=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);s.add(e,t,o?Eh:Sh)})}return s.finish()}},{decorations:e=>e.decorations});function Sn(e){return t=>{let n=t.state.field(He,!1);return n&&n.query.spec.valid?e(t,n):Z0(t)}}const Wt=Sn((e,{query:n})=>{let{to:o}=e.state.selection.main,s=n.nextMatch(e.state,o,o);if(!s)return!1;let i=t.single(s.from,s.to),a=e.state.facet(Et);return e.dispatch({selection:i,effects:[Go(e,s),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),Q0(e),!0}),Do=Sn((e,{query:n})=>{let{state:o}=e,{from:i}=o.selection.main,s=n.prevMatch(o,i,i);if(!s)return!1;let a=t.single(s.from,s.to),r=e.state.facet(Et);return e.dispatch({selection:a,effects:[Go(e,s),r.scrollToMatch(a.main,e)],userEvent:"select.search"}),Q0(e),!0}),ph=Sn((e,{query:n})=>{let s=n.matchAll(e.state,1e3);return!!s&&!!s.length&&(e.dispatch({selection:t.create(s.map(e=>t.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),uh=({state:e,dispatch:n})=>{let o=e.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:i,to:r}=o.main,s=[],a=0;for(let n=new Ft(e.doc,e.sliceDoc(i,r));!n.next().done;){if(s.length>1e3)return!1;n.value.from==i&&(a=s.length),s.push(t.range(n.value.from,n.value.to))}return n(e.update({selection:t.create(s,a),userEvent:"select.search.matches"})),!0},K0=Sn((e,{query:n})=>{let{state:i}=e,{from:a,to:u}=i.selection.main;if(i.readOnly)return!1;let s=n.nextMatch(i,a,a);if(!s)return!1;let r=[],l,d,c=[];if(s.from==a&&s.to==u&&(d=i.toText(n.getReplacement(s)),r.push({from:s.from,to:s.to,insert:d}),s=n.nextMatch(i,s.from,s.to),c.push(o.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(a).number)+"."))),s){let n=r.length==0||r[0].from>=s.to?0:s.to-s.from-d.length;l=t.single(s.from-n,s.to-n),c.push(Go(e,s)),c.push(i.facet(Et).scrollToMatch(l.main,e))}return e.dispatch({changes:r,selection:l,effects:c,userEvent:"input.replace"}),!0}),ih=Sn((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:s}=e;return{from:n,to:s,insert:t.getReplacement(e)}});if(!n.length)return!1;let s=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:o.announce.of(s),userEvent:"input.replace.all"}),!0});function qo(e){return e.state.facet(Et).createPanel(e)}function Mo(e,t){var o,i,a,r,c;let n=e.selection.main,l=n.empty||n.to>n.from+100?"":e.sliceDoc(n.from,n.to);if(t&&!l)return t;let s=e.facet(Et);return new Uo({search:((o=t?.literal)!==null&&o!==void 0?o:s.literal)?l:l.replace(/\n/g,`\\n`),caseSensitive:(i=t?.caseSensitive)!==null&&i!==void 0?i:s.caseSensitive,literal:(a=t?.literal)!==null&&a!==void 0?a:s.literal,regexp:(r=t?.regexp)!==null&&r!==void 0?r:s.regexp,wholeWord:(c=t?.wholeWord)!==null&&c!==void 0?c:s.wholeWord})}function X0(e){let t=zn(e,qo);return t&&t.dom.querySelector("[main-field]")}function Q0(e){let t=X0(e);t&&t==e.root.activeElement&&t.select()}const Z0=e=>{let t=e.state.field(He,!1);if(t&&t.panel){{let n=X0(e);if(n&&n!=e.root.activeElement){let s=Mo(e.state,t.query.spec);s.valid&&e.dispatch({effects:Ht.of(s)}),n.focus(),n.select()}}}else e.dispatch({effects:[Ho.of(!0),t?Ht.of(Mo(e.state,t.query.spec)):d.appendConfig.of(ei)]});return!0},J0=e=>{let t=e.state.field(He,!1);if(!t||!t.panel)return!1;let n=zn(e,qo);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Ho.of(!1)}),!0},e2=[{key:"Mod-f",run:Z0,scope:"editor search-panel"},{key:"F3",run:Wt,shift:Do,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wt,shift:Do,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:J0,scope:"editor search-panel"},{key:"Mod-Shift-l",run:uh},{key:"Mod-Alt-g",run:Dm},{key:"Mod-d",run:Bh,preventDefault:!0}];class G3{constructor(e){this.view=e;let t=this.query=e.state.field(He).query.spec;this.commit=this.commit.bind(this),this.searchField=_("input",{value:t.search,placeholder:G(e,"Find"),"aria-label":G(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=_("input",{value:t.replace,placeholder:G(e,"Replace"),"aria-label":G(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=_("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=_("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=_("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return _("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.dom=_("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>Wt(e),[G(e,"next")]),n("prev",()=>Do(e),[G(e,"previous")]),n("select",()=>ph(e),[G(e,"all")]),_("label",null,[this.caseField,G(e,"match case")]),_("label",null,[this.reField,G(e,"regexp")]),_("label",null,[this.wordField,G(e,"by word")]),...e.state.readOnly?[]:[_("br"),this.replaceField,n("replace",()=>K0(e),[G(e,"replace")]),n("replaceAll",()=>ih(e),[G(e,"replace all")])],_("button",{name:"close",onclick:()=>J0(e),"aria-label":G(e,"close"),type:"button"},["×"])])}commit(){let e=new Uo({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Ht.of(e)}))}keydown(e){sg(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Do:Wt)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),K0(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Ht)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Et).top}}function G(e,t){return e.state.phrase(t)}const Ao=30,ko=/[\s.,:;?!]/;function Go(e,{from:t,to:n}){let i=e.state.doc.lineAt(t),a=e.state.doc.lineAt(n).to,r=Math.max(i.from,t-Ao),c=Math.min(a,n+Ao),s=e.state.sliceDoc(r,c);if(r!=i.from)for(let e=0;es.length-Ao;e--)if(!ko.test(s[e-1])&&ko.test(s[e])){s=s.slice(0,e);break}return o.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${i.number}.`)}const D3=o.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ei=[He,Re.low(bh),D3];class si{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=g(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),s=Math.max(t.from,this.pos-250),o=t.text.slice(s-t.from,this.pos-t.from),n=o.search(p2(e,!1));return n<0?null:{from:s+n,to:this.pos,text:o.slice(n)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l2(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function T3(e){let t=Object.create(null),n=Object.create(null);for(let{label:s}of e){t[s[0]]=!0;for(let e=1;etypeof e=="string"?{label:e}:e),[n,s]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:T3(t);return e=>{let o=e.matchBefore(s);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}function h2(e,t){return n=>{for(let t=g(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class m2{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function et(e){return e.selection.main.from}function p2(e,t){var s;let{source:n}=e,o=t&&n[0]!="^",i=n[n.length-1]!="$";return!o&&!i?e:new RegExp(`${o?"^":""}(?:${n})${i?"$":""}`,(s=e.flags)!==null&&s!==void 0?s:e.ignoreCase?"i":"")}const li=$e.define();function S3(e,n,s,o){let{main:i}=e.selection,a=s-i.from,r=o-i.from;return Object.assign(Object.assign({},e.changeByRange(c=>c!=i&&s!=o&&e.sliceDoc(c.from+a,c.from+r)!=e.sliceDoc(s,o)?{range:c}:{changes:{from:c.from+a,to:o==i.from?c.to:c.from+r,insert:n},range:t.cursor(c.from+a+n.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const b2=new WeakMap;function A3(e){if(!Array.isArray(e))return e;let t=b2.get(e);return t||b2.set(e,t=ai(e)),t}const bo=d.define(),pn=d.define();class b3{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&r<=57||r>=97&&r<=122?2:r>=65&&r<=90?1:0:(v=xr(r))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!m||b==1&&g||j==0&&b!=0)&&(s[o]==r||c[o]==r&&(u=!0)?a[o++]=m:a.length&&(f=!1)),j=b,m+=ne(r)}return o==t&&a[0]==0&&f?this.result(-100+(u?-200:0),a,e):n==t&&h==0?this.ret(-200-e.length+(l==e.length?0:-100),[0,l]):i>-1?this.ret(-700-e.length,[i,i+this.pattern.length]):n==t?this.ret(-200+-700-e.length,[h,l]):o==t?this.result(-100+(u?-200:0)+-700+(f?0:-1100),a,e):s.length==2?null:this.result((m[0]?-700:0)+-200+-1100,m,e)}result(e,t,n){let s=[],o=0;for(let e of t){let i=e+(this.astral?ne(N(n,e)):1);o&&s[o-1]==e?s[o-1]=i:(s[o++]=e,s[o++]=i)}return this.ret(e-n.length,s)}}class m3{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:c3,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>C2(e(n),t(n)),optionClass:(e,t)=>n=>C2(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function C2(e,t){return e?t?e+" "+t:e:t}function c3(e,t,n,s,o,i){let d=e.textDirection==y.RTL,a=d,m=!1,f="top",r,u,c=t.left-o.left,l=o.right-t.right,h=s.right-s.left,p=s.bottom-s.top;if(a&&c=p||e>t.top?r=n.bottom-t.top:(f="bottom",r=t.bottom-n.top)}let g=(t.bottom-t.top)/i.offsetHeight,v=(t.right-t.left)/i.offsetWidth;return{style:`${f}: ${r/g}px; max-width: ${u/v}px`,class:"cm-completionInfo-"+(m?d?"left-narrow":"right-narrow":a?"left":"right")}}function a3(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=e.displayLabel||e.label,i=0;for(let e=0;ei&&o.appendChild(document.createTextNode(a.slice(i,t)));let r=o.appendChild(document.createElement("span"));r.appendChild(document.createTextNode(a.slice(t,n))),r.className="cm-completionMatchedText",i=n}return ie.position-t.position).map(e=>e.render)}function hi(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let s=Math.floor((e-t)/n);return{from:e-(s+1)*n,to:e-s*n}}class U2{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let o=e.state.field(t),{options:i,selected:a}=o.open,s=e.state.facet(D);this.optionContent=a3(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=hi(i.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:s}=e.state.field(t).open;for(let t=n.target,o;t&&t!=this.dom;t=t.parentNode)if(t.nodeName=="LI"&&(o=/-(\d+)$/.exec(t.id))&&+o[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(D).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:pn.of(null)})}),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let s=e.state.field(this.stateField),t=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),s!=t){let{options:o,selected:a,disabled:i}=s.open;(!t.open||t.open.options!=o)&&(this.range=hi(o.length,a,e.state.facet(D).maxRenderedOptions),this.showOptions(o,s.id)),this.updateSel(),i!=((n=t.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!i)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=hi(e.options.length,e.selected,this.view.state.facet(D).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:s}=n;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(n);if(!o)return;"then"in o?o.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)}).catch(e=>K(this.view.state,e,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:s}=e;n.appendChild(t),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&B2(this.list,t),t}measureInfo(){let s=this.dom.querySelector("[aria-selected]");if(!s||!this.info)return null;let t=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),n=s.getBoundingClientRect(),e=this.space;if(!e){let t=this.dom.ownerDocument.defaultView||window;e={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(e.bottom,t.bottom)-10||n.bottomn.from||n.from==0))if(o=e,typeof i!="string"&&i.header)s.appendChild(i.header(i));else{let t=s.appendChild(document.createElement("completion-section"));t.textContent=e}}const r=s.appendChild(document.createElement("li"));r.id=t+"-"+a,r.setAttribute("role","option");let l=this.optionClass(c);l&&(r.className=l);for(let t of this.optionContent){let e=t(c,this.view.state,this.view,d);e&&r.appendChild(e)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.tonew U2(n,e,t)}function B2(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=n.height/e.offsetHeight;s.topn.bottom&&(e.scrollTop+=(s.bottom-n.bottom)/o)}function T2(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function H2(e,t){let o=[],s=null,a=e=>{o.push(e);let{section:t}=e.completion;if(t){s||(s=[]);let e=typeof t=="string"?t:t.name;s.some(t=>t.name==e)||s.push(typeof t=="string"?{name:e}:t)}},r=t.facet(D);for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(n.result.filter===!1)for(let t of n.result.options)a(new m2(t,n.source,e?e(t):[],1e9-o.length));else{let o=t.sliceDoc(n.from,n.to),s,i=r.filterStrict?new m3(o):new b3(o);for(let t of n.result.options)if(s=i.match(t.label)){let o=t.displayLabel?e?e(t,s.matched):[]:s.matched;a(new m2(t,n.source,o,s.score+(t.boost||0)))}}}if(s){let e=Object.create(null),t=0,n=(e,t)=>{var n,s;return((n=e.rank)!==null&&n!==void 0?n:1e9)-((s=t.rank)!==null&&s!==void 0?s:1e9)||(e.namet.score-e.score||c(e.completion,t.completion))){let e=t.completion;!n||n.label!=e.label||n.detail!=e.detail||n.type!=null&&e.type!=null&&n.type!=e.type||n.apply!=e.apply||n.boost!=e.boost?i.push(t):T2(t.completion)>T2(n)&&(i[i.length-1]=t),n=t.completion}return i}class hn{constructor(e,t,n,s,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new hn(this.options,z2(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,o){let i=H2(e,t);if(!i.length)return s&&e.some(e=>e.state==1)?new hn(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let a=t.facet(D).selectOnOpen?0:-1;if(s&&s.selected!=a&&s.selected!=-1){let e=s.options[s.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e,1e8),create:G2,above:o.aboveCursor},s?s.timestamp:Date.now(),a,!1)}map(e){return new hn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class yi{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new yi(I2,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:s}=e,o=s.facet(D),i=o.override||s.languageDataAt("autocomplete",et(s)).map(A3),n=i.map(t=>{let n=this.active.find(e=>e.source==t)||new ae(t,this.active.some(e=>e.state!=0)?1:0);return n.update(e,o)});n.length==this.active.length&&n.every((e,t)=>e==this.active[t])&&(n=this.active);let t=this.open;t&&e.docChanged&&(t=t.map(e.changes)),e.selection||n.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!W6(n,this.active)?t=hn.build(n,s,this.id,t,o):t&&t.disabled&&!n.some(e=>e.state==1)&&(t=null),!t&&n.every(e=>e.state!=1)&&n.some(e=>e.hasResult())&&(n=n.map(e=>e.hasResult()?new ae(e.source,0):e));for(let n of e.effects)n.is(A2)&&(t=t&&t.setSelected(n.value,this.id));return n==this.active&&t==this.open?this:new yi(n,this.id,t)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?R2:P2}}function W6(e,t){if(e==t)return!0;for(let n=0,s=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}const I2=[];function F2(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(li);if(n&&t.activateOnCompletion(n))return 4|8}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?4|1:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class ae{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let s=F2(e,t),n=this;(s&8||s&16&&this.touches(e))&&(n=new ae(n.source,0)),s&4&&n.state==0&&(n=new ae(this.source,1)),n=n.updateFor(e,s);for(let t of e.effects)if(t.is(bo))n=new ae(n.source,1,t.value?et(e.state):-1);else if(t.is(pn))n=new ae(n.source,0);else if(t.is(S2))for(let e of t.value)e.source==n.source&&(n=e);return n}updateFor(e){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new ae(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(et(e.state))}}class cn extends ae{constructor(e,t,n,s,o){super(e,2,t),this.result=n,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let n=this.result;n.map&&!e.changes.empty&&(n=n.map(n,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),i=et(e.state);if((this.explicitPos<0?i<=s:io||!n||t&2&&et(e.startState)==this.from)return new ae(this.source,t&4?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return W2(n.validFor,e.state,s,o)?new cn(this.source,a,n,s,o):n.update&&(n=n.update(n,s,o,new si(e.state,i,a>=0)))?new cn(this.source,a,n,n.from,(r=n.to)!==null&&r!==void 0?r:et(e.state)):new ae(this.source,1,a)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new cn(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new ae(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function W2(e,t,n,s){if(!e)return!1;let o=t.sliceDoc(n,s);return typeof e=="function"?e(o,n,s,t):p2(e,!0).test(o)}const S2=d.define({map(e,t){return e.map(e=>e.map(t))}}),A2=d.define(),Y=R.define({create(){return yi.start()},update(e,t){return e.update(t)},provide:e=>[vr.from(e,e=>e.tooltip),o.contentAttributes.from(e,e=>e.attrs)]});function Mi(e,t){const s=t.completion.apply||t.completion.label;let n=e.state.field(Y).active.find(e=>e.source==t.source);return n instanceof cn&&(typeof s=="string"?e.dispatch(Object.assign(Object.assign({},S3(e.state,s,n.from,n.to)),{annotations:li.of(t.completion)})):s(e,t.completion,n.from,n.to),!0)}const G2=$2(Y,Mi);function so(e,t="option"){return n=>{let s=n.state.field(Y,!1);if(!s||!s.open||s.open.disabled||Date.now()-s.open.timestamp-1?s.open.selected+r*(e?1:-1):e?0:i-1;return o<0?o=t=="page"?0:i-1:o>=i&&(o=t=="page"?i-1:0),n.dispatch({effects:A2.of(o)}),!0}}const Q2=e=>{let t=e.state.field(Y,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp{let t=e.state.field(Y,!1);return!!t&&(e.dispatch({effects:bo.of(!0)}),!0)},J2=e=>{let t=e.state.field(Y,!1);return!!t&&!!t.active.some(e=>e.state!=0)&&(e.dispatch({effects:pn.of(null)}),!0)};class e3{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const t3=50,n3=1e3,s3=A.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Y).active)t.state==1&&this.startQuery(t)}update(e){let t=e.state.field(Y),n=e.state.facet(D);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Y)==t)return;let s=e.transactions.some(e=>{let t=F2(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let n=0;nt3&&Date.now()-t.time>n3){for(let e of t.context.abortListeners)try{e()}catch(e){K(this.view.state,e)}t.context.abortListeners=null,this.running.splice(n--,1)}else t.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(bo)))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.state==1&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),o):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Y);for(let e of t.active)e.state==1&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e)}startQuery(e){let{state:n}=this.view,s=et(n),o=new si(n,s,e.explicitPos==s,this.view),t=new e3(e,o);this.running.push(t),Promise.resolve(e.source(o)).then(e=>{t.context.aborted||(t.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:pn.of(null)}),K(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(D).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(D);for(let o=0;oe.source==s.active.source);if(i&&i.state==1)if(s.done==null){let t=new ae(s.active.source,0);for(let e of s.updates)t=t.update(e,n);t.state!=1&&e.push(t)}else this.startQuery(i)}e.length&&this.view.dispatch({effects:S2.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Y,!1);if(t&&t.tooltip&&this.view.state.facet(D).closeOnBlur){let n=t.open&&Oc(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:pn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:bo.of(!1)}),20),this.composing=0}}}),o3=typeof navigator=="object"&&/Win/.test(navigator.platform),i3=Re.highest(o.domEventHandlers({keydown(e,t){let n=t.state.field(Y,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(o3&&e.altKey)||e.metaKey)return!1;let s=n.open.options[n.open.selected],i=n.active.find(e=>e.source==s.source),o=s.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&Mi(t,s),!1}})),k2=o.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class r3{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class E2{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,z.TrackDel),n=e.mapPos(this.to,1,z.TrackDel);return t==null||n==null?null:new E2(this.field,t,n)}}class x2{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],o=e.doc.lineAt(t),i=/^\s*/.exec(o.text)[0];for(let o of this.lines){if(n.length){let n=i,a=/^\t*/.exec(o)[0].length;for(let t=0;tnew E2(e.field,s[e.line]+e.from,s[e.line]+e.to));return{text:n,ranges:a}}static parse(e){let n=[],s=[],o=[],t;for(let i of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(i);){let e=t[1]?+t[1]:null,c=t[2]||t[3]||"",a=-1,r=c.replace(/\\[{}]/g,e=>e[1]);for(let t=0;t=a&&e.field++}o.push(new r3(a,s.length,t.index,t.index+r.length)),i=i.slice(0,t.index)+c+i.slice(t.index+t[0].length)}i=i.replace(/\\([{}])/g,(e,t,n)=>{for(let e of o)e.line==s.length&&e.from>n&&(e.from--,e.to--);return t}),s.push(i)}return new x2(s,o)}}let d3=c.widget({widget:new class extends Le{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),u3=c.mark({class:"cm-snippetField"});class mn{constructor(e,t){this.ranges=e,this.active=t,this.deco=c.set(e.map(e=>(e.from==e.to?d3:u3).range(e.from,e.to)))}map(e){let t=[];for(let s of this.ranges){let n=s.map(e);if(!n)return null;t.push(n)}return new mn(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const fn=d.define({map(e,t){return e&&e.map(t)}}),f3=d.define(),jn=R.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(fn))return n.value;if(n.is(f3)&&e)return new mn(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>o.decorations.from(e,e=>e?e.deco:c.none)});function ea(e,n){return t.create(e.filter(e=>e.field==n).map(e=>t.range(e.from,e.to)))}function v3(e){let t=x2.parse(e);return(e,n,s,o)=>{let{text:r,ranges:i}=t.instantiate(e.state,s),a={changes:{from:s,to:o,insert:f.of(r)},scrollIntoView:!0,annotations:n?[li.of(n),S.userEvent.of("input.complete")]:void 0};if(i.length&&(a.selection=ea(i,0)),i.some(e=>e.field>0)){let t=new mn(i,0),n=a.effects=[fn.of(t)];e.state.field(jn,!1)===void 0&&n.push(d.appendConfig.of([jn,x3,E3,k2]))}e.dispatch(e.state.update(a))}}function w2(e){return({state:t,dispatch:n})=>{let s=t.field(jn,!1);if(!s||e<0&&s.active==0)return!1;let o=s.active+e,i=e>0&&!s.ranges.some(t=>t.field==o+e);return n(t.update({selection:ea(s.ranges,o),effects:fn.of(i?null:new mn(s.ranges,o)),scrollIntoView:!0})),!0}}const j3=({state:e,dispatch:t})=>{let n=e.field(jn,!1);return!!n&&(t(e.update({effects:fn.of(null)})),!0)},y3=w2(1),_3=w2(-1),w3=[{key:"Tab",run:y3,shift:_3},{key:"Escape",run:j3}],_2=a.define({combine(e){return e.length?e[0]:w3}}),x3=Re.highest(yt.compute([_2],e=>e.facet(_2)));function x(e,t){return Object.assign(Object.assign({},t),{apply:v3(e)})}const E3=o.domEventHandlers({mousedown(e,t){let n=t.state.field(jn,!1),o;if(!n||(o=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let s=n.ranges.find(e=>e.from<=o&&e.to>=o);return!!s&&s.field!=n.active&&(t.dispatch({selection:ea(n.ranges,s.field),effects:fn.of(n.ranges.some(e=>e.field>s.field)?new mn(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),xn={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},mt=d.define({map(e,t){let n=t.mapPos(e,-1,z.TrackAfter);return n??void 0}}),ia=new class extends ht{};ia.startSide=1,ia.endSide=-1;const f2=R.define({create(){return m.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(mt)&&(e=e.update({add:[ia.range(n.value,n.value+1)]}));return e}});function F3(){return[L3,f2]}const ra="()[]{}<>";function c2(e){for(let t=0;t{if((N3?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(s.length>2||s.length==2&&ne(N(s,0))==1||t!=o.from||n!=o.to)return!1;let i=H3(e.state,s);return!!i&&(e.dispatch(i),!0)}),R3=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let o=a2(e,e.selection.main.head),i=o.brackets||xn.brackets,s=null,a=e.changeByRange(n=>{if(n.empty){let s=V3(e.doc,n.head);for(let o of i)if(o==s&&Us(e.doc,n.head)==c2(N(o,0)))return{changes:{from:n.head-o.length,to:n.head+o.length},range:t.cursor(n.head-o.length)}}return{range:s=n}});return s||n(e.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},P3=[{key:"Backspace",run:R3}];function H3(e,t){let n=a2(e,e.selection.main.head),s=n.brackets||xn.brackets;for(let o of s){let i=c2(N(o,0));if(t==o)return i==o?U3(e,o,s.indexOf(o+o+o)>-1,n):$3(e,o,i,n.before||xn.before);if(t==i&&i2(e,e.selection.main.from))return W3(e,o,i)}return null}function i2(e,t){let n=!1;return e.field(f2).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function Us(e,t){let n=e.sliceString(t,t+2);return n.slice(0,ne(N(n,0)))}function V3(e,t){let n=e.sliceString(t-2,t);return ne(N(n,0))==n.length?n:n.slice(1)}function $3(e,n,s,o){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:n,from:a.from},{insert:s,from:a.to}],effects:mt.of(a.to+n.length),range:t.range(a.anchor+n.length,a.head+n.length)};let r=Us(e.doc,a.head);return!r||/\s/.test(r)||o.indexOf(r)>-1?{changes:{insert:n+s,from:a.head},effects:mt.of(a.head+n.length),range:t.cursor(a.head+n.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function W3(e,n,s){let o=null,i=e.changeByRange(n=>n.empty&&Us(e.doc,n.head)==s?{changes:{from:n.head,to:n.head+s.length,insert:s},range:t.cursor(n.head+s.length)}:o={range:n});return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function U3(e,n,s,o){let i=o.stringPrefixes||xn.stringPrefixes,a=null,r=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:mt.of(o.to+n.length),range:t.range(o.anchor+n.length,o.head+n.length)};let r=o.head,c=Us(e.doc,r),l;if(c==n){{if(s2(e,r))return{changes:{insert:n+n,from:r},effects:mt.of(r+n.length),range:t.cursor(r+n.length)};if(i2(e,r)){let i=s&&e.sliceDoc(r,r+n.length*3)==n+n+n,o=i?n+n+n:n;return{changes:{from:r,to:r+o.length,insert:o},range:t.cursor(r+o.length)}}}}else if(s&&e.sliceDoc(r-2*n.length,r)==n+n&&(l=n2(e,r-2*n.length,i))>-1&&s2(e,l))return{changes:{insert:n+n+n+n,from:r},effects:mt.of(r+n.length),range:t.cursor(r+n.length)};else if(e.charCategorizer(r)(c)!=O.Word&&n2(e,r,i)>-1&&!q3(e,r,n,i))return{changes:{insert:n+n,from:r},effects:mt.of(r+n.length),range:t.cursor(r+n.length)};return{range:a=o}});return a?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function s2(e,t){let n=g(e).resolveInner(t+1);return n.parent&&n.from==t}function q3(e,t,n,s){let o=g(e).resolveInner(t,-1),i=s.reduce((e,t)=>Math.max(e,t.length),0);for(let r=0;r<5;r++){let c=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),a=c.indexOf(n);if(!a||a>-1&&s.indexOf(c.slice(0,a))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}function n2(e,t,n){let s=e.charCategorizer(t);if(s(e.sliceDoc(t-1,t))!=O.Word)return t;for(let i of n){let o=t-i.length;if(e.sliceDoc(o,t)==i&&s(e.sliceDoc(o-1,o))!=O.Word)return o}return-1}function t2(e={}){return[i3,Y,D.of(e),s3,Q3,k2]}const G0=[{key:"Ctrl-Space",run:Z2},{key:"Escape",run:J2},{key:"ArrowDown",run:so(!0)},{key:"ArrowUp",run:so(!1)},{key:"PageDown",run:so(!0,"page")},{key:"PageUp",run:so(!1,"page")},{key:"Enter",run:Q2}],Q3=Re.highest(yt.computeN([D],e=>e.facet(D).defaultKeymap?[G0]:[]));class Z3{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class Ut{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=e,o=n.facet(Dn).markerFilter;o&&(s=o(s,n));let i=c.set(s.map(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?c.widget({widget:new vh(e),diagnostic:e}).range(e.from):c.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to)),!0);return new Ut(i,t,$t(i))}}function $t(e,t=null,n=0){let s=null;return e.between(n,1e9,(e,n,{spec:o})=>{if(t&&o.diagnostic!=t)return;return s=new Z3(e,n,o.diagnostic),!1}),s}function th(e,t){let n=t.pos,s=t.end||n,o=e.state.facet(Dn).hideOn(e,n,s);if(o!=null)return o;let i=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(Y0))||e.changes.touchesRange(i.from,Math.max(i.to,s)))}function nh(e,t){return e.field(J,!1)?t:t.concat(d.appendConfig.of(Oh))}const Y0=d.define(),Lo=d.define(),q0=d.define(),J=R.define({create(){return new Ut(c.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),o=null,s=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);o=$t(n,e.selected.diagnostic,s)||$t(n,null,s)}!n.size&&s&&t.state.facet(Dn).autoPanel&&(s=null),e=new Ut(n,s,o)}for(let n of t.effects)if(n.is(Y0)){let s=t.state.facet(Dn).autoPanel?n.value.length?Ps.open:null:e.panel;e=Ut.init(n.value,s,t.state)}else n.is(Lo)?e=new Ut(e.diagnostics,n.value?Ps.open:null,e.selected):n.is(q0)&&(e=new Ut(e.diagnostics,e.panel,n.value));return e},provide:e=>[Rn.from(e,e=>e.panel),o.decorations.from(e,e=>e.diagnostics)]}),rh=c.mark({class:"cm-lintRange cm-lintRange-active"});function ch(e,t,n){let{diagnostics:r}=e.state.field(J),s=[],o=2e8,i=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,a,{spec:r})=>{t>=e&&t<=a&&(e==a||(t>e||n>0)&&(tV0(e,t,!1)))}const dh=e=>{let t=e.state.field(J,!1);(!t||!t.panel)&&e.dispatch({effects:nh(e.state,[Lo.of(!0)])});let n=zn(e,Ps.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},U0=e=>{let t=e.state.field(J,!1);return!!t&&!!t.panel&&(e.dispatch({effects:Lo.of(!1)}),!0)},hh=e=>{let n=e.state.field(J,!1);if(!n)return!1;let s=e.state.selection.main,t=n.diagnostics.iter(s.to+1);return!(!t.value&&(t=n.diagnostics.iter(0),!t.value||t.from==s.from&&t.to==s.to))&&(e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),!0)},mh=[{key:"Mod-Shift-m",run:dh,preventDefault:!0},{key:"F8",run:hh}],Dn=a.define({combine(e){return Object.assign({sources:e.map(e=>e.source).filter(e=>e!=null)},ye(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function W0(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==s.toLowerCase())){t.push(s);continue actions}}t.push("")}return t}function V0(e,t,n){var s;let o=n?W0(t.actions):[];return _("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},_("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(s=t.actions)===null||s===void 0?void 0:s.map((n,s)=>{let r=!1,c=s=>{if(s.preventDefault(),r)return;r=!0;let o=$t(e.state.field(J).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:i}=n,a=o[s]?i.indexOf(o[s]):-1,l=a<0?i:[i.slice(0,a),_("u",i.slice(a,a+1)),i.slice(a+1)];return _("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${i}${a<0?"":` (access key "${o[s]})"`}.`},l)}),t.source&&_("div",{class:"cm-diagnosticSource"},t.source))}class vh extends Le{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return _("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class I0{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=V0(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ps{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)U0(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){{let{diagnostic:n}=this.items[this.selectedIndex],s=W0(n.actions);for(let o=0;o{for(let t=0;tU0(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(J).selected;if(!e)return-1;for(let t=0;t{let c=-1,r;for(let t=e;te&&(this.items.splice(e,c-e),t=!0)),s&&r.diagnostic==s.diagnostic?r.dom.hasAttribute("aria-selected")||(r.dom.setAttribute("aria-selected","true"),n=r):r.dom.hasAttribute("aria-selected")&&r.dom.removeAttribute("aria-selected"),e++});e({sel:n.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),t&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(J),t=$t(n.diagnostics,this.items[e].diagnostic);if(!t)return;this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:q0.of(t)})}static open(e){return new Ps(e)}}function yh(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function Rs(e){return yh(``,`width="6" height="3"`)}const wh=o.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Rs("#d11")},".cm-lintRange-warning":{backgroundImage:Rs("orange")},".cm-lintRange-info":{backgroundImage:Rs("#999")},".cm-lintRange-hint":{backgroundImage:Rs("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Oh=[J,o.decorations.compute([J],e=>{let{selected:t,panel:n}=e.field(J);return!t||!n||t.from==t.to?c.none:c.set([rh.range(t.from,t.to)])}),d9(ch,{hideOn:th}),wh],xh=(()=>[tc(),D9(),Ml(),Iu(),kp(),Bg(),$5(),h.allowMultipleSelections.of(!0),dg(),Qd(_p,{fallback:!0}),du(),F3(),t2(),q7(),pv(),y7(),um(),yt.of([...P3,...W4,...e2,...i1,...Lp,...G0,...mh])])();class ya{constructor(e,t,n,s,o,i,a,r,c,l=0,d){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=r,this.curContext=c,this.lookAhead=l,this.parent=d}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new ya(e,[],t,n,n,0,[],0,s?new H0(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let r=e>>19,t=e&65535,{parser:s}=this.p,c=this.reducePos=2e3&&!((a=this.p.parser.nodeSet.types[t])===null||a===void 0?void 0:a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=i):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(t,o)}storeNode(e,t,n,s=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&e.buffer[s-4]==0&&e.buffer[s-1]>-1){if(t==n)return;if(e.buffer[s-2]>=t){e.buffer[s-2]=n;return}}}if(!o||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let i=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}else this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4)}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let s=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new ya(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new kh(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let n=[];for(let s=0,o;st&1&&e==s)||n.push(t[e],s)}t=n}let n=[];for(let s=0;s>19,o=e&65535,n=this.stack.length-s*3;if(n<0||t.getGoto(this.stack[n],o,!1)<0){let t=this.findForcedReduction();if(t==null)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,o)=>{if(t.includes(s))return;return t.push(s),e.allActions(s,t=>{if(t&(262144|131072));else if(t&65536){{let n=(t>>19)-o;if(n>1){let s=t&65535,o=this.stack.length-n*3;if(o>=0&&e.getGoto(this.stack[o],s,!1)>=0)return n<<19|65536|s}}}else{let e=n(t,o+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class H0{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class kh{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class wa{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new wa(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new wa(this.stack,this.pos,this.index)}}function Nn(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let o=0,i=0;o=92&&t--,t>=34&&t--;let n=t-32;if(n>=46&&(n-=46,i=!0),s+=n,i)break;s*=46}n?n[i++]=s:n=new t(s)}return n}class zs{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const D0=new zs;class Th{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=D0,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,o=this.rangeIndex,s=this.pos+e;for(;sn.to:s>=n.to;){if(o==this.ranges.length-1)return null;let e=this.ranges[++o];s+=e.from-n.to,n=e}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let s=this.chunkOff+e,t,n;if(s>=0&&s=this.chunk2Pos&&te.to&&(this.chunk2=this.chunk2.slice(0,e.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=D0,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class It{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;k0(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}It.prototype.contextual=It.prototype.fallback=It.prototype.extend=!1;class As{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?Nn(e):e}token(e,t){let s=e.pos,n=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(k0(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||n++,s==null)break;e.reset(s,e.token)}n&&(e.reset(s,e.token),e.acceptToken(this.elseToken,n))}}As.prototype.contextual=It.prototype.fallback=It.prototype.extend=!1;class C{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function k0(e,t,n,s,o,i){let a=0,r=1<0){let s=e[n];if(c.allows(s)&&(t.token.value==-1||t.token.value==s||Ph(s,t.token.value,o,i))){t.acceptToken(s);break}}let d=t.next,l=0,n=e[a+2];if(t.next<0&&n>l&&e[s+n*3-3]==65535){a=e[s+n*3-1];continue scan}for(;l>1,i=s+o+(o<<1),r=e[i],c=e[i+1]||65536;if(d=c)l=o+1;else{a=e[i+2],t.advance();continue scan}}break}}function E0(e,t,n){for(let s=t,o;(o=e[s])!=65535;s++)if(o==n)return s-t;return-1}function Ph(e,t,n,s){let o=E0(n,s,t);return o<0||E0(n,s,e)t)&&!s.type.isError)return n<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(e.length,Math.max(s.from+1,t+25));if(n<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return n<0?0:e.length}}let Vh=class FragmentCursor{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?y0(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?y0(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=t,null;if(n instanceof p){if(t==e){if(t=Math.max(this.safeFrom,e)&&(this.trees.push(n),this.start.push(t),this.index.push(0))}else this.index[s]++,this.nextStart=t+n.length}}};class $h{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new zs)}getActions(e){let n=0,t=null,{parser:i}=e.p,{tokenizers:a}=i,o=i.stateSlot(e.state,3),r=e.curContext?e.curContext.hash:0,s=0;for(let c=0;ci.end+25&&(s=Math.max(i.lookAhead,s)),i.value!=0){let s=n;if(i.extended>-1&&(n=this.addActions(e,i.extended,i.end,n)),n=this.addActions(e,i.value,i.end,n),!l.extend&&(t=i,n>s))break}}for(;this.actions.length>n;)this.actions.pop();return s&&e.setLookAhead(s),!t&&e.pos==this.stream.end&&(t=new zs,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,n=this.addActions(e,t.value,t.end,n)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new zs,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){{let{parser:t}=n.p;for(let s=0;s=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let t=0;te.bufferLength*4?new Vh(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let n=this.stacks,s=this.minStackPos,e=this.stacks=[],t,o;if(this.bigReductionCount>300&&n.length==1){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;as)e.push(i);else if(this.advanceStack(i,e,n))continue;else{t||(t=[],o=[]),t.push(i);let e=this.tokens.getMainToken(i);o.push(e.value,e.end)}break}}if(!e.length){let e=t&&Qh(t);if(e)return Q&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Q&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+s);this.recovering||(this.recovering=5)}if(this.recovering&&t){let n=this.stoppedAt!=null&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,o,e);if(n)return Q&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let t=this.recovering==1?1:this.recovering*3;if(e.length>t)for(e.sort((e,t)=>t.score-e.score);e.length>t;)e.pop();e.some(e=>e.reducePos>s)&&this.recovering--}else if(e.length>1){outer:for(let t=0;t500&&o.buffer.length>500)if((n.score-o.score||n.buffer.length-o.buffer.length)>0)e.splice(s--,1);else{e.splice(t--,1);continue outer}}}e.length>12&&e.splice(12,e.length-12)}this.minStackPos=e[0].pos;for(let t=1;t ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(l.contextHash)||0)==n))return e.useNode(o,r),Q&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof p)||o.children.length==0||o.positions[0]>0)break;let c=o.children[0];if(c instanceof p&&o.positions[0]==0)o=c;else break}}let r=s.stateSlot(e.state,4);if(r>0)return e.reduce(r),Q&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(r&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let c=0;ci?t.push(r):n.push(r)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return j0(e,t),!0}}runRecovery(e,t,n){let s=null,o=!1;for(let a=0;a ":"";if(i.deadEnd){if(o)continue;o=!0,i.restart(),Q&&console.log(c+this.stackID(i)+" (restarted)");let e=this.advanceFully(i,n);if(e)continue}let l=i.split(),u=c;for(let e=0;l.forceReduce()&&e<10;e++){Q&&console.log(u+this.stackID(l)+" (via force-reduce)");let t=this.advanceFully(l,n);if(t)break;Q&&(u=this.stackID(l)+" -> ")}for(let e of i.recoverByInsert(r))Q&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>i.pos?(d==i.pos&&(d++,r=0),i.recoverByDelete(r,d),Q&&console.log(c+this.stackID(i)+` (via recover-delete ${this.parser.getName(r)})`),j0(i,n)):(!s||s.scoree;class Kn{constructor(e){this.start=e.start,this.shift=e.shift||ir,this.reduce=e.reduce||ir,this.reuse=e.reuse||ir,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class xe extends ur{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1]),n=[];for(let e=0;e=0)s(o,n,t[e++]);else{let i=t[e+-o];for(let a=-o;a>0;a--)s(t[e++],n,i);e++}}}this.nodeSet=new ls(t.map((t,s)=>T.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:n[s],top:o.indexOf(s)>-1,error:s==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=ac;let i=Nn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;etypeof e=="number"?new It(i,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let s=new Wh(this,e,t,n);for(let o of this.wrappers)s=o(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let o=s[t+1];;){let i=s[o++],a=i&1,r=s[o++];if(a&&n)return r;for(let t=o+(i>>1);o0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let s=this.stateSlot(e,4),n=s?t(s):void 0;for(let s=this.stateSlot(e,1);n==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Me(this.data,s+2);else break;n=t(Me(this.data,s+1))}return n}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Me(this.data,n+2);else break;if((this.data[n+2]&65536>>16)==0){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(xe.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let o=e.specializers.find(e=>e.from==n.external);if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[s]=p0(i),i})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let o of e.split(" ")){let s=t.indexOf(o);s>=0&&(n[s]=!0)}let s=null;for(let e=0;es)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,s)<<1|t}return e.get}const Jh=312,m0=1,tm=2,nm=3,sm=4,om=313,im=315,am=316,rm=5,cm=6,lm=0,Lr=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],u0=125,hm=59,Rr=47,fm=42,pm=43,gm=45,vm=60,bm=44,jm=63,ym=46,_m=new Kn({start:!1,shift(e,t){return t==rm||t==cm||t==im?e:t==am},strict:!1}),wm=new C((e,t)=>{let{next:n}=e;(n==u0||n==-1||t.context)&&e.acceptToken(om)},{contextual:!0,fallback:!0}),Om=new C((e,t)=>{let{next:n}=e,s;if(Lr.indexOf(n)>-1)return;if(n==Rr&&((s=e.peek(1))==Rr||s==fm))return;n!=u0&&n!=hm&&n!=-1&&!t.context&&e.acceptToken(Jh)},{contextual:!0}),xm=new C((e,t)=>{let{next:n}=e;if(n==pm||n==gm){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(m0);e.acceptToken(n?m0:tm)}}else n==jm&&e.peek(1)==ym&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(nm))},{contextual:!0});function Hr(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}const Em=new C((e,t)=>{if(e.next!=vm||!t.dialectEnabled(lm))return;if(e.advance(),e.next==Rr)return;let n=0;for(;Lr.indexOf(e.next)>-1;)e.advance(),n++;if(Hr(e.next,!0)){for(e.advance(),n++;Hr(e.next,!1);)e.advance(),n++;for(;Lr.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==bm)return;for(let t=0;;t++){if(t==7){if(!Hr(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),n++}}e.acceptToken(sm,-n)}),km=fe({"get set async static":e.modifier,"for while do if else switch try catch finally return throw break continue default case":e.controlKeyword,"in of await yield void typeof delete instanceof":e.operatorKeyword,"let var const using function class extends":e.definitionKeyword,"import export from":e.moduleKeyword,"with debugger as new":e.keyword,TemplateString:e.special(e.string),super:e.atom,BooleanLiteral:e.bool,this:e.self,null:e.null,Star:e.modifier,VariableName:e.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":e.function(e.variableName),VariableDefinition:e.definition(e.variableName),Label:e.labelName,PropertyName:e.propertyName,PrivatePropertyName:e.special(e.propertyName),"CallExpression/MemberExpression/PropertyName":e.function(e.propertyName),"FunctionDeclaration/VariableDefinition":e.function(e.definition(e.variableName)),"ClassDeclaration/VariableDefinition":e.definition(e.className),PropertyDefinition:e.definition(e.propertyName),PrivatePropertyDefinition:e.definition(e.special(e.propertyName)),UpdateOp:e.updateOperator,"LineComment Hashbang":e.lineComment,BlockComment:e.blockComment,Number:e.number,String:e.string,Escape:e.escape,ArithOp:e.arithmeticOperator,LogicOp:e.logicOperator,BitOp:e.bitwiseOperator,CompareOp:e.compareOperator,RegExp:e.regexp,Equals:e.definitionOperator,Arrow:e.function(e.punctuation),": Spread":e.punctuation,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace,"InterpolationStart InterpolationEnd":e.special(e.brace),".":e.derefOperator,", ;":e.separator,"@":e.meta,TypeName:e.typeName,TypeDefinition:e.definition(e.typeName),"type enum interface implements namespace module declare":e.definitionKeyword,"abstract global Privacy readonly override":e.modifier,"is keyof unique infer":e.operatorKeyword,JSXAttributeValue:e.attributeValue,JSXText:e.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":e.angleBracket,"JSXIdentifier JSXNameSpacedName":e.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":e.attributeName,"JSXBuiltin/JSXIdentifier":e.standard(e.tagName)}),Am={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Sm={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Mm={__proto__:null,"<":187},Fm=xe.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU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yQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:_m,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[km],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!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ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-Am[e]||-1},{term:338,get:e=>Sm[e]||-1},{term:92,get:e=>Mm[e]||-1}],tokenPrec:14749}),c0=[x("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),x("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),x("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),x("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),x("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),x(`try { +(function(){"use strict";class f{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Xt(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,1|2),this.decompose(t,this.length,s,1),ze.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xt(this,e,t);let n=[];return this.decompose(e,t,n,0),ze.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let s=this.scanIdentical(e,1),o=this.length-this.scanIdentical(e,-1),t=new Kn(this),n=new Kn(e);for(let e=s,i=s;;){if(t.next(e),n.next(e),e=0,t.lineBreak!=n.lineBreak||t.done!=n.done||t.value!=n.value)return!1;if(i+=t.value.length,t.done||i>=o)return!0}}iter(e=1){return new Kn(this,e)}iterRange(e,t=this.length){return new ic(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new uc(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?f.empty:e.length<=32?new E(e):ze.from(E.split(e,[]))}}class E extends f{constructor(e,t=W9(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let i=0;;i++){let a=this.text[i],o=s+a.length;if((t?n:o)>=e)return new O9(s,o,n,a);s=o+1,n++}}decompose(e,t,n,s){let o=e<=0&&t>=this.length?this:new E(oc(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let t=n.pop(),e=rs(o.text,t.text.slice(),0,o.length);if(e.length<=32)n.push(new E(e,t.length+o.length));else{let t=e.length>>1;n.push(new E(e.slice(0,t)),new E(e.slice(t)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof E))return super.replace(e,t,n);[e,t]=Xt(this,e,t);let s=rs(this.text,rs(n.text,oc(this.text,0,e)),t),o=this.length+n.length-(t-e);return s.length<=32?new E(s,o):ze.from(E.split(s,[]),o)}sliceString(e,t=this.length,n=` +`){[e,t]=Xt(this,e,t);let s="";for(let o=0,i=0;o<=t&&ie&&i&&(s+=n),eo&&(s+=a.slice(Math.max(0,e-o),t-o)),o=r+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let o of e)n.push(o),s+=o.length+1,n.length==32&&(t.push(new E(n,s)),n=[],s=-1);return s>-1&&t.push(new E(n,s)),t}}class ze extends f{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,s){for(let i=0;;i++){let o=this.children[i],a=s+o.length,r=n+o.lines-1;if((t?r:a)>=e)return o.lineInner(e,t,n,s);s=a+1,n=r+1}}decompose(e,t,n,s){for(let a=0,o=0;o<=t&&a=o){let a=s&((o<=e?1:0)|(i>=t?2:0));o>=e&&i<=t&&!a?n.push(r):r.decompose(e-o,t-o,n,a)}o=i+1}}replace(e,t,n){if([e,t]=Xt(this,e,t),n.lines=s&&t<=a){let r=i.replace(e-s,t-s,n),c=this.lines-i.lines+r.lines;if(r.lines>5-1&&r.lines>c>>5+1){let s=this.children.slice();return s[o]=r,new ze(s,this.length-(t-e)+n.length)}return super.replace(s,a,r)}s=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=` +`){[e,t]=Xt(this,e,t);let s="";for(let i=0,o=0;ie&&i&&(s+=n),eo&&(s+=a.sliceString(e-o,t-o,n)),o=r+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ze))return 0;let n=0,[s,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,o+=t){if(s==i||o==a)return n;let r=this.children[s],c=e.children[o];if(r!=c)return n+r.scanIdentical(c,t);n+=r.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let a=0;for(let t of e)a+=t.lines;if(a<32){let n=[];for(let t of e)t.flatten(n);return new E(n,t)}let r=Math.max(32,a>>5),u=r<<1,l=r>>1,o=[],s=0,i=-1,n=[];function d(e){let t;if(e.lines>u&&e instanceof ze)for(let t of e.children)d(t);else e.lines>l&&(s>l||!s)?(c(),o.push(e)):e instanceof E&&s&&(t=n[n.length-1])instanceof E&&e.lines+t.lines<=32?(s+=e.lines,i+=e.length+1,n[n.length-1]=new E(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&c(),s+=e.lines,i+=e.length+1,n.push(e))}function c(){if(s==0)return;o.push(n.length==1?n[0]:ze.from(n,i)),i=-1,s=n.length=0}for(let t of e)d(t);return c(),o.length==1?o[0]:new ze(o,t)}}f.empty=new E([""],0);function W9(e){let t=-1;for(let n of e)t+=n.length+1;return t}function rs(e,t,n=0,s=1e9){for(let i=0,a=0,c=!0;a=n&&(r>s&&(o=o.slice(0,s-i)),i0?1:(e instanceof E?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],i=this.offsets[n],o=i>>1,a=s instanceof E?s.text.length:s.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof E){let i=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=s.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof E?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ic{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Kn(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class uc{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(f.prototype[Symbol.iterator]=function(){return this.iter()},Kn.prototype[Symbol.iterator]=ic.prototype[Symbol.iterator]=uc.prototype[Symbol.iterator]=function(){return this});let O9=class Line{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}};function Xt(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}let qt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=1;ee)return qt[t-1]<=e;return!1}function fc(e){return e>=127462&&e<=127487}const _c=8205;function R(e,t,n=!0,s=!0){return(n?Cc:r9)(e,t,s)}function Cc(e,t,n){if(t==e.length)return t;t&&Fc(e.charCodeAt(t))&&zc(e.charCodeAt(t-1))&&t--;let s=D(e,t);for(t+=re(s);t=0&&fc(D(e,n));)s++,n-=2;if(s%2==0)break;t+=2}else break}return t}function r9(e,t,n){for(;t>0;){let s=Cc(e,t-2,n);if(s=56320&&e<57344}function zc(e){return e>=55296&&e<56320}function D(e,t){let n=e.charCodeAt(t);if(!zc(n)||t+1==e.length)return n;let s=e.charCodeAt(t+1);return Fc(s)?(n-55296<<10)+(s-56320)+65536:n}function xr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function re(e){return e<65536?1:2}const mr=/\r\n?|\n/;var O,Ae,Rt,ad,ld,M,gi,i,v,j,w,H,Va,n,L=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(L||(L={}));class Ve{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return o+(e-s);o+=r}else{if(n!=L.Simple&&i>=e&&(n==L.TrackDel&&se||n==L.TrackBefore&&se))return null;if(i>e||i==e&&t<0&&!r)return e==s||t<0?o:o+c;o+=c}s=i}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return o}touchesRange(e,t=e){for(let s=0,n=0;s=0&&n<=t&&o>=e)return!(nt)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ve(e)}static create(e){return new Ve(e)}}class z extends Ve{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return lr(this,(t,n,s,o,i)=>e=e.replace(s,s+(n-t),i),!1),e}mapDesc(e,t=!1){return cr(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,i=0;s=0){t[s]=a,t[s+1]=o;let r=s>>1;for(;n.length0&&et(o,n,t.text),t.forward(e),i+=e}let c=e[a++];for(;i>1].toJSON()))}return e}static of(e,t,n){let o=[],a=[],i=0,s=null;function r(e=!1){if(!e&&!o.length)return;ic||s<0||c>t)throw new RangeError(`Invalid change range ${s} to ${c} (in doc of length ${t})`);let d=l?typeof l=="string"?f.of(l.split(n||mr)):l:f.empty,u=d.length;if(s==c&&u==0)return;si&&I(o,s-i,-1),I(o,c-s,u),et(a,o,d),i=c}}return c(e),r(!s),s}static empty(e){return new z(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],t=[];for(let o=0;ot&&typeof e!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");else if(s.length==1)n.push(s[0],0);else{for(;t.length=0&&n<=0&&n==e[o+1]?e[o]+=t:t==0&&e[o]==0?e[o+1]+=n:s?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function et(e,t,n){if(n.length==0)return;let s=t.length-2>>1;if(s>1])),n||o==e.sections.length||e.sections[o+1]<0)break;r=e.sections[o++],c=e.sections[o++]}t(i,l,a,d,u),i=l,a=d}}}function cr(e,t,n,s=!1){let a=[],r=s?[]:null,o=new un(e),i=new un(t);for(let e=-1;;)if(o.ins==-1&&i.ins==-1){let e=Math.min(o.len,i.len);I(a,e,-1),o.forward(e),i.forward(e)}else if(i.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(i.len=0&&e=0){let n=0,t=o.len;for(;t;)if(i.ins==-1){let e=Math.min(t,i.len);n+=e,t-=e,i.forward(e)}else if(i.ins==0&&i.lent||s.ins>=0&&s.len>t)&&(e||i.length>n),o.forward2(t),s.forward(t)}}}class un{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?f.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?f.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Gt{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new Gt(n,s,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return t.range(e,n);let s=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return t.range(this.anchor,s)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return t.range(e.anchor,e.head)}static create(e,t,n){return new Gt(e,t,n)}}class t{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,n=-1){return e.empty?this:t.create(this.ranges.map(t=>t.map(e,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map(e=>Gt.fromJSON(e)),e.main)}static single(e,n=e){return new t([t.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let o=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let s=e[n];e.sort((e,t)=>e.from-t.from),n=e.indexOf(s);for(let s=1;so.head?t.range(r,a):t.range(a,r))}}return new t(e,n)}}function Lc(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let nr=0;class a{constructor(e,t,n,s,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=nr++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new a(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:tr),!!e.static,e.enables)}of(e){return new Es([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Es(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Es(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function tr(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class Es{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=nr++}dynamicSlot(e){var o;let n=this.value,s=this.facet.compareInput,i=this.id,t=e[i]>>1,r=this.type==2,c=!1,l=!1,d=[];for(let t of this.dependencies)t=="doc"?c=!0:t=="selection"?l=!0:(((o=e[t.id])!==null&&o!==void 0?o:1)&1)==0&&d.push(e[t.id]);return{create(e){return e.values[t]=n(e),1},update(e,o){if(c&&o.docChanged||l&&(o.docChanged||o.selection)||Ga(e,d)){let o=n(e);if(r?!Rc(o,e.values[t],s):!s(o,e.values[t]))return e.values[t]=o,1}return 0},reconfigure:(e,o)=>{let c,l=o.config.address[i];if(l!=null){{let i=Ms(o,l);if(this.dependencies.every(t=>t instanceof a?o.facet(t)===e.facet(t):!(t instanceof N)||o.field(t,!1)==e.field(t,!1))||(r?Rc(c=n(e),i,s):s(c=n(e),i)))return e.values[t]=i,0}}else c=n(e);return e.values[t]=c,1}}}}function Rc(e,t,n){if(e.length!=t.length)return!1;for(let s=0;se[t.id]),a=n.map(e=>e.type),r=o.filter(e=>!(e&1)),s=e[t.id]>>1;function i(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Kc).find(e=>e.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let s=e.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>n.config.address[this.id]!=null?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Kc.of({field:this,create:e})]}get extension(){return this}}const pt={lowest:4,low:3,default:2,high:1,highest:0};function ln(e){return t=>new Gc(t,e)}const Ue={highest:ln(pt.highest),high:ln(pt.high),default:ln(pt.default),low:ln(pt.low),lowest:ln(pt.lowest)};class Gc{constructor(e,t){this.inner=e,this.prec=t}}class Ya{of(e){return new Ka(this,e)}reconfigure(e){return Ya.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Ka{constructor(e,t){this.compartment=e,this.inner=t}}class Wa{constructor(e,t,n,s,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],a=Object.create(null),c=new Map;for(let n of yv(e,t,c))n instanceof N?r.push(n):(a[n.facet.id]||(a[n.facet.id]=[])).push(n);let s=Object.create(null),i=[],o=[];for(let e of r)s[e.id]=o.length<<1,o.push(t=>e.slot(t));let l=n?.config.facets;for(let r in a){let t=a[r],e=t[0].facet,c=l&&l[r]||[];if(t.every(e=>e.type==0))if(s[e.id]=i.length<<1|1,tr(c,t))i.push(n.facet(e));else{let s=e.combine(t.map(e=>e.value));i.push(n&&e.compare(s,n.facet(e))?n.facet(e):s)}else{for(let e of t)e.type==0?(s[e.id]=i.length<<1|1,i.push(e.value)):(s[e.id]=o.length<<1,o.push(t=>e.dynamicSlot(t)));s[e.id]=o.length<<1,o.push(n=>Cv(n,e,t))}}let d=o.map(e=>e(s));return new Wa(e,c,d,s,i,a)}}function yv(e,t,n){let o=[[],[],[],[],[]],i=new Map;function s(e,a){let r=i.get(e);if(r!=null){if(r<=a)return;let t=o[r].indexOf(e);t>-1&&o[r].splice(t,1),e instanceof Ka&&n.delete(e.compartment)}if(i.set(e,a),Array.isArray(e))for(let t of e)s(t,a);else if(e instanceof Ka){if(n.has(e.compartment))throw new RangeError(`Duplicate use of compartment in extensions`);let o=t.get(e.compartment)||e.inner;n.set(e.compartment,o),s(o,a)}else if(e instanceof Gc)s(e.inner,e.prec);else if(e instanceof N)o[a].push(e),e.provides&&s(e.provides,a);else if(e instanceof Es)o[a].push(e),e.facet.extensions&&s(e.facet.extensions,pt.default);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(t,a)}}return s(e,pt.default),o.reduce((e,t)=>e.concat(t))}function kn(e,t){if(t&1)return 2;let n=t>>1,s=e.status[n];if(s==4)throw new Error("Cyclic dependency between fields and/or facets");if(s&2)return s;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function Ms(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const Qc=a.define(),Na=a.define({combine:e=>e.some(e=>e),static:!0}),Jc=a.define({combine:e=>e.length?e[0]:void 0,static:!0}),tl=a.define(),nl=a.define(),sl=a.define(),ol=a.define({combine:e=>!!e.length&&e[0]});class Re{constructor(e,t){this.type=e,this.value=t}static define(){return new iv}}class iv{of(e){return new Re(this,e)}}class W7{constructor(e){this.map=e}of(e){return new d(this,e)}}class d{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new d(this.type,t)}is(e){return this.type==e}static define(e={}){return new W7(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let o of e){let s=o.map(t);s&&n.push(s)}return n}}d.reconfigure=d.define(),d.appendConfig=d.define();class S{constructor(e,t,n,s,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&Lc(n,t.newLength),o.some(e=>e.type==S.time)||(this.annotations=o.concat(S.time.of(Date.now())))}static create(e,t,n,s,o,i){return new S(e,t,n,s,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(S.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}S.time=Re.define(),S.userEvent=Re.define(),S.addToHistory=Re.define(),S.remote=Re.define();function V7(e,t){let n=[];for(let i=0,s=0;;){let a,o;if(i=e[i]))a=e[i++],o=e[i++];else if(s=0;o--){let t=s[o](e);t instanceof S?e=t:Array.isArray(t)&&t.length==1&&t[0]instanceof S?e=t[0]:e=xl(n,Bt(t),!1)}return e}function g7(e){let n=e.startState,s=n.facet(sl),t=e;for(let o=s.length-1;o>=0;o--){let i=s[o](e);i&&Object.keys(i).length&&(t=yl(t,xa(n,i,e.changes.newLength),!0))}return t==e?e:S.create(n,e.changes,e.selection,t.effects,t.annotations,t.scrollIntoView)}const p7=[];function Bt(e){return e==null?p7:Array.isArray(e)?e:[e]}O=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(O||(O={}));const f7=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _a;try{_a=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function h7(e){if(_a)return _a.test(e);for(let n=0;n"\x80"&&(t.toUpperCase()!=t.toLowerCase()||f7.test(t)))return!0}return!1}function l7(e){return t=>{if(!/\S/.test(t))return O.Space;if(h7(t))return O.Word;for(let n=0;n-1)return O.Word;return O.Other}}class h{constructor(e,t,n,s,o,i){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;es.set(t,e)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(d.reconfigure)?(t=null,n=o.value):o.is(d.appendConfig)&&(t=null,n=Bt(n).concat(o.value));let o;if(t)o=e.startState.values.slice();else{t=Wa.resolve(n,s,this);let e=new h(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null);o=e.values}let i=e.startState.facet(Na)?e.newSelection:e.newSelection.asSingle();new h(t,e.newDoc,i,o,(t,n)=>n.update(t,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:t.cursor(n.from+e.length)}))}changeByRange(e){let s=this.selection,i=e(s.ranges[0]),n=this.changes(i.changes),o=[i.range],a=Bt(i.effects);for(let t=1;tn.spec.fromJSON(i,e)))}return h.create({doc:e.doc,selection:t.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=Wa.resolve(e.extensions||[],new Map),o=e.doc instanceof f?e.doc:f.of((e.doc||"").split(n.staticFacet(h.lineSeparator)||mr)),s=e.selection?e.selection instanceof t?e.selection:t.single(e.selection.anchor,e.selection.head):t.single(0);return Lc(s,o.length),n.staticFacet(Na)||(s=s.asSingle()),new h(n,o,s,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(h.tabSize)}get lineBreak(){return this.facet(h.lineSeparator)||` +`}get readOnly(){return this.facet(ol)}phrase(e,...t){for(let t of this.facet(h.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?e:t[s-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let o of this.facet(Qc))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&s.push(i[e]);return s}charCategorizer(e){return l7(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:o,from:i,length:r}=this.doc.lineAt(e),a=this.charCategorizer(e),n=e-i,s=e-i;for(;n>0;){let e=R(o,n,!1);if(a(o.slice(e,n))!=O.Word)break;n=e}for(;se.length?e[0]:4}),h.lineSeparator=Jc,h.readOnly=ol,h.phrases=a.define({compare(e,t){let n=Object.keys(e),s=Object.keys(t);return n.length==s.length&&n.every(n=>e[n]==t[n])}}),h.languageData=Qc,h.changeFilter=tl,h.transactionFilter=nl,h.transactionExtender=sl,Ya.reconfigure=d.define();function ye(e,t,n={}){let s={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=s[e];if(i===void 0)s[e]=o;else if(i===o||o===void 0);else if(Object.hasOwnProperty.call(n,e))s[e]=n[e](i,o);else throw new Error("Config merge conflict for field "+e)}for(let e in t)s[e]===void 0&&(s[e]=t[e]);return s}class bt{eq(e){return this==e}range(e,t=e){return pa.create(e,t,this)}}bt.prototype.startSide=bt.prototype.endSide=0,bt.prototype.point=!1,bt.prototype.mapMode=L.TrackDel;let pa=class Range{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new X(e,t,n)}};function ma(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class El{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let o=n?this.to:this.from;for(let i=s,r=o.length;;){if(i==r)return i;let a=i+r>>1,c=o[a]-e||(n?this.value[a].endSide:this.value[a].startSide)-t;if(a==i)return c>=0?i:r;c>=0?r=a:i=a+1}}between(e,t,n,s){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);ol||c==l&&r.startSide>0&&r.endSide<=0)continue;if((l-c||r.endSide-r.startSide)<0)continue;n<0&&(n=c),r.point&&(o=Math.max(o,l-c)),s.push(r),i.push(c-n),a.push(l-n)}return{mapped:s.length?new El(i,a,s,o):null,pos:n}}}class m{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new m(e,t,n,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:l=!1,filterFrom:r=0,filterTo:c=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(l&&(n=n.slice().sort(ma)),this.isEmpty)return n.length?m.of(n):this;let t=new zl(this,null,-1).goto(0),s=0,i=[],a=new ut;for(;t.value||s=0){let e=n[s++];a.addInner(e.from,e.to,e.value)||i.push(e)}else t.rangeIndex==1&&t.chunkIndexthis.chunkEnd(t.chunkIndex)||ct.to||c=s&&e<=s+i.length&&i.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}iter(e=0){return Ys.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ys.from(e).goto(t)}static compare(e,t,n,s,o=-1){let i=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),a=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),r=Tl(i,a,n),c=new wn(i,r,o),l=new wn(a,r,o);n.iterGaps((e,t,n)=>Dl(c,e,l,t,n,s)),n.empty&&n.length==0&&Dl(c,0,l,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=1e9-1);let a=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),r=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(a.length!=r.length)return!1;if(!a.length)return!0;let c=Tl(a,r),o=new wn(a,c,0).goto(n),i=new wn(r,c,0).goto(n);for(;;){if(o.to!=i.to||!Ki(o.active,i.active)||o.point&&(!i.point||!o.point.eq(i.point)))return!1;if(o.to>s)return!0;o.next(),i.next()}}static spans(e,t,n,s,o=-1){let i=new wn(e,null,o).goto(t),r=t,a=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFromr&&(s.span(r,e,i.active,a),a=i.openEnd(e));if(i.to>n)return a+(i.point&&i.to>n?1:0);r=i.to,i.next()}}static of(e,t=!1){let n=new ut;for(let s of e instanceof pa?[e]:t?Q5(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return m.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=m.empty;s=s.nextLayer)t=new m(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}m.empty=new m([],[],null,-1);function Q5(e){if(e.length>1)for(let n=e[0],t=1;t0)return e.slice().sort(ma);n=s}return e}m.empty.nextLayer=m.empty;class ut{finishChunk(e){this.chunks.push(new El(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new ut)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(s<0)&&(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(m.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=m.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Tl(e,t,n){let s=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&s.push(new zl(i,t,n,o));return s.length==1?s[0]:new Ys(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)oa(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)oa(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),oa(this.heap,0)}}}function oa(e,t){for(let o=e[t];;){let n=(t<<1)+1;if(n>=e.length)break;let s=e[n];if(n+1=0&&(s=e[n+1],n++),o.compare(s)<0)break;e[n]=o,e[t]=s,t=n}}class wn{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ys.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Js(this.active,e),Js(this.activeTo,e),Js(this.activeRank,e),this.minActive=Nl(this.active,this.activeTo)}addActive(e){let t=0,{value:o,to:n,rank:s}=this.cursor;for(;t0;)t++;so(this.active,t,o),so(this.activeTo,t,n),so(this.activeRank,t,s),e&&so(e,t,this.cursor.from),this.minActive=Nl(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let e=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),e&&Js(e,s)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let t=this.cursor.value;if(t.point)if(n&&this.cursor.to==this.to&&this.cursor.from=0&&e[n]=0;n--){if(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n])}return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Dl(e,t,n,s,o,i){e.goto(t),n.goto(s);let r=s+o,a=s,c=s-t;for(;;){let t=e.to+c-n.to||e.endSide-n.endSide,s=t<0?e.to+c:n.to,o=Math.min(s,r);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Ki(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(a,o,e.point,n.point):o>a&&!Ki(e.active,n.active)&&i.compareRange(a,o,e.active,n.active),s>r)break;a=s,t<=0&&e.next(),t>=0&&n.next()}}function Ki(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function Nl(e,t){let n=-1,s=1e9;for(let o=0;o=t)return s;if(s==e.length)break;o+=e.charCodeAt(s)==9?n-o%n:1,s=R(e,s)}return s===!0?-1:e.length}const Ti="ͼ",Pl=typeof Symbol=="undefined"?"__"+Ti:Symbol.for(Ti),Ai=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Xl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class Ze{constructor(e,t){this.rules=[];let{finish:s}=t||{};function o(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function n(e,t,i,a){let c=[],r=/^@(\w+)\b/.exec(e[0]),l=r&&r[1]=="keyframes";if(r&&t==null)return i.push(e[0]+";");for(let s in t){let a=t[s];if(/&/.test(s))n(s.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),a,i);else if(a&&typeof a=="object"){if(!r)throw new RangeError("The value of a property ("+s+") should be a primitive value.");n(o(s),a,c,l)}else a!=null&&c.push(s.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+a+";")}(c.length||l)&&i.push((s&&!r&&!a?e.map(s):e).join(", ")+" {"+c.join(" ")+"}")}for(let t in e)n(o(t),e[t],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Xl[Pl]||1;return Xl[Pl]=e+1,Ti+e.toString(36)}static mount(e,t,n){let s=e[Ai],o=n&&n.nonce;s?o&&s.setNonce(o):s=new zg(e,o),s.mount(Array.isArray(t)?t:[t],e)}}let nd=new Map;class zg{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let t=nd.get(n);if(t)return e[Ai]=t;this.sheet=new s.CSSStyleSheet,nd.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Ai]=this}mount(e,t){let s=this.sheet,o=0,n=0;for(let a=0;a-1&&(this.modules.splice(t,1),n--,t=-1),t==-1){if(this.modules.splice(n++,0,i),s)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ad=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),ld=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),M=0;M<10;M++)Ae[48+M]=Ae[96+M]=String(M);for(M=1;M<=24;M++)Ae[M+111]="F"+M;for(M=65;M<=90;M++)Ae[M]=String.fromCharCode(M+32),Rt[M]=String.fromCharCode(M);for(gi in Ae)Rt.hasOwnProperty(gi)||(Rt[gi]=Ae[gi]);function _g(e){var n=ad&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ld&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",t=!n&&e.key||(e.shiftKey?Rt:Ae)[e.keyCode]||e.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function En(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function fi(e,t){return!!t&&(e==t||e.contains(t.nodeType!=1?t.parentNode:t))}function Qp(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function po(e,t){if(!t.anchorNode)return!1;try{return fi(e,t.anchorNode)}catch{return!1}}function Vn(e){return e.nodeType==3?Et(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function In(e,t,n,s){return!!n&&(Dd(e,t,n,s,-1)||Dd(e,t,n,s,1))}function ft(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function vo(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Dd(e,t,n,s,o){for(;;){if(e==n&&t==s)return!0;if(t==(o<0?0:De(e))){if(e.nodeName=="DIV")return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=ft(e)+(o<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=o<0?De(e):0}else return!1}}function De(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function yo(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Np(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Vd(e,t){let n=t.width/e.offsetWidth,s=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(s>.995&&s<1.005||!isFinite(s)||Math.abs(t.height-e.offsetHeight)<1)&&(s=1),{scaleX:n,scaleY:s}}function Tp(e,t,n,s,o,i,a,r){let c=e.ownerDocument,l=c.defaultView||window;for(let d=e,u=!1;d&&!u;)if(d.nodeType==1){let e,g=d==c.body,f=1,p=1;if(g)e=Np(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(u=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let t=d.getBoundingClientRect();({scaleX:f,scaleY:p}=Vd(d,t),e={left:t.left,right:t.left+d.clientWidth*f,top:t.top,bottom:t.top+d.clientHeight*p})}let h=0,m=0;if(o=="nearest")t.top0&&t.bottom>e.bottom+m&&(m=t.bottom-e.bottom+m+a)):t.bottom>e.bottom&&(m=t.bottom-e.bottom+a,n<0&&t.top-m0&&t.right>e.right+h&&(h=t.right-e.right+h+i)):t.right>e.right&&(h=t.right-e.right+i,n<0&&t.lefto.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break}return{x:t,y:n}}class Mp{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?De(t):0),n,Math.min(e.focusOffset,n?De(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let Tt=null;function Kd(e){if(e.setActive)return e.setActive();if(Tt)return e.focus(Tt);let t=[];for(let n=e;n;n=n.parentNode)if(t.push(n,n.scrollTop,n.scrollLeft),n==n.ownerDocument)break;if(e.focus(Tt==null?{get preventScroll(){return Tt={preventScroll:!0},!0}}:void 0),!Tt){Tt=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function au(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&s>0)return{node:n,offset:s};if(n.nodeType==1&&s>0){if(n.contentEditable=="false")return null;n=n.childNodes[s-1],s=De(n)}else if(n.parentNode&&!vo(n))s=ft(n),n=n.parentNode;else return null}}function cu(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&st)return l.domBoundsAround(e,t,r);if(d>=e&&s==-1&&(s=c,a=r),r>t&&l.dom.parentNode==this.dom){o=c,i=u;break}u=d,r=d+l.breakAfter}return{from:a,to:i<0?n+this.length:i,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){if(this.dom==e)return;this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=Wo){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function gu(e,t,n,s,o,i,a,r,c){let{children:d}=e,l=d.length?d[t]:null,u=i.length?i[i.length-1]:null,h=u?u.breakAfter:a;if(t==s&&l&&!a&&!h&&i.length<2&&l.merge(n,o,i.length?u:null,n==0,r,c))return;if(s0&&(!a&&i.length&&l.merge(n,l.length,i[0],!1,r,0)?l.breakAfter=i.shift().breakAfter:(n2);i={mac:Lu||/Mac/.test(q.platform),windows:/Win/.test(q.platform),linux:/Linux|X11/.test(q.platform),ie:So,ie_version:Cu?fa.documentMode||6:$o?+$o[1]:Bo?+Bo[1]:0,gecko:Eu,gecko_version:Eu?+(/Firefox\/(\d+)/.exec(q.userAgent)||[0,0])[1]:0,chrome:!!ui,chrome_version:ui?+ui[1]:0,ios:Lu,android:/Android\b/.test(q.userAgent),webkit:Au,safari:Du,webkit_version:Au?+(/\bAppleWebKit\/(\d+)/.exec(q.userAgent)||[0,0])[1]:0,tabSize:fa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const I6=256;class je extends _{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return!(this.flags&8||n&&(!(n instanceof je)||this.length-(t-e)+n.length>I6||n.flags&8))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new je(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new V(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return H6(this.dom,e,t)}}class Je extends _{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(tu(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=4|2)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof Je&&n.mark.eq(this.mark))||e&&o<=0||te&&s.push(t=e&&(n=o),t=a,o++}let i=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new Je(this.mark,s,i)}domAtPos(e){return Yu(this,e)}coordsAt(e,t){return c1(this,e,t)}}function H6(e,t,n){let o=e.nodeValue.length;t>o&&(t=o);let l=t,a=t,s=0;t==0&&n<0||t==o&&n>=0?i.chrome||i.gecko||(t?(l--,s=1):a=0)?0:c.length-1];return i.safari&&!s&&r.width==0&&(r=Array.prototype.find.call(c,e=>e.width)||r),s?yo(r,s<0):r||null}class dt extends _{static create(e,t,n){return new dt(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=dt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof dt)||!this.widget.compare(n.widget)||e>0&&o<=0||t0)?V.before(this.dom):V.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?n.length-1:0;;t+=o?-1:1)if(s=n[t],e>0?t==0:t==n.length-1||s.top0?V.before(this.dom):V.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(){return this.dom.getBoundingClientRect()}get overrideDOMText(){return f.empty}get isHidden(){return!0}}je.prototype.children=dt.prototype.children=an.prototype.children=Wo;function Yu(e,t){let o=e.dom,{children:n}=e,s=0;for(let e=0;se&&t0;e--){let t=n[e-1];if(t.dom.parentNode==o)return t.domAtPos(t.length)}for(let e=s;e0&&t instanceof Je&&s.length&&(o=s[s.length-1])instanceof Je&&o.mark.eq(t.mark)?a1(o,t.children[0],n-1):(s.push(t),t.setParent(e)),e.length+=t.length}function c1(e,t,n){let o=null,a=-1,s=null,r=-1;function c(e,t){for(let u=0,i=0;u=t&&(l.children.length?c(l,t-i):(!s||s.isHidden&&n>0)&&(d>t||i==d&&l.getSide()>0)?(s=l,r=t-i):(i-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of s)if(i!=n&&(o.indexOf(i)==-1||e[i]!==t[i]))return!1;return!0}function Pi(e,t,n){let s=!1;if(t)for(let o in t)n&&o in n||(s=!0,o=="style"?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(s=!0,o=="style"?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return s}function m6(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new rt(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:o,end:i}=v1(e,t);n=(o?t?-3e8:-1:5e8)-1,s=(i?t?2e8:1:-6e8)+1}return new rt(e,n,s,t,e.widget||null,!0)}static line(e){return new Zs(e)}static set(e,t=!1){return m.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}c.none=m.empty;class eo extends c{constructor(e){let{start:t,end:n}=v1(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof eo&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&ao(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}eo.prototype.point=!1;class Zs extends c{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Zs&&this.spec.class==e.spec.class&&ao(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Zs.prototype.mapMode=L.TrackBefore,Zs.prototype.point=!0;class rt extends c{constructor(e,t,n,s,o,i){super(t,n,o,e),this.block=s,this.isReplace=i,this.mapMode=s?t<=0?L.TrackBefore:L.TrackAfter:L.TrackDel}get type(){return this.startSide!=this.endSide?H.WidgetRange:this.startSide<=0?H.WidgetBefore:H.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof rt&&u6(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}rt.prototype.point=!0;function v1(e,t=!1){let{inclusiveStart:n,inclusiveEnd:s}=e;return n==null&&(n=e.inclusive),s==null&&(s=e.inclusive),{start:n??t,end:s??t}}function u6(e,t){return e==t||!!(e&&t&&e.compare(t))}function sa(e,t,n,s=0){let o=n.length-1;o>=0&&n[o]+s>=e?n[o]=Math.max(n[o],t):n.push(e,t)}class A extends _{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,s,o,i){if(n){if(!(n instanceof A))return!1;this.dom||n.transferDOM(this)}return s&&this.setDeco(n?n.attrs:null),wu(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let n=new A;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:t,off:s}=this.childPos(e);s&&(n.append(this.children[t].split(s),0),this.children[t].merge(s,this.children[t].length,null,!1,0,0),t++);for(let e=t;e0&&this.children[t-1].length==0;)this.children[--t].destroy();return this.children.length=t,this.markDirty(),this.length=e,n}transferDOM(e){if(!this.dom)return;this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null}setDeco(e){ao(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){a1(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Mi(t,this.attrs||{})),n&&(this.attrs=Mi({class:n},this.attrs||{}))}domAtPos(e){return Yu(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=4|2)}sync(e,t){this.dom?this.flags&4&&(tu(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Pi(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(var s;n&&_.get(n)instanceof Je;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((s=_.get(n))===null||s===void 0?void 0:s.isEditable)==!1&&(!i.ios||!this.children.some(e=>e instanceof je))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof je)||/[^ -~]/.test(n.text))return null;let s=Vn(n.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=c1(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(n instanceof A)return n;if(o>t)break}i=o+n.breakAfter}return null}}class nt extends _{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,s,o,i){return!(n&&(!(n instanceof nt)||!this.widget.compare(n.widget)||e>0&&o<=0||t0)}}class ia extends We{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Vs{constructor(e,t,n,s){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof nt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new A),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Bs(new an(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof nt)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Bs(new je(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}span(e,t,n,s){this.buildText(t-e,n,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,n,s,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof rt){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof rt)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new nt(n.widget||Nt.block,a,n));else{let i=dt.create(n.widget||Nt.inline,a,a?0:n.startSide),r=this.atCursorPos&&!i.isEditable&&o<=s.length&&(e0),c=!i.isEditable&&(es.length||n.startSide<=0),l=this.getLine();this.pendingBuffer==2&&!r&&!i.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),r&&(l.append(Bs(new an(1),s),o),o=s.length+Math.max(0,o-s.length)),l.append(Bs(i,s),o),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,s,o){let i=new Vs(e,t,n,o);return i.openEnd=m.spans(s,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function Bs(e,t){for(let n of t)e=new Je(n,[e],e.length);return e}class Nt extends We{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Nt.inline=new Nt("span"),Nt.block=new Nt("div"),j=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(j||(j={}));const gt=j.LTR,ba=j.RTL;function b1(e){let t=[];for(let n=0;n=t){if(i.level==n)return a;(o<0||(s!=0?s<0?i.fromt:e[o].level>i.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function F1(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;e-=3)if(we[e+1]==-n){let n=we[e+2],s=n&2?o:n&4?n&1?i:o:0;s&&(b[t]=b[we[e]]=s),r=e;break}}else if(we.length==189)break;else we[r++]=t,we[r++]=a,we[r++]=c;else if((s=b[t])==2||s==1){let e=s==o;c=e?0:1;for(let t=r-3;t>=0;t-=3){let n=we[t+2];if(n&2)break;if(e)we[t+2]|=2;else{if(n&4)break;we[t+2]|=4}}}}}function K6(e,t,n,s){for(let o=0,a=s;o<=n.length;o++){let r=o?n[o-1].to:e,i=oc;)s==i&&(s=n[--t].from,i=t?n[t-1].to:e),b[--s]=u;c=r}else a=l,c++}}}function Or(e,t,n,s,o,i,a){let r=s%2?2:1;if(s%2==o%2)for(let c=t,d=0;cc&&a.push(new Ge(c,t.from,m));let n=t.direction==gt!=!(m%2);Mr(e,n?s+1:s,o,t.inner,t.from,t.to,a),c=t.to}l=t.to}else if(l==n||(u?b[l]!=r:b[l]==r))break;else l++;h?Or(e,c,l,s+1,o,h,a):ct;){let u=!0,f=!1;if(!d||c>i[d-1].to){let e=b[c-1];e!=r&&(u=!1,f=e==16)}let h=!u&&r==1?[]:null,m=u?s:s+1,l=c;run:for(;;)if(d&&l==i[d-1].to){if(f)break run;let n=i[--d];if(!u)for(let e=n.from,s=d;;){if(e==t)break run;if(s&&i[s-1].to==e)e=i[--s].from;else if(b[e-1]==r)break run;else break}if(h)h.push(n);else{n.tob.length;)b[b.length]=256;let s=[],o=t==gt?0:1;return Mr(e,o,o,n,0,e.length,s),s}function s4(e){return[new Ge(0,e,0)]}let d4="";function H8(e,n,s,o,i){var h;let c=o.head-e.from,l=Ge.find(n,c,(h=o.bidiLevel)!==null&&h!==void 0?h:-1,o.assoc),a=n[l],u=a.side(i,s);if(c==u){let e=l+=i?1:-1;if(e<0||e>=n.length)return null;a=n[l=e],c=a.side(!i,s),u=a.side(i,s)}let r=R(e.text,c,a.forward(i,s));(ra.to)&&(r=u),d4=e.text.slice(Math.min(c,r),Math.max(c,r));let d=l==(i?n.length-1:0)?null:n[l+(i?1:-1)];return d&&r==u&&d.level+(i?0:1)e.some(e=>e)}),h0=a.define({combine:e=>e.some(e=>e)}),qr=a.define();class Jn{constructor(e,t="nearest",n="nearest",s=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new Jn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Jn(t.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const hs=d.define({map:(e,t)=>e.map(t)}),v0=d.define();function K(e,t,n){let s=e.facet($4);s.length?s[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const it=a.define({combine:e=>!e.length||e[0]});let Yh=0;const qn=a.define();class k{constructor(e,t,n,s,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.extension=o(this)}static define(e,t){const{eventHandlers:o,eventObservers:i,provide:n,decorations:s}=t||{};return new k(Yh++,e,o,i,e=>{let t=[qn.of(e)];return s&&t.push(Un.of(t=>{let n=t.plugin(e);return n?s(n):c.none})),n&&t.push(n(e)),t})}static fromClass(e,t){return k.define(t=>new e(t),t)}}class yr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(K(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){K(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if((t=this.value)===null||t===void 0?void 0:t.destroy)try{this.value.destroy()}catch(t){K(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const b0=a.define(),ar=a.define(),Un=a.define(),_0=a.define(),Ja=a.define(),w0=a.define();function M0(e,t){let n=e.state.facet(w0);if(!n.length)return n;let o=n.map(t=>t instanceof Function?t(e):t),s=[];return m.spans(o,t.from,t.to,{point(){},span(e,n,o,i){let r=e-t.from,c=n-t.from,a=s;for(let s=o.length-1;s>=0;s--,i--){let e=o[s].spec.bidiIsolate,n;if(e==null&&(e=D8(t.text,r,c)),i>0&&a.length&&(n=a[a.length-1]).to==r&&n.direction==e)n.to=c,a=n.inner;else{let t={from:r,to:c,direction:e,inner:[]};a.push(t),a=t.inner}}}}),s}const F0=a.define();function T0(e){let t=0,n=0,s=0,o=0;for(let a of e.state.facet(F0)){let i=a(e);i&&(i.left!=null&&(t=Math.max(t,i.left)),i.right!=null&&(n=Math.max(n,i.right)),i.top!=null&&(s=Math.max(s,i.top)),i.bottom!=null&&(o=Math.max(o,i.bottom)))}return{left:t,right:n,top:s,bottom:o}}const Hn=a.define();class le{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new le(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(s.fromA>n.toA)continue;if(s.toAr)break;o+=2}if(!s)return n;new le(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),c=s.toA,a=s.toB}}}class Fa{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=z.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let s=[];this.changes.iterChangedRanges((e,t,n,o)=>s.push(new le(e,t,n,o))),this.changedRanges=s}static create(e,t,n){return new Fa(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&(8|2))>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class P0 extends _{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=c.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new A],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new le(0,0,0,e.state.doc.length)],0,null)}update(e){var o;let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(((o=this.domChanged)===null||o===void 0?void 0:o.newSel)?s=this.domChanged.newSel.head:!oh(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let n=s>-1?Ch(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:n,to:s}=this.hasComposition;t=new le(n,s,e.changes.mapPos(n,-1),e.changes.mapPos(s,1)).addToSet(t.slice())}this.hasComposition=n?{from:n.range.fromB,to:n.range.toB}:null,(i.ie||i.chrome)&&!n&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,r=this.updateDeco(),c=fh(a,r,e.changes);return t=le.extendWithRanges(t,c),!(!(this.flags&7)&&t.length==0)&&(this.updateInner(t,e.startState.doc.length,n),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=i.chrome||i.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=~7,e&&(e.written||s.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=~8);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?s[a]:null;if(!d)break;let{fromA:m,toA:h,fromB:r,toB:c}=d,t,l,i,e;if(n&&n.range.fromBr){let s=Vs.build(this.view.state.doc,r,n.range.fromB,this.decorations,this.dynamicDecorationMap),o=Vs.build(this.view.state.doc,n.range.toB,c,this.decorations,this.dynamicDecorationMap);l=s.breakAtStart,i=s.openStart,e=o.openEnd;let a=this.compositionView(n);o.breakAtStart?a.breakAfter=1:o.content.length&&a.merge(a.length,a.length,o.content[0],!1,o.openStart,0)&&(a.breakAfter=o.content[0].breakAfter,o.content.shift()),s.content.length&&a.merge(0,0,s.content[s.content.length-1],!0,0,s.openEnd)&&s.content.pop(),t=s.content.concat(a).concat(o.content)}else({content:t,breakAtStart:l,openStart:i,openEnd:e}=Vs.build(this.view.state.doc,r,c,this.decorations,this.dynamicDecorationMap));let{i:u,off:f}=o.findPos(h,1),{i:p,off:g}=o.findPos(m,-1);gu(this,p,g,u,f,t,l,i,e)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(v0)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new je(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new Je(n,[t],t.length);let n=new A;return n.append(t,0),n}fixCompositionDOM(e){let s=(e,t)=>{t.flags|=8|(t.children.some(e=>e.flags&7)?1:0),this.markedForComposition.add(t);let n=_.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),t=this.children[n.i];s(e.line,t);for(let o=e.marks.length-1;o>=-1;o--)n=t.childPos(n.off,1),t=t.children[n.i],s(o>=0?e.marks[o].node:e.text,t)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,c=r==this.dom,l=!c&&po(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(c||t||l))return;let d=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,n=this.moveToLine(this.domAtPos(a.anchor)),o=a.empty?n:this.moveToLine(this.domAtPos(a.head));if(i.gecko&&a.empty&&!this.hasComposition&&Sh(n)){let e=document.createTextNode("");this.view.observer.ignore(()=>n.node.insertBefore(e,n.node.childNodes[n.offset]||null)),n=o=new V(e,0),d=!0}let s=this.view.observer.selectionRange;(d||!s.focusNode||(!In(n.node,n.offset,s.anchorNode,s.anchorOffset)||!In(o.node,o.offset,s.focusNode,s.focusOffset))&&!this.suppressWidgetCursorChange(s,a))&&(this.view.observer.ignore(()=>{i.android&&i.chrome&&this.dom.contains(s.focusNode)&&ah(s.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=En(this.view.root);if(e)if(a.empty){if(i.gecko){let e=_h(n.node,n.offset);if(e&&e!=(1|2)){let t=(e==1?au:cu)(n.node,n.offset);t&&(n=new V(t.node,t.offset))}}e.collapse(n.node,n.offset),a.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(n.node,n.offset);try{e.extend(o.node,o.offset)}catch{}}else{let t=document.createRange();a.anchor>a.head&&([n,o]=[o,n]),t.setEnd(o.node,o.offset),t.setStart(n.node,n.offset),e.removeAllRanges(),e.addRange(t)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(n,o)),this.impreciseAnchor=n.precise?null:new V(s.anchorNode,s.anchorOffset),this.impreciseHead=o.precise?null:new V(s.focusNode,s.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&In(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=En(t.root),{anchorNode:l,anchorOffset:d}=t.observer.selectionRange;if(!n||!e.empty||!e.assoc||!n.modify)return;let s=A.find(this,e.head);if(!s)return;let o=s.posAtStart;if(e.head==o||e.head==o+s.length)return;let i=this.coordsAt(e.head,-1),a=this.coordsAt(e.head,1);if(!i||!a||i.bottom>a.top)return;let r=this.domAtPos(e.head+e.assoc);n.collapse(r.node,r.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&n.collapse(l,d)}moveToLine(e){let n=this.dom,t;if(e.node!=n)return e;for(let s=e.offset;!t&&s=0;s--){let o=_.get(n.childNodes[s]);o instanceof A&&(t=o.domAtPos(o.length))}return t?new V(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let n=_.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;a--){let o=this.children[a],r=c-o.breakAfter,i=r-o.length;if(re||o.covers(1))&&(!n||o instanceof A&&!(n instanceof A&&t>=0)))n=o,s=i;else if(n&&i==e&&r==e&&o instanceof nt&&Math.abs(t)<2){if(o.deco.startSide<0)break;a&&(n=null)}c=i}return n?n.coordsAt(e-s,t):null}coordsForChar(e){let{i,off:n}=this.childPos(e,1),t=this.children[i];if(!(t instanceof A))return null;for(;t.children.length;){let{i:e,off:s}=t.childPos(n,1);for(;;e++){if(e==t.children.length)return null;if((t=t.children[e]).length)break}n=s}if(!(t instanceof je))return null;let o=R(t.text,n);if(o==n)return null;let s=Et(t.dom,n,o).getClientRects();for(let t=0;tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,r=this.view.textDirection==j.LTR;for(let e=0,l=0;li)break;if(e>=o){let o=c.dom.getBoundingClientRect();if(t.push(o.height),a){let i=c.dom.lastChild,t=i?Vn(i):[];if(t.length){let i=t[t.length-1],a=r?i.right-o.left:o.right-i.left;a>s&&(s=a,this.minWidth=n,this.minWidthFrom=e,this.minWidthTo=d)}}}e=d+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?j.RTL:j.LTR}measureTextSize(){for(let e of this.children)if(e instanceof A){let t=e.measureTextSize();if(t)return t}let e=document.createElement("div"),t,n,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Vn(e.firstChild)[0];t=e.getBoundingClientRect().height,n=o?o.width/27:7,s=o?o.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new uu(this.children,e,t)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,o=0;;o++){let s=o==e.viewports.length?null:e.viewports[o],i=s?s.from-1:this.length;if(i>n){let s=(e.lineBlockAt(i).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(c.replace({widget:new ia(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!s)break;n=s.to+1}return c.set(t)}updateDeco(){let e=1,t=this.view.state.facet(Un).map(t=>{let n=this.dynamicDecorationMap[e++]=typeof t=="function";return n?t(this.view):t}),n=!1,s=this.view.state.facet(_0).map((e)=>{let s=typeof e=="function";return s&&(n=!0),s?e(this.view):e});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(m.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let o=T0(this.view),r={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:i,offsetHeight:a}=this.view.scrollDOM;Tp(this.view.scrollDOM,r,t.head{et.from&&(n=!0)}),n}function eh(e,n,s=1){let c=e.charCategorizer(n),o=e.doc.lineAt(n),r=n-o.from;if(o.length==0)return t.cursor(n);r==0?s=1:r==o.length&&(s=-1);let i=r,a=r;s<0?i=R(o.text,r,!1):a=R(o.text,r);let l=c(o.text.slice(i,a));for(;i>0;){let e=R(o.text,i,!1);if(c(o.text.slice(e,i))!=l)break;i=e}for(;ae?t.left-e:Math.max(0,e-t.right)}function B3(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Lo(e,t){return e.topt.top+1}function d2(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function aa(e,t,n){let o,s,c,r,l=!1,d,u,i,a;for(let h=e.firstChild;h;h=h.nextSibling){let m=Vn(h);for(let f=0;fg||r==g&&c>p){o=h,s=e,c=p,r=g;let i=g?n0?f0)}p==0?n>e.bottom&&(!i||i.bottome.top)&&(u=h,a=e):i&&Lo(i,e)?i=v2(i,e.bottom):a&&Lo(a,e)&&(a=d2(a,e.top))}}if(i&&i.bottom>=n?(o=d,s=i):a&&a.top<=n&&(o=u,s=a),!o)return{node:e,offset:0};let h=Math.max(s.left,Math.min(s.right,t));if(o.nodeType==3)return j2(o,h,n);if(l&&o.contentEditable!="false")return aa(o,h,n);let m=Array.prototype.indexOf.call(e.childNodes,o)+(t>=(s.left+s.right)/2?1:0);return{node:e,offset:m}}function j2(e,t,n){let r=e.nodeValue.length,s=-1,a=1e9,o=0;for(let c=0;cn?r.top-n:n-r.bottom)-1;if(r.left-1<=t&&r.right+1>=t&&u=(r.left+r.right)/2,n=o;if(i.chrome||i.gecko){let t=Et(e,c).getBoundingClientRect();t.left==r.right&&(n=!o)}if(u<=0)return{node:e,offset:c+(n?1:0)};s=c+(n?1:0),a=u}}}return{node:e,offset:s>-1?s:o>0?e.nodeValue.length:0}}function y2(e,t,n,s=-1){let m=e.contentDOM.getBoundingClientRect(),b=m.top+e.viewState.paddingTop,o,{docHeight:j}=e.viewState,{x:r,y:l}=t,d=l-b;if(d<0)return 0;if(d>j)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;;){if(o=e.elementAtHeight(d),o.type==H.Text)break;for(var g,v;;){if(d=s>0?o.bottom+t:o.top-t,d>=0&&d<=j)break;if(i)return n?null:0;i=!0,s=-s}}l=b+d;let p=o.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:_2(e,m,o,r,l);let f=e.dom.ownerDocument,y=e.root.elementFromPoint?e.root:f,c=y.elementFromPoint(r,l);c&&!e.contentDOM.contains(c)&&(c=null),c||(r=Math.max(m.left+1,Math.min(m.right-1,r)),c=y.elementFromPoint(r,l),c&&!e.contentDOM.contains(c)&&(c=null));let a,h=-1;if(c&&((g=e.docView.nearest(c))===null||g===void 0?void 0:g.isEditable)!=!1)if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(r,l);e&&({offsetNode:a,offset:h}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(r,l);t&&({startContainer:a,startOffset:h}=t,(!e.contentDOM.contains(a)||i.safari&&g3(a,h,r)||i.chrome&&p3(a,h,r))&&(a=void 0))}if(!a||!e.docView.dom.contains(a)){let t=A.find(e.docView,p);if(!t)return d>o.top+o.height/2?o.to:o.from;({node:a,offset:h}=aa(t.dom,r,l))}let u=e.docView.nearest(a);if(!u)return null;if(u.isWidget&&((v=u.dom)===null||v===void 0?void 0:v.nodeType)==1){let e=u.dom.getBoundingClientRect();return t.ye.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,s=Math.floor((o-n.top-(e.defaultLineHeight-t)*.5)/t);i+=s*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+Di(a,i,e.state.tabSize)}function g3(e,t,n){let s;if(e.nodeType!=3||t!=(s=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType!=1||t.nodeName!="BR")return!1;return Et(e,s-1,s).getBoundingClientRect().left>n}function p3(e,t,n){if(t!=0)return!1;for(let n=e;;){let t=n.parentNode;if(!t||t.nodeType!=1||t.firstChild!=n)return!1;if(t.classList.contains("cm-line"))break;n=t}let s=e.nodeType==1?e.getBoundingClientRect():Et(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-s.left>5}function Ii(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==H.Text))return e;return n}function m3(e,n,s,o){let i=Ii(e,n.head),a=!o||i.type!=H.Text||!e.lineWrapping&&!i.widgetLineBreaks?null:e.coordsAtPos(n.assoc<0&&n.head>i.from?n.head-1:n.head);if(a){let n=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:s==(r==j.LTR)?n.right-1:n.left+1,y:(a.top+a.bottom)/2});if(o!=null)return t.cursor(o,s?-1:1)}return t.cursor(s?i.to:i.from,s?-1:1)}function x2(e,t,n,s){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let r=t,l=null;;){let c=H8(o,i,a,r,n),d=d4;if(!c){if(o.number==(n?e.state.doc.lines:1))return r;d=` +`,o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),c=e.visualLineSide(o,!n)}if(l){if(!l(d))return r}else{if(!s)return c;l=s(d)}r=c}}function X2(e,t,n){let o=e.state.charCategorizer(t),s=o(n);return e=>{let t=o(e);return s==O.Space&&(s=t),s==t}}function Y2(e,n,s,o){let i=n.head,c=s?1:-1;if(i==(s?e.state.doc.length:0))return t.cursor(i,n.assoc);let a=n.goalColumn,d,r=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,n.assoc||-1),u=e.documentTop;if(l)a==null&&(a=l.left-r.left),d=c<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);a==null&&(a=Math.min(r.right-r.left,e.defaultCharacterWidth*(i-t.from))),d=(c<0?t.top:t.bottom)+u}let h=r.left+a,m=o??e.viewState.heightOracle.textHeight>>1;for(let o=0;;o+=10){let n=d+(m+o)*c,s=y2(e,{x:h,y:n},!1,c);if(nr.bottom||(c<0?si)){let o=e.docView.coordsForChar(s),i=!o||n{if(t>e&&tt(e)),s.from,n.head>s.from?-1:1);return o==s.from?s:t.cursor(o,oa)&&this.lineBreak(),s=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let o=0,a=this.lineSeparator?null:/\r\n?|\n/g;;){let n=-1,s=1,i;if(this.lineSeparator?(n=t.indexOf(this.lineSeparator,o),s=this.lineSeparator.length):(i=a.exec(t))&&(n=i.index,s=i[0].length),this.append(t.slice(o,n<0?t.length:n)),n<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);o=n+s}}readNode(e){if(e.cmIgnore)return;let n=_.get(e),t=n&&n.overrideDOMText;if(t!=null){this.findPointInside(e,t.length);for(let e=t.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(U2(e,n.node,n.offset)?t:0))}}function U2(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:a,impreciseAnchor:r}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,s,0))){let t=a||r?[]:h3(e),n=new q2(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=C3(t,this.bounds.from)}else{let n=e.observer.selectionRange,s=a&&a.node==n.focusNode&&a.offset==n.focusOffset||!fi(e.contentDOM,n.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(n.focusNode,n.focusOffset),o=r&&r.node==n.anchorNode&&r.offset==n.anchorOffset||!fi(e.contentDOM,n.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(n.anchorNode,n.anchorOffset),c=e.viewport;if((i.ios||i.chrome)&&e.state.selection.main.empty&&s!=o&&(c.from>0||c.toDate.now()-100?e.inputState.lastKeyCode:-1;if(n.bounds){let{from:a,to:c}=n.bounds,l=o.from,d=null;(r===8||i.android&&n.text.length=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4?s={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,s.from).append(s.insert).append(e.state.doc.slice(s.to,o.to))}:(i.mac||i.android)&&s&&s.from==s.to&&s.from==o.head-1&&/^\. ?$/.test(s.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(a&&s.insert.length==2&&(a=t.single(a.main.anchor-1,a.main.head-1)),s={from:o.from,to:o.to,insert:f.of([" "])}):i.chrome&&s&&s.from==s.to&&s.from==o.head&&s.insert.toString()==` + `&&e.lineWrapping&&(a&&(a=t.single(a.main.anchor-1,a.main.head-1)),s={from:o.from,to:o.to,insert:f.of([" "])}),s)return yi(e,s,a,r);if(a&&!a.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:a,scrollIntoView:t,userEvent:n}),!0}return!1}function yi(e,t,n,s=-1){if(i.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(i.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&e.state.sliceDoc(t.from,o.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&At(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||s==8&&t.insert.lengtho.head)&&At(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&At(e.contentDOM,"Delete",46)))return!0;let c=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a,r=()=>a||(a=H2(e,t,n));return e.state.facet(s0).some(n=>n(e,t.from,t.to,c,r))||e.dispatch(r()),!0}function H2(e,n,s){let a,i=e.state,o=i.selection.main;if(n.from>=o.from&&n.to<=o.to&&n.to-n.from>=(o.to-o.from)/3&&(!s||s.main.empty&&s.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let t=o.fromn.to?i.sliceDoc(n.to,o.to):"";a=i.replaceSelection(e.state.toText(t+n.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let c=i.changes(n),r=s&&s.main.to<=c.newLength?s.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=o.to&&n.to>=o.to-10){let u=e.state.sliceDoc(n.from,n.to),l,d=s&&H0(e,s.main.head);if(d){let e=n.insert.length-(n.to-n.from);l={from:d.from,to:d.to-e}}else l=e.state.doc.lineAt(o.head);let h=o.to-n.to,m=o.to-o.from;a=i.changeByRange(s=>{if(s.from==o.from&&s.to==o.to)return{changes:c,range:r||s.map(c)};let a=s.to-h,d=a-u.length;if(s.to-s.from!=m||e.state.sliceDoc(d,a)!=u||s.to>=l.from&&s.from<=l.to)return{range:s};let f=i.changes({from:d,to:a,insert:n.insert}),p=s.to-o.to;return{changes:f,range:r?t.range(Math.max(0,r.anchor+p),Math.max(0,r.head+p)):s.map(f)}})}else a={changes:c,selection:r&&i.selection.replaceRange(r)}}let r="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,r+=".compose",e.inputState.compositionFirstChange&&(r+=".start",e.inputState.compositionFirstChange=!1)),i.update(a,{userEvent:r,scrollIntoView:!0})}function a3(e,t,n,s){let r=Math.min(e.length,t.length),o=0;for(;o0&&a>0&&e.charCodeAt(i-1)==t.charCodeAt(a-1);)i--,a--;if(s=="end"){let e=Math.max(0,o-Math.min(i,a));n-=i+e-o}if(i=i?o-n:0;o-=e,a=o+(a-i),i=o}else if(a=a?o-n:0;o-=e,i=o+(i-a),a=o}return{from:o,toA:i,toB:a}}function h3(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:s,focusNode:o,focusOffset:i}=e.observer.selectionRange;return n&&(t.push(new F2(n,s)),(o!=n||i!=s)&&t.push(new F2(o,i))),t}function C3(e,n){if(e.length==0)return null;let s=e[0].pos,o=e.length==2?e[1].pos:s;return s>-1&&o>-1?t.single(s+n,o+n):null}class k3{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,i.safari&&e.contentDOM.addEventListener("input",()=>null),i.gecko&&Km(e.contentDOM.ownerDocument)}handleEvent(e){if(!ih(this.view,e)||this.ignoreDuringComposition(e))return;if(e.type=="keydown"&&this.keydown(e))return;this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=M3(e),s=this.handlers,n=this.view.contentDOM;for(let e in t)if(e!="scroll"){let i=!t[e].handlers.length,o=s[e];o&&i!=!o.handlers.length&&(n.removeEventListener(e,this.handleEvent),o=null),o||n.addEventListener(e,this.handleEvent,{passive:i})}for(let e in s)e!="scroll"&&!t[e]&&n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&r2.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),i.android&&i.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return i.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=u2.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||z3.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&!(t.key=="Enter"&&e&&e.from0||!!(i.safari&&!i.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function g2(e,t){return(n,s)=>{try{return t.call(e,s,n)}catch(e){K(n.state,e)}}}function M3(e){let n=Object.create(null);function t(e){return n[e]||(n[e]={observers:[],handlers:[]})}for(let s of e){let n=s.spec;if(n&&n.domEventHandlers)for(let e in n.domEventHandlers){let o=n.domEventHandlers[e];o&&t(e).handlers.push(g2(s.value,o))}if(n&&n.domEventObservers)for(let e in n.domEventObservers){let o=n.domEventObservers[e];o&&t(e).observers.push(g2(s.value,o))}}for(let e in ue)t(e).handlers.push(ue[e]);for(let e in se)t(e).observers.push(se[e]);return n}const u2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],z3="dthko",r2=[16,17,18,20,91,92,224,225],xo=6;function Co(e){return Math.max(0,e)*.7+8}function I3(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class K3{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Fp(e.contentDOM),this.atoms=e.state.facet(Ja).map(t=>t(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(h.allowMultipleSelections)&&Y3(e,t),this.dragging=!!(sh(e,t)&&O0(t)==1)&&null}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&I3(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,s=0,o=0,i=0,a=this.view.win.innerWidth,r=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:r}=this.scrollParents.y.getBoundingClientRect());let t=T0(this.view);e.clientX-t.left<=o+xo?n=-Co(o-e.clientX):e.clientX+t.right>=a-xo&&(n=Co(e.clientX-a)),e.clientY-t.top<=i+xo?s=-Co(i-e.clientY):e.clientY+t.bottom>=r-xo&&(s=Co(e.clientY-r)),this.setScrollSpeed(n,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let o=0;oe.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Y3(e,t){let n=e.state.facet(y4);return n.length?n[0](t):i.mac?t.metaKey:t.ctrlKey}function G3(e,t){let n=e.state.facet(w4);return n.length?n[0](t):i.mac?!t.altKey:!t.ctrlKey}function sh(e,t){let{main:o}=e.state.selection;if(o.empty)return!1;let n=En(e.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let n=0;n=t.clientX&&e.top<=t.clientY&&e.bottom>=t.clientY)return!0}return!1}function ih(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,s;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(s=_.get(n))&&s.ignoreEvent(t))return!1;return!0}const ue=Object.create(null),se=Object.create(null),$0=i.ie&&i.ie_version<15||i.ios&&i.webkit_version<604;function bh(e){let n=e.dom.parentNode;if(!n)return;let t=n.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{e.focus(),t.remove(),B0(e,t.value)},50)}function B0(e,n){let{state:s}=e,i,a=1,o=s.toText(n),r=o.lines==s.selection.ranges.length,c=Qo!=null&&s.selection.ranges.every(e=>e.empty)&&Qo==o.toString();if(c){let e=-1;i=s.changeByRange(i=>{let c=s.doc.lineAt(i.from);if(c.from==e)return{range:i};e=c.from;let l=s.toText((r?o.line(a++).text:n)+s.lineBreak);return{changes:{from:c.from,insert:l},range:t.cursor(i.from+l.length)}})}else r?i=s.changeByRange(e=>{let n=o.line(a++);return{changes:{from:e.from,to:e.to,insert:n.text},range:t.cursor(e.from+n.length)}}):i=s.replaceSelection(o);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}se.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},ue.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),se.touchstart=(e)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},se.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},ue.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let s of e.state.facet(O4))if(n=s(e,t),n)break;if(!n&&t.button==0&&(n=Ih(e,t)),n){let o=!e.hasFocus;e.inputState.startMouseSelection(new K3(e,t,n,o)),o&&e.observer.ignore(()=>{Kd(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let s=e.inputState.mouseSelection;if(s)return s.start(t),s.dragging===!1}return!1};function R0(e,n,s,o){if(o==1)return t.cursor(n,s);if(o==2)return eh(e.state,n,s);let i=A.find(e.docView,n),r=e.state.doc.lineAt(i?i.posAtEnd:n),c=i?i.posAtStart:r.from,a=i?i.posAtEnd:r.to;return at>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function Fh(e,t,n,s){let o=A.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(i==0)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&N0(n,s,a))return-1;let r=o.coordsAt(i,1);return r&&N0(n,s,r)?1:a&&a.bottom>=s?-1:1}function z0(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Fh(e,n,t.clientX,t.clientY)}}const Nh=i.ie&&i.ie_version<=11;let S0=null,A0=0,C0=0;function O0(e){if(!Nh)return e.detail;let t=S0,n=C0;return S0=e,C0=Date.now(),A0=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(A0+1)%3:1}function Ih(e,n){let o=z0(e,n),i=O0(n),s=e.state.selection;return{update(e){e.docChanged&&(o.pos=e.changes.mapPos(o.pos),s=s.map(e.changes))},get(n,a,r){let l=z0(e,n),d,c=R0(e,l.pos,l.bias,i);if(o.pos!=l.pos&&!a){let s=R0(e,o.pos,o.bias,i),n=Math.min(s.from,c.from),a=Math.max(s.to,c.to);c=n1&&(d=Nm(s,l.pos))?d:r?s.addRange(c):t.create([c])}}}function Nm(e,n){for(let s=0;s=n)return t.create(e.ranges.slice(0,s).concat(e.ranges.slice(s+1)),e.mainIndex==s?0:e.mainIndex-(e.mainIndex>s?1:0))}return null}ue.dragstart=(e,n)=>{let{selection:{main:s}}=e.state;if(n.target.draggable){let o=e.docView.nearest(n.target);if(o&&o.isWidget){let e=o.posAtStart,n=e+o.length;(e>=s.to||n<=s.from)&&(s=t.range(e,n))}}let{inputState:o}=e;return o.mouseSelection&&(o.mouseSelection.dragging=!0),o.draggedContent=s,n.dataTransfer&&(n.dataTransfer.setData("Text",e.state.sliceDoc(s.from,s.to)),n.dataTransfer.effectAllowed="copyMove"),!1},ue.dragend=e=>(e.inputState.draggedContent=null,!1);function o0(e,t,n,s){if(!n)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=s&&i&&G3(e,t)?{from:i.from,to:i.to}:null,c={from:o,insert:n},r=e.state.changes(a?[a,c]:c);e.focus(),e.dispatch({changes:r,selection:{anchor:r.mapPos(o,-1),head:r.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}ue.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let s=Array(n.length),i=0,o=()=>{++i==n.length&&o0(e,t,s.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(s[t]=e.result),o()},e.readAsText(n[t])}return!0}let s=t.dataTransfer.getData("Text");return!!s&&(o0(e,t,s,!0),!0)},ue.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=$0?null:t.clipboardData;return n?(B0(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(bh(e),!1)};function Lm(e,t){let s=e.dom.parentNode;if(!s)return;let n=s.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout(()=>{n.remove(),e.focus()},50)}function Im(e){let t=[],n=[],s=!1;for(let s of e.selection.ranges)s.empty||(t.push(e.sliceDoc(s.from,s.to)),n.push(s));if(!t.length){let o=-1;for(let{from:i}of e.selection.ranges){let s=e.doc.lineAt(i);s.number>o&&(t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),o=s.number}s=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:s}}let Qo=null;ue.copy=ue.cut=(e,t)=>{let{text:n,ranges:i,linewise:o}=Im(e.state);if(!n&&!o)return!1;Qo=o?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=$0?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(Lm(e,n),!1)};const J4=Re.define();function Q4(e,t){let n=[];for(let o of e.facet(l0)){let s=o(e,t);s&&n.push(s)}return n?e.update({effects:n,annotations:J4.of(!0)}):null}function G4(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Q4(e.state,t);n?e.dispatch(n):e.update([])}},10)}se.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),G4(e)},se.blur=e=>{e.observer.clearSelectionRange(),G4(e)},se.compositionstart=se.compositionupdate=e=>{if(e.observer.editContext)return;e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},se.compositionend=e=>{if(e.observer.editContext)return;e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,i.chrome&&i.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},se.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},ue.beforeinput=(e,t)=>{var s,o;if(t.inputType=="insertReplacementText"&&e.observer.editContext){let n=(s=t.dataTransfer)===null||s===void 0?void 0:s.getData("text/plain"),o=t.getTargetRanges();if(n&&o.length){let t=o[0],s=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return yi(e,{from:s,to:i,insert:e.state.toText(n)},null),!0}}let n;if(i.chrome&&i.android&&(n=u2.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let t=((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0;setTimeout(()=>{var n;(((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return i.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),i.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>se.compositionend(e,t),20),!1};const K4=new Set;function Km(e){K4.has(e)||(K4.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}const C4=["pre-wrap","normal","pre-line","break-spaces"];let Dt=!1;function p4(){Dt=!1}class L8{constructor(e){this.lineWrapping=e,this.doc=f.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;let t=1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5)));return t*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return C4.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,r=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=o,r){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|this.flags&~2}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>jo&&(Dt=!0),this.height=e)}replace(e,t,n){return U.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let o=this,i=n.doc;for(let a=s.length-1;a>=0;a--){let{fromA:r,toA:l,fromB:d,toB:u}=s[a],c=o.lineAt(r,w.ByPosNoHeight,n.setDoc(t),0,0),h=c.to>=l?c:o.lineAt(l,w.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;a>0&&c.from<=s[a-1].toA;)r=s[a-1].fromA,d=s[a-1].fromB,a--,ro*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,s-=o.size}else if(o>s*2){let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,o-=t.size}else break;else if(s=o&&i(this.blockAt(0,n,s,o))}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ne extends R1{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,s){return new Pe(s,this.length,n,this.height,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof ne||s instanceof P&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof P?s=new ne(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):U.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class P extends U{constructor(e){super(e,0)}heightMetrics(e,t){let o=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,n=i-o+1,s,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*n);s=t/n,this.length>n+1&&(a=(this.height-t)/(this.length-n-1))}else s=this.height/n;return{firstLine:o,lastLine:i,perLine:s,perChar:a}}blockAt(e,t,n,s){let{firstLine:i,lastLine:r,perLine:o,perChar:c}=this.heightMetrics(t,s);if(t.lineWrapping){let r=s+(e0){let e=n[n.length-1];e instanceof P?n[n.length-1]=new P(e.length+s):n.push(null,new P(s-1))}if(e>0){let t=n[0];t instanceof P?n[0]=new P(e+t.length):n.unshift(new P(e-1),null)}return U.of(n)}decomposeLeft(e,t){t.push(new P(e-1),null)}decomposeRight(e,t){t.push(null,new P(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let o=t+this.length;if(s&&s.from<=t+this.length&&s.more){let n=[],i=Math.max(t,s.from),a=-1;for(s.from>t&&n.push(new P(s.from-t-1).updateHeight(e,t));i<=o&&s.more;){let o=e.doc.lineAt(i).length;n.length&&n.push(null);let t=s.heights[s.index++];a==-1?a=t:Math.abs(t-a)>=jo&&(a=-2);let r=new ne(o,t);r.outdated=!1,n.push(r),i+=o+1}i<=o&&n.push(null,new P(o-i).updateHeight(e,i));let r=U.of(n);return(a<0||Math.abs(r.height-this.height)>=jo||Math.abs(a-this.heightMetrics(e,t).perLine)>=jo)&&(Dt=!0),go(this,r)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class i6 extends U{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let o=n+this.left.height;return ei))return a;let l=t==w.ByPosNoHeight?w.ByPosNoHeight:w.ByPos;return c?a.join(this.right.lineAt(i,l,n,r,i)):this.left.lineAt(i,l,n,s,o).join(a)}forEachLine(e,t,n,s,o,i){let r=s+this.left.height,a=o+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,r,a,i);else{let c=this.lineAt(a,w.ByPos,n,s,o);e=e&&c.from<=t&&i(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,r,a,i)}}replace(e,t,n){let o=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-o,t-o,n));let s=[];e>0&&this.decomposeLeft(e,s);let i=s.length;for(let e of n)s.push(e);if(e>0&&k1(s,i-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let s=this.left.length,n=s+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?U.of(this.break?[e,null,t]:[e,t]):(this.left=go(this.left,e),this.right=go(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:o,right:i}=this,a=t+o.length+this.break,r=null;return s&&s.from<=t+o.length&&s.more?r=o=o.updateHeight(e,t,n,s):o.updateHeight(e,t,n),s&&s.from<=a+i.length&&s.more?r=i=i.updateHeight(e,a,n,s):i.updateHeight(e,a,n),r?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function k1(e,t){let n,s;e[t]==null&&(n=e[t-1])instanceof P&&(s=e[t+1])instanceof P&&e.splice(t-1,3,new P(n.length+1+s.length))}const d6=5;class u1{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof ne?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ne(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=d6)&&this.addLineDeco(s,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new ne(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new P(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ne)return e;let t=new ne(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof ne)&&!this.isCovered?this.nodes.push(new ne(0,-1)):(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&c.overflow!="visible"){let c=n.getBoundingClientRect();s=Math.max(s,c.left),a=Math.min(a,c.right),o=Math.max(o,c.top),r=Math.min(t==e.parentNode?i.innerHeight:r,c.bottom)}t=c.position=="absolute"||c.position=="fixed"?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:o-(n.top+t),bottom:Math.max(o,r)-(n.top+t)}}function _6(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class xi{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof e!="function"&&e.class=="cm-lineWrapping");this.heightOracle=new L8(t),this.stateDeco=e.facet(Un).filter(e=>typeof e!="function"),this.heightMap=U.empty().applyChanges(this.stateDeco,f.empty,this.heightOracle.setDoc(e.doc),[new le(0,0,0,e.doc.length)]);for(let e=0;e<2;e++)if(this.viewport=this.getViewport(0,null),!this.updateForViewport())break;this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=c.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>s>=e&&s<=t)){let{from:t,to:n}=this.lineBlockAt(s);e.push(new lo(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ku:new $u(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(An(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Un).filter(e=>typeof e!="function");let a=e.changedRanges,o=le.extendWithRanges(a,v6(i,this.stateDeco,e?e.changes:z.empty(this.state.doc.length))),r=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);p4(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=r||Dt)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let n=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headn.to)||!this.viewportIsAppropriate(n))&&(n=this.getViewport(0,t));let c=n.from!=this.viewport.from||n.to!=this.viewport.to;this.viewport=n,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(h0)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let l=e.contentDOM,c=window.getComputedStyle(l),o=this.heightOracle,b=c.whiteSpace;this.defaultTextDirection=c.direction=="rtl"?j.RTL:j.LTR;let n=this.heightOracle.mustRefreshForWrapping(b),s=l.getBoundingClientRect(),r=n||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let t=0,i=0;if(s.width&&s.height){let{scaleX:e,scaleY:o}=Vd(l,s);(e>.005&&Math.abs(this.scaleX-e)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=e,this.scaleY=o,t|=8,n=r=!0)}let v=(parseInt(c.paddingTop)||0)*this.scaleY,p=(parseInt(c.paddingBottom)||0)*this.scaleY;(this.paddingTop!=v||this.paddingBottom!=p)&&(this.paddingTop=v,this.paddingBottom=p,t|=8|2),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(r=!0),this.editorWidth=e.scrollDOM.clientWidth,t|=8);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=iu(e.scrollDOM);let u=(this.printing?_6:y6)(l,this.paddingTop),d=u.top-this.pixelViewport.top,a=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let h=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(h!=this.inView&&(this.inView=h,h&&(r=!0)),!this.inView&&!this.scrollTarget)return 0;let m=s.width;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,t|=8),r){let s=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(s)&&(n=!0),n||o.lineWrapping&&Math.abs(m-this.contentDOMWidth)>o.charWidth){let{lineHeight:i,charWidth:a,textHeight:r}=e.docView.measureTextSize();n=i>0&&o.refresh(b,i,a,r,m/a,s),n&&(e.docView.minWidth=0,t|=8)}d>0&&a>0?i=Math.max(d,a):d<0&&a<0&&(i=Math.min(d,a)),p4();for(let t of this.viewports){let i=t.from==this.viewport.from?s:e.docView.measureVisibleLineHeights(t);this.heightMap=(n?U.empty().applyChanges(this.stateDeco,f.empty,this.heightOracle,[new le(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,n,new V8(t.from,i))}Dt&&(t|=2)}let y=!this.viewportIsAppropriate(this.viewport,i)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(t&2&&(t|=this.updateScaler()),this.viewport=this.getViewport(i,this.scrollTarget),t|=this.updateForViewport()),(t&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,e)),t|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),t}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:r}=this,o=new lo(n.lineAt(a-i*1e3,w.ByHeight,s,0,0).from,n.lineAt(r+(1-i)*1e3,w.ByHeight,s,0,0).to);if(t){let{head:e}=t.range;if(eo.to){let r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=n.lineAt(e,w.ByPos,s,0,0),i;t.y=="center"?i=(a.top+a.bottom)/2-r/2:t.y=="start"||t.y=="nearest"&&e=a+Math.max(10,Math.min(n,250)))&&s>i-2*1e3&&o>1,r=o<<1;if(this.defaultTextDirection!=j.LTR&&!s)return[];let c=[],i=(o,r,l,d)=>{if(r-oo&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-o)e.fromt));if(!m){if(re.from<=r&&e.to>=r)){let e=n.moveToLineBoundary(t.cursor(r),!1,!0).head;e>o&&(r=e)}m=new xi(o,r,this.gapSize(l,o,r,d))}c.push(m)},l=e=>{if(e.lengthe.from&&i(e.from,a,e,t),ce.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];m.spans(t,this.viewport.from,this.viewport.to,{span(t,n){e.push({from:t,to:n})},point(){}},20);let n=e.length!=this.visibleRanges.length||this.visibleRanges.some((t,n)=>t.from!=e[n].from||t.to!=e[n].to);return this.visibleRanges=e,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||An(this.heightMap.lineAt(e,w.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||An(this.heightMap.lineAt(this.scaler.fromDOM(e),w.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return An(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class lo{constructor(e,t){this.from=e,this.to=t}}function z6(e,t,n){let o=[],s=e,i=0;return m.spans(n,e,t,{span(){},point(e,t){e>s&&(o.push({from:s,to:e}),i+=e-s),s=t}},20),s=1)return t[t.length-1].to;let s=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(s<=o)return n+s;s-=o}}function ro(e,t){let n=0;for(let{from:s,to:o}of e.ranges){if(t<=o){n+=t-s;break}n+=o-s}return n/e.total}function L6(e,t){for(let n of e)if(t(n))return n}const Ku={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};class $u{constructor(e,t,n){let s=0,o=0,i=0;this.viewports=n.map(({from:n,to:o})=>{let i=t.lineAt(n,w.ByPos,e,0,0).top,a=t.lineAt(o,w.ByPos,e,0,0).bottom;return s+=a-i,{from:n,to:o,top:i,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let n=0,s=0,o=0;;n++){let t=nt.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function An(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),s=t.toDOM(e.bottom);return new Pe(e.from,e.length,n,s-n,Array.isArray(e._content)?e._content.map(e=>An(e,t)):e._content)}const ss=a.define({combine:e=>e.join(" ")}),Li=a.define({combine:e=>e.indexOf(!0)>-1}),Ri=Ze.newName(),Bu=Ze.newName(),Nu=Ze.newName(),Mu={"&light":"."+Bu,"&dark":"."+Nu};function Bi(e,t,n){return new Ze(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t=="&")return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t}})}const G6=Bi("."+Ri,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Mu),J6={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Wi=i.ie&&i.ie_version<=11;class np{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Mp,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(i.ie&&i.ie_version<=11||i.ios&&e.composing)&&t.some(e=>e.type=="childList"&&e.removedNodes.length||e.type=="characterData"&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(i.chrome&&i.chrome_version<126)&&(this.editContext=new cp(e),e.state.facet(it)&&(e.contentDOM.editContext=this.editContext.editContext)),Wi&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var e;((e=this.view.docView)===null||e===void 0?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){if((e.type=="change"||!e.type)&&!e.matches)return;this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let o=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,t=this.selectionRange;if(n.state.facet(it)?n.root.activeElement!=this.dom:!po(n.dom,t))return;let s=t.anchorNode&&n.docView.nearest(t.anchorNode);if(s&&s.ignoreEvent(e)){o||(this.selectionChanged=!1);return}(i.ie&&i.ie_version<=11||i.android&&i.chrome)&&!n.state.selection.main.empty&&t.focusNode&&In(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=En(e.root);if(!n)return!1;let t=i.safari&&e.root.nodeType==11&&Qp(this.dom.ownerDocument)==this.dom&&rp(this.view,n)||n;if(!t||this.selectionRange.eq(t))return!1;let s=po(this.dom,t);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now();let t=this.flush();!t&&e.force&&At(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let n=this.pendingRecords();n.length&&(this.queue=[]);let e=-1,t=-1,s=!1;for(let i of n){let o=this.readMutation(i);if(!o)continue;o.typeOver&&(s=!0),e==-1?{from:e,to:t}=o:(e=Math.min(o.from,e),t=Math.max(o.to,t))}return{from:e,to:t,typeOver:s}}readChange(){let{from:e,to:n,typeOver:s}=this.processRecords(),o=this.selectionChanged&&po(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let t=new V2(this.view,e,n,s);return this.view.docView.domChanged={newSel:t.newSel?t.newSel.main:null},t}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=N2(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=fu(t,e.previousSibling||e.target.previousSibling,-1),s=fu(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(it)!=e.state.facet(it)&&(e.view.contentDOM.editContext=e.state.facet(it)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0?void 0:e.disconnect(),(t=this.gapIntersection)===null||t===void 0?void 0:t.disconnect(),(n=this.resizeScroll)===null||n===void 0?void 0:n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function fu(e,t,n){for(;t;){let s=_.get(t);if(s&&s.parent==e)return s;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function mu(e,t){let o=t.startContainer,i=t.startOffset,n=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return In(a.node,a.offset,n,s)&&([o,i,n,s]=[n,s,o,i]),{anchorNode:o,anchorOffset:i,focusNode:n,focusOffset:s}}function rp(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return mu(e,n)}let n=null;function s(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",s,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",s,!0),n?mu(e,n):null}class cp{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let{anchor:o}=e.state.selection.main,s={from:this.toEditorPos(n.updateRangeStart),to:this.toEditorPos(n.updateRangeEnd),insert:f.of(n.text.split(` +`))};if(s.from==this.from&&othis.to&&(s.to=o),s.from==s.to&&!s.insert.length)return;this.pendingContextChange=s,e.state.readOnly||yi(e,s,t.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=t=>{let o=[],s=null;for(let i=this.toEditorPos(t.rangeStart),a=this.toEditorPos(t.rangeEnd);i{let n=[];for(let e of t.getTextFormats()){let s=e.underlineStyle,o=e.underlineThickness;if(s!="None"&&o!="None"){let t=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${o=="Thin"?1:2}px`;n.push(c.mark({attributes:{style:t}}).range(this.toEditorPos(e.rangeStart),this.toEditorPos(e.rangeEnd)))}}e.dispatch({effects:v0.of(c.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let e in this.handlers)n.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=En(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,s=!1,t=this.pendingContextChange;return e.changes.iterChanges((o,i,a,r,c)=>{if(s)return;let l=c.length-(i-o);if(t&&i>=t.to){if(t.from==o&&t.to==i&&t.insert.eq(c)){t=this.pendingContextChange=null,n+=l,this.to+=l;return}t=null,this.revertPending(e.state)}if(o+=n,i+=n,i<=this.from)this.from+=l,this.to+=l;else if(othis.to||this.to-this.from+c.length>3e4){s=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),c.toString()),this.to+=l}n+=l}),t&&!s&&this.revertPending(e.state),!s}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class o{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Op(e.parent)||document,this.viewState=new t1(e.state||h.create(e)),e.scrollTo&&e.scrollTo.is(hs)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(qn).map(e=>new yr(e));for(let e of this.plugins)e.update(this);this.observer=new np(this),this.inputState=new k3(this),this.inputState.ensureHandlers(this.plugins),this.docView=new P0(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),((t=document.fonts)===null||t===void 0?void 0:t.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof S?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let r=!1,u=!1,n,s=this.state;for(let t of e){if(t.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=t.state}if(this.destroyed){this.viewState.state=s;return}let c=this.hasFocus,d=0,i=null;e.some(e=>e.annotation(J4))?(this.inputState.notifiedFocused=c,d=1):c!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=c,i=Q4(s,c),i||(d=1));let l=this.observer.delayedAndroidKey,a=null;if(l?(this.observer.clearDelayedAndroidKey(),a=this.observer.readChange(),(a&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(a=null)):this.observer.clear(),s.facet(h.phrases)!=this.state.facet(h.phrases))return this.setState(s);n=Fa.create(this,s,e),n.flags|=d;let o=this.viewState.scrollTarget;try{this.updateState=2;for(let n of e){if(o&&(o=o.map(n.changes)),n.scrollIntoView){let{main:e}=n.state.selection;o=new Jn(e.empty?e:t.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of n.effects)e.is(hs)&&(o=e.value.clip(this.state))}this.viewState.update(n,o),this.bidiCache=Ji.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),r=this.docView.update(n),this.state.facet(Hn)!=this.styleModules&&this.mountStyles(),u=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(ss)!=n.state.facet(ss)&&(this.viewState.mustMeasureContent=!0),(r||u||o||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),r&&this.docViewUpdate(),!n.empty)for(let e of this.state.facet(Ci))try{e(n)}catch(e){K(this.state,e,"update listener")}(i||a)&&Promise.resolve().then(()=>{i&&this.state==i.startState&&this.dispatch(i),a&&!N2(this,a)&&l.force&&At(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new t1(e),this.plugins=e.facet(qn).map(e=>new yr(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new P0(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(qn),n=e.state.facet(qn);if(t!=n){let s=[];for(let o of n){let i=t.indexOf(o);if(i<0)s.push(new yr(o));else{let t=this.plugins[i];t.mustUpdate=e,s.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:t}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(t=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(t<0)if(iu(i))o=-1,t=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(s);o=e.from,t=e.top}this.updateState=1;let r=this.viewState.measure(this);if(!r&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];r&4||([this.measureRequests,a]=[a,this.measureRequests]);let d=a.map(e=>{try{return e.read(this)}catch(e){return K(this.state,e),Yd}}),e=Fa.create(this,this.state,[]),c=!1;e.flags|=r,n?n.flags|=r:n=e,this.updateState=2,e.empty||(this.updatePlugins(e),this.inputState.update(e),this.updateAttrs(),c=this.docView.update(e),c&&this.docViewUpdate());for(let e=0;e1||e<-1){s=s+e,i.scrollTop=s/this.scaleY,t=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let e of this.state.facet(Ci))e(n)}get themeClasses(){return Ri+" "+(this.state.facet(Li)?Nu:Bu)+" "+this.state.facet(ss)}updateAttrs(){let t=qd(this,b0,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(it)?"true":"false",class:"cm-content",style:`${i.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),qd(this,ar,e);let n=this.observer.ignore(()=>{let n=Pi(this.contentDOM,this.contentAttrs,e),s=Pi(this.dom,this.editorAttrs,t);return n||s});return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(o.announce)){t&&(this.announceDOM.textContent=""),t=!1;let n=this.announceDOM.appendChild(document.createElement("div"));n.textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(Hn);let e=this.state.facet(o.cspNonce);Ze.mount(this.root,this.styleModules.concat(G6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null)for(let t=0;tt.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Fi(this,e,x2(this,e,t,n))}moveByGroup(e,t){return Fi(this,e,x2(this,e,t,t=>X2(this,e.head,t)))}visualLineSide(e,n){let s=this.bidiSpans(e),o=this.textDirectionAt(e.from),i=s[n?s.length-1:0];return t.cursor(i.side(n,o)+e.from,i.forward(!n,o)?1:-1)}moveToLineBoundary(e,t,n=!0){return m3(this,e,t,n)}moveVertically(e,t,n){return Fi(this,e,Y2(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),y2(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),o=this.bidiSpans(s),i=o[Ge.find(o,e-s.from,-1,t)];return yo(n,i.dir==j.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){let t=this.state.facet(d0);return!t||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Ep)return s4(e.length);let n=this.textDirectionAt(e.from),t;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||F1(s.isolates,t=M0(this,e))))return s.order;t||(t=M0(this,e));let s=ff(e.text,n,t);return this.bidiCache.push(new Ji(e.from,e.to,n,t,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||i.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Kd(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return hs.of(new Jn(typeof e=="number"?t.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:s}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return hs.of(new Jn(t.cursor(n.from),"start","start",n.top-e,s,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return k.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return k.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Ze.newName(),s=[ss.of(n),Hn.of(Bi(`.${n}`,e))];return t&&t.dark&&s.push(Li.of(!0)),s}static baseTheme(e){return Ue.lowest(Hn.of(Bi("."+Ri,e,Mu)))}static findFromDOM(e){var t;let s=e.querySelector(".cm-content"),n=s&&_.get(s)||_.get(e);return((t=n?.rootView)===null||t===void 0?void 0:t.view)||null}}o.styleModule=Hn,o.inputHandler=s0,o.scrollHandler=qr,o.focusChangeEffect=l0,o.perLineTextDirection=d0,o.exceptionSink=$4,o.updateListener=Ci,o.editable=it,o.mouseSelectionStyle=O4,o.dragMovesSelection=w4,o.clickAddsSelectionRange=y4,o.decorations=Un,o.outerDecorations=_0,o.atomicRanges=Ja,o.bidiIsolatedRanges=w0,o.scrollMargins=F0,o.darkTheme=Li,o.cspNonce=a.define({combine:e=>e.length?e[0]:""}),o.contentAttributes=ar,o.editorAttributes=b0,o.lineWrapping=o.contentAttributes.of({class:"cm-lineWrapping"}),o.announce=d.define();const Ep=4096,Yd={};class Ji{constructor(e,t,n,s,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:j.LTR;for(let i=Math.max(0,e.length-10);i=0;s--){let o=i[s],a=typeof o=="function"?o(e):o;a&&Mi(a,n)}return n}const Sp=i.mac?"mac":i.windows?"win":i.linux?"linux":"key";function eg(e,t){const s=e.split(/-(?!$)/);let n=s[s.length-1];n=="Space"&&(n=" ");let a,o,r,i;for(let n=0;ne.concat(t),[]))),n}function ig(e,t,n){return fd(xd(e.state),t,e,n)}let st=null;const lg=4e3;function ug(e,t=Sp){let n=Object.create(null),s=Object.create(null),o=(e,t)=>{let n=s[e];if(n==null)s[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,s,i,a,r)=>{var l,d;let c=n[e]||(n[e]=Object.create(null)),u=s.split(/ (?!$)/).map(e=>eg(e,t));for(let n=1;n{let s=st={view:n,prefix:t,scope:e};return setTimeout(()=>{st==s&&(st=null)},lg),!0}]})}let h=u.join(" ");o(h,!1);let m=c[h]||(c[h]={preventDefault:!1,stopPropagation:!1,run:((d=(l=c._any)===null||l===void 0?void 0:l.run)===null||d===void 0?void 0:d.slice())||[]});i&&m.run.push(i),a&&(m.preventDefault=!0),r&&(m.stopPropagation=!0)};for(let s of e){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let t of a){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=s;for(let t in e)e[t].run.push(e=>o(e,ha))}let o=s[t]||s.key;if(!o)continue;for(let e of a)i(e,o,s.run,s.preventDefault,s.stopPropagation),s.shift&&i(e,"Shift-"+o,s.shift,s.preventDefault,s.stopPropagation)}return n}let ha=null;function fd(e,t,n,s){ha=t;let a=_g(t),g=D(a,0),u=re(g)==a.length&&a!=" ",c="",o=!1,h=!1,m=!1;st&&st.view==n&&st.scope==s&&(c=st.prefix+" ",r2.indexOf(t.keyCode)<0&&(h=!0,st=null));let p=new Set,l=e=>{if(e){for(let t of e.run)if(!p.has(t)&&(p.add(t),t(n)))return e.stopPropagation&&(m=!0),!0;e.preventDefault&&(e.stopPropagation&&(m=!0),h=!0)}return!1},r=e[s],d,f;return r&&(l(r[c+Gs(a,t,!u)])?o=!0:u&&(t.altKey||t.metaKey||t.ctrlKey)&&!(i.windows&&t.ctrlKey&&t.altKey)&&(d=Ae[t.keyCode])&&d!=a?l(r[c+Gs(d,t,!0)])?o=!0:t.shiftKey&&(f=Rt[t.keyCode])!=a&&f!=d&&l(r[c+Gs(f,t,!1)])&&(o=!0):u&&t.shiftKey&&l(r[c+Gs(a,t,!0)])&&(o=!0),!o&&l(r._any)&&(o=!0)),h&&(o=!0),o&&m&&t.stopPropagation(),ha=null,o}class Ws{constructor(e,t,n,s,o){this.className=e,this.left=t,this.top=n,this.width=s,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let o=Kr(e);return[new Ws(t,s.left-o.left,s.top-o.top,null,s.bottom-s.top)]}return Dg(e,t,n)}}function Kr(e){let t=e.scrollDOM.getBoundingClientRect(),n=e.textDirection==j.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX;return{left:n-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function ud(e,t,n,s){let o=e.coordsAtPos(t,n*2);if(!o)return s;let r=e.dom.getBoundingClientRect(),c=(o.top+o.bottom)/2,i=e.posAtCoords({x:r.left+1,y:c}),a=e.posAtCoords({x:r.right-1,y:c});return i==null||a==null?s:{from:Math.max(s.from,Math.min(i,a)),to:Math.min(s.to,Math.max(i,a))}}function Dg(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let y=Math.max(n.from,e.viewport.from),O=Math.min(n.to,e.viewport.to),d=e.textDirection==j.LTR,w=e.contentDOM,f=w.getBoundingClientRect(),v=Kr(e),g=w.querySelector(".cm-line"),l=g&&window.getComputedStyle(g),m=f.left+(l?parseInt(l.paddingLeft)+Math.min(0,parseInt(l.textIndent)):0),h=f.right-(l?parseInt(l.paddingRight):0),r=Ii(e,y),c=Ii(e,O),s=r.type==H.Text?r:null,o=c.type==H.Text?c:null;if(s&&(e.lineWrapping||r.widgetLineBreaks)&&(s=ud(e,y,1,s)),o&&(e.lineWrapping||c.widgetLineBreaks)&&(o=ud(e,O,-1,o)),s&&o&&s.from==o.from&&s.to==o.to)return u(p(n.from,n.to,s));let a=s?p(n.from,null,s):_(r,!1),i=o?p(null,n.to,o):_(c,!0),x=[];return(s||r).to<(o||c).from-(s&&o?1:0)||r.widgetLineBreaks>1&&a.bottom+e.defaultLineHeight/2i&&s.from=c)break;u>o&&l(Math.max(d,o),t==null&&d<=i,Math.min(u,c),n==null&&u>=a,s.dir)}if(o=r.to+1,o>=c)break}return o.length==0&&l(i,t==null,a,n==null,e.textDirection),{top:r,bottom:c,horizontal:o}}function _(e,t){let n=f.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function Lg(e,t){return e.constructor==t.constructor&&e.eq(t)}class Pg{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Ps)!=e.state.facet(Ps)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(Ps);for(;t!Lg(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ps=a.define();function Jl(e){return[k.define(t=>new Pg(t,e)),Ps.of(e)]}const Zl=!i.ios,gn=a.define({combine(e){return ye(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Vg(e={}){return[gn.of(e),Yg,Qg,n5,h0.of(!0)]}function Gl(e){return e.startState.facet(gn)!=e.state.facet(gn)}const Yg=Jl({above:!0,markers(e){let{state:n}=e,o=n.facet(gn),s=[];for(let i of n.selection.ranges){let a=i==n.selection.main;if(i.empty?!a||Zl:o.drawRangeCursor){let n=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:t.cursor(i.head,i.head>i.anchor?-1:1);for(let t of Ws.forRange(e,n,o))s.push(t)}}return s},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=Gl(e);return n&&ql(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){ql(t.state,e)},class:"cm-cursorLayer"});function ql(e,t){t.style.animationDuration=e.facet(gn).cursorBlinkRate+"ms"}const Qg=Jl({above:!1,markers(e){return e.state.selection.ranges.map(t=>t.empty?[]:Ws.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t))},update(e){return e.docChanged||e.selectionSet||e.viewportChanged||Gl(e)},class:"cm-selectionLayer"}),Sa={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Zl&&(Sa[".cm-line"].caretColor=Sa[".cm-content"].caretColor="transparent !important");const n5=Ue.highest(o.theme(Sa)),Bl=d.define({map(e,t){return e==null?null:t.mapPos(e)}}),$n=N.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(Bl)?t.value:e,e)}}),s5=k.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field($n);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0?void 0:t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field($n)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,n=e.state.field($n),t=n!=null&&e.coordsAtPos(n);if(!t)return null;let s=e.scrollDOM.getBoundingClientRect();return{left:t.left-s.left+e.scrollDOM.scrollLeft*e.scaleX,top:t.top-s.top+e.scrollDOM.scrollTop*e.scaleY,height:t.bottom-t.top}}drawCursor(e){if(this.cursor){let{scaleX:n,scaleY:t}=this.view;e?(this.cursor.style.left=e.left/n+"px",this.cursor.style.top=e.top/t+"px",this.cursor.style.height=e.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field($n)!=e&&this.view.dispatch({effects:Bl.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function W5(){return[$n,s5]}function Rl(e,t,n,s,o){t.lastIndex=0;for(let i=e.iterRange(n,s),r=n,a;!i.next().done;r+=i.value.length)if(!i.lineBreak)for(;a=t.exec(i.value);)o(r+a.index,a)}function U5(e,t){let s=e.visibleRanges;if(s.length==1&&s[0].from==e.viewport.from&&s[0].to==e.viewport.to)return s;let n=[];for(let{from:o,to:i}of s)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),n.length&&n[n.length-1].to>=o?n[n.length-1].to=i:n.push({from:o,to:i});return n}class K5{constructor(e){const{regexp:n,decoration:t,decorate:s,boundary:o,maxLength:i=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,s)this.addMatch=(e,t,n,o)=>s(o,n,n+e[0].length,e,t);else if(typeof t=="function")this.addMatch=(e,n,s,o)=>{let i=t(e,n,s);i&&o(s,s+e[0].length,i)};else if(t)this.addMatch=(e,n,s,o)=>o(s,s+e[0].length,t);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=i}createDeco(e){let t=new ut,n=t.add.bind(t);for(let{from:t,to:s}of U5(e,this.maxLength))Rl(e.state.doc,this.regexp,t,s,(t,s)=>this.addMatch(s,e,t,n));return t.finish()}updateDeco(e,t){let s=1e9,n=-1;return e.docChanged&&e.changes.iterChanges((t,o,i,a)=>{a>e.view.viewport.from&&i1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),s,n):t}updateRange(e,t,n,s){for(let a of e.visibleRanges){let i=Math.max(a.from,n),o=Math.min(a.to,s);if(o>i){let n=e.state.doc.lineAt(i),s=n.ton.from;i--)if(this.boundary.test(n.text[i-1-n.from])){r=i;break}for(;od.push(n.range(e,t));if(n==s)for(this.regexp.lastIndex=r-n.from;(l=this.regexp.exec(n.text))&&l.indexthis.addMatch(n,e,t,u));t=t.update({filterFrom:r,filterTo:c,filter:(e,t)=>ec,add:d})}}return t}}const Pa=/x/.unicode!=null?"gu":"g",q5=new RegExp(`[\x00- +--Ÿ­؜​‎‏

‭‮⁦⁧⁩-]`,Pa),Y5={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ba=null;function Z5(){var e;if(Ba==null&&typeof document!="undefined"&&document.body){let t=document.body.style;Ba=((e=t.tabSize)!==null&&e!==void 0?e:t.MozTabSize)!=null}return Ba||!1}const Ss=a.define({combine(e){let t=ye(e,{render:null,specialChars:q5,addSpecialChars:null});return(t.replaceTabs=!Z5())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,Pa)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Pa)),t}});function Ml(e={}){return[Ss.of(e),J5()]}let Sl=null;function J5(){return Sl||(Sl=k.fromClass(class{constructor(e){this.view=e,this.decorations=c.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Ss)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new K5({regexp:e.specialChars,decoration:(t,n,s)=>{let{doc:i}=n.state,o=D(t[0],0);if(o==9){let t=i.lineAt(s),e=n.state.tabSize,o=he(t.text,e,s-t.from);return c.replace({widget:new b7((e-o%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=c.replace({widget:new m7(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Ss);e.startState.facet(Ss)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))}const e7="•";function c7(e){return e>=32?e7:e==10?"␤":String.fromCharCode(9216+e)}class m7 extends We{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let s=c7(this.code),n=e.state.phrase("Control character")+" "+(Y5[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,s);if(o)return o;let t=document.createElement("span");return t.textContent=s,t.title=n,t.setAttribute("aria-label",n),t.className="cm-specialChar",t}ignoreEvent(){return!1}}class b7 extends We{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function _7(){return M7}const S7=c.line({class:"cm-activeLine"}),M7=k.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let o of e.state.selection.ranges){let s=e.lineBlockAt(o.head);s.from>t&&(n.push(S7.range(s.from)),t=s.from)}return c.set(n)}},{decorations:e=>e.decorations}),er=2e3;function F7(e,n,s){let i=Math.min(n.line,s.line),a=Math.max(n.line,s.line),o=[];if(n.off>er||s.off>er||n.col<0||s.col<0){let c=Math.min(n.off,s.off),r=Math.max(n.off,s.off);for(let n=i;n<=a;n++){let s=e.doc.line(n);s.length<=r&&o.push(t.range(s.from+c,s.to+r))}}else{let r=Math.min(n.col,s.col),c=Math.max(n.col,s.col);for(let s=i;s<=a;s++){let n=e.doc.line(s),l=Di(n.text,r,e.tabSize,!0);if(l<0)o.push(t.cursor(n.to));else{let s=Di(n.text,c,e.tabSize);o.push(t.range(n.from+l,n.from+s))}}}return o}function z7(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function gl(e,t){let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(s),o=s-n.from,i=o>er?-1:o==n.length?z7(e,t.clientX):he(n.text,e.state.tabSize,s-n.from);return{line:n.number,col:i,off:o}}function D7(e,n){let s=gl(e,n),o=e.state.selection;return s?{update(e){if(e.docChanged){let n=e.changes.mapPos(e.startState.doc.line(s.line).from),t=e.state.doc.lineAt(n);s={line:t.number,col:s.col,off:Math.min(s.off,t.length)},o=o.map(e.changes)}},get(n,i,a){let c=gl(e,n);if(!c)return o;let r=F7(e.state,s,c);return r.length?a?t.create(r.concat(o.ranges)):t.create(r):o}}:null}function Y7(){let t=e=>e.altKey&&e.button==0;return o.mouseSelectionStyle.of((e,n)=>t(n)?D7(e,n):null)}const X7={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},fv={style:"cursor: crosshair"};function gv(e={}){let[n,t]=X7[e.key||"Alt"],s=k.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==n||t(e))},keyup(e){(e.keyCode==n||!t(e))&&this.set(!1)},mousemove(e){this.set(t(e))}}});return[s,o.contentAttributes.of(e=>{var t;return((t=e.plugin(s))===null||t===void 0?void 0:t.isDown)?fv:null})]}const pn="-10000px";class Uc{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let o=null;this.tooltipViews=this.tooltips.map(e=>o=n(e,o))}update(e,t){var o;let i=e.state.facet(this.facet),a=i.filter(e=>e);if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],n=t?[]:null;for(let o=0;ot[n]=e),t.length=n.length),this.input=i,this.tooltips=a,this.tooltipViews=s,!0}}function Fv(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const hr=a.define({combine:e=>{var t,n,s;return{position:i.ios?"absolute":((t=e.find(e=>e.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(e=>e.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((s=e.find(e=>e.tooltipSpace))===null||s===void 0?void 0:s.tooltipSpace)||Fv}}}),Pc=new WeakMap,fr=k.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(hr);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Uc(e,vr,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let s=this.manager.update(e,this.above);s&&this.observeIntersection();let n=s||e.geometryChanged,t=e.state.facet(hr);if(t.position!=this.position&&!this.madeAbsolute){this.position=t.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(t.parent!=this.parent){this.parent&&this.container.remove(),this.parent=t.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),s=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=pn,n.dom.style.left="0px",this.container.insertBefore(n.dom,s),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)===null||e===void 0?void 0:e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect(),(n=this.intersectionObserver)===null||n===void 0?void 0:n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let s=this.view.dom.getBoundingClientRect(),t=1,n=1,e=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(i.gecko)e=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==pn&&t.style.left=="0px"){let n=t.getBoundingClientRect();e=Math.abs(n.top+1e4)>1||Math.abs(n.left)>1}}if(e||this.position=="absolute")if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,n=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:n}=this.view.viewState);return{editor:s,parent:this.parent?this.container.getBoundingClientRect():s,pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(hr).tooltipSpace(this.view),scaleX:t,scaleY:n,makeAbsolute:e}}writeMeasure(e){var s;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:n,space:t,scaleX:o,scaleY:i}=e,a=[];for(let h=0;h=Math.min(n.bottom,t.bottom)||r.rightMath.min(n.right,t.right)+.1){c.style.top=pn;continue}let b=O.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,v=b?7:0,y=d.right-d.left,f=(s=Pc.get(l))!==null&&s!==void 0?s:d.bottom-d.top,m=l.offset||zv,_=this.view.textDirection==j.LTR,g=d.width>t.right-t.left?_?t.left:t.right-d.width:_?Math.max(t.left,Math.min(r.left-(b?14:0)+m.x,t.right-y)):Math.min(Math.max(t.left,r.left-y+(b?14:0)-m.x),t.right-y),u=this.above[h];!O.strictSide&&(u?r.top-(d.bottom-d.top)-m.yt.bottom)&&u==t.bottom-r.bottom>r.top-t.top&&(u=this.above[h]=!u);let w=(u?r.top-t.top:t.bottom-r.bottom)-v;if(wg&&e.topp&&(p=u?e.top-f-2-v:e.bottom+v+2);if(this.position=="absolute"?(c.style.top=(p-e.parent.top)/i+"px",c.style.left=(g-e.parent.left)/o+"px"):(c.style.top=p/i+"px",c.style.left=g/o+"px"),b){let e=r.left+(_?m.x:-m.x)-(g+14-7);b.style.left=e/o+"px"}l.overlap!==!0&&a.push({left:g,top:p,right:x,bottom:p+f}),c.classList.toggle("cm-tooltip-above",u),c.classList.toggle("cm-tooltip-below",!u),l.positioned&&l.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=pn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Tv=o.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),zv={x:0,y:0},vr=a.define({enables:[fr,Tv]}),ys=a.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class jr{static create(e){return new jr(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Uc(e,ys,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0?void 0:e.call(t)}passProp(e){let t=void 0;for(let s of this.manager.tooltipViews){let n=s[e];if(n!==void 0)if(t===void 0)t=n;else if(t!==n)return void 0}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Lv=vr.compute([ys],e=>{let t=e.facet(ys);return t.length===0?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return(t=e.end)!==null&&t!==void 0?t:e.pos})),create:jr.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class Pv{constructor(e,t,n,s,o){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;et.bottom||s.xt.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(n)).find(e=>e.from<=n&&e.to>=n),a=o&&o.dir==j.RTL?-1:1;i=s.x{this.pending==s&&(this.pending=null,t&&!(Array.isArray(t)&&!t.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(t)?t:[t])}))},t=>K(e.state,t,"hover tooltip"))}else t&&!(Array.isArray(t)&&!t.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(t)?t:[t])})}get tooltip(){let e=this.view.plugin(fr),t=e?e.manager.tooltips.findIndex(e=>e.create==jr.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:o}=this;if(s.length&&o&&!Kv(o.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,i=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==i?this.view.posAtCoords(this.lastMove)!=o:!a9(this.view,o,i,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this,n=t&&t.dom.contains(e.relatedTarget);n?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const bs=4;function Kv(e,t){let n=e.getBoundingClientRect();return t.clientX>=n.left-bs&&t.clientX<=n.right+bs&&t.clientY>=n.top-bs&&t.clientY<=n.bottom+bs}function a9(e,t,n,s,o){let a=e.scrollDOM.getBoundingClientRect(),c=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>s||a.righto||Math.min(a.bottom,c)=t&&r<=n}function u9(e,t={}){let s=d.define(),n=N.define({create(){return[]},update(e,n){if(e.length&&(t.hideOnChange&&(n.docChanged||n.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(n,e))),n.docChanged)){let t=[];for(let s of e){let o=n.changes.mapPos(s.pos,-1,L.TrackDel);if(o!=null){let e=Object.assign(Object.create(null),s);e.pos=o,e.end!=null&&(e.end=n.changes.mapPos(e.end)),t.push(e)}}e=t}for(let t of n.effects)t.is(s)&&(e=t.value),t.is(v9)&&(e=[]);return e},provide:e=>ys.from(e)});return{active:n,extension:[n,k.define(o=>new Pv(o,e,n,s,t.hoverTime||300)),Lv]}}function Oc(e,t){let n=e.plugin(fr);if(!n)return null;let s=n.manager.tooltips.indexOf(t);return s<0?null:n.manager.tooltipViews[s]}const v9=d.define(),jc=a.define({combine(e){let t,n;for(let s of e)t=t||s.topContainer,n=n||s.bottomContainer;return{topContainer:t,bottomContainer:n}}});function zn(e,t){let n=e.plugin(vc),s=n?n.specs.indexOf(t):-1;return s>-1?n.panels[s]:null}const vc=k.fromClass(class{constructor(e){this.input=e.state.facet(Rn),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(jc);this.top=new ps(e,!0,t.topContainer),this.bottom=new ps(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(jc);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ps(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ps(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(Rn);if(n!=this.input){let t=n.filter(e=>e),s=[],o=[],i=[],a=[];for(let r of t){let c=this.specs.indexOf(r),n;c<0?(n=r(e.view),a.push(n)):(n=this.panels[c],n.update&&n.update(e)),s.push(n),(n.top?o:i).push(n)}this.specs=t,this.panels=s,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>o.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class ps{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=gc(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=gc(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!this.container||this.classes==this.view.themeClasses)return;for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}function gc(e){let t=e.nextSibling;return e.remove(),t}const Rn=a.define({enables:vc});class Ne extends bt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(){return!1}destroy(){}}Ne.prototype.elementClass="",Ne.prototype.toDOM=void 0,Ne.prototype.mapMode=L.TrackBefore,Ne.prototype.startSide=Ne.prototype.endSide=-1,Ne.prototype.point=!0;const us=a.define(),b9=a.define(),x9={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>m.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Wn=a.define();function C9(e){return[lc(),Wn.of(Object.assign(Object.assign({},x9),e))]}const dc=a.define({combine:e=>e.some(e=>e)});function lc(){let t=[S9];return t}const S9=k.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(Wn).map(t=>new Qr(e,t));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(dc),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let n=this.prevViewport,t=e.view.viewport,s=Math.min(n.to,t.to)-Math.max(n.from,t.from);this.syncGutters(s<(t.to-t.from)*.8)}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(dc)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let o=this.dom.nextSibling;e&&this.dom.remove();let s=m.iter(this.view.state.facet(us),this.view.viewport.from),t=[],n=this.gutters.map(e=>new $9(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(t.length&&(t=[]),Array.isArray(e.type)){{let o=!0;for(let i of e.type)if(i.type==H.Text&&o){Wr(s,t,i.from);for(let e of n)e.line(this.view,i,t);o=!1}else if(i.widget)for(let e of n)e.widget(this.view,i)}}else if(e.type==H.Text){Wr(s,t,e.from);for(let s of n)s.line(this.view,e,t)}else if(e.widget)for(let t of n)t.widget(this.view,e);for(let e of n)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,o)}updateGutters(e){let n=e.startState.facet(Wn),s=e.state.facet(Wn),t=e.docChanged||e.heightChanged||e.viewportChanged||!m.eq(e.startState.facet(us),e.state.facet(us),e.view.viewport.from,e.view.viewport.to);if(n==s)for(let n of this.gutters)n.update(e)&&(t=!0);else{t=!0;let o=[];for(let i of s){let t=n.indexOf(i);t<0?o.push(new Qr(this.view,i)):(this.gutters[t].update(e),o.push(this.gutters[t]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)this.dom.appendChild(e.dom);this.gutters=o}return t}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>o.scrollMargins.of(t=>{let n=t.plugin(e);return!n||n.gutters.length==0||!n.fixed?null:t.textDirection==j.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}})});function Jr(e){return Array.isArray(e)?e:[e]}function Wr(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class $9{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=m.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==s.elements.length){let t=new g0(e,i,o,n);s.elements.push(t),s.dom.appendChild(t.dom)}else s.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];Wr(this.cursor,s,t.from),n.length&&(s=s.concat(n));let o=this.gutter.config.lineMarker(e,t,s);o&&s.unshift(o);let i=this.gutter;if(s.length==0&&!i.config.renderEmptyElements)return;this.addElement(e,t,s)}widget(e,t){let s=this.gutter.config.widgetMarker(e,t.widget,t),n=s?[s]:null;for(let o of e.state.facet(b9)){let s=o(e,t.widget,t);s&&(n||(n=[])).push(s)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Qr{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let o=s.target,i;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=s.clientY;let a=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,a,s)&&s.preventDefault()});this.markers=Jr(t.markers(e)),t.initialSpacer&&(this.spacer=new g0(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Jr(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let t=e.view.viewport;return!m.eq(this.markers,n,t.from,t.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class g0{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),Z9(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let s="cm-gutterElement",n=this.dom.firstChild;for(let c=0,i=0;;){let a=i,o=cs(e,t,n)||o(e,t,n):o}return n}})}});class Ur extends Ne{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function $r(e,t){return e.state.facet(Vt).formatNumber(t,e.state)}const V9=Wn.compute([Vt],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Q9)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Ur($r(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let o of e.state.facet(K9)){let s=o(e,t,n);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Vt)!=e.state.facet(Vt),initialSpacer(e){return new Ur($r(e,nc(e.state.doc.lines)))},updateSpacer(e,t){let n=$r(t.view,nc(t.view.state.doc.lines));return n==e.number?e:new Ur(n)},domEventHandlers:e.facet(Vt).domEventHandlers}));function tc(e={}){return[Vt.of(e),lc(),V9]}function nc(e){let t=9;for(;t{let t=[],n=-1;for(let o of e.selection.ranges){let s=e.doc.lineAt(o.head).from;s>n&&(n=s,t.push(H9.range(s)))}return m.of(t)});function N9(){return L9}const ac=1024;let T9=0;class X{constructor(e,t){this.from=e,this.to=t}}class l{constructor(e={}){this.id=T9++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=F.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}l.closedBy=new l({deserialize:e=>e.split(" ")}),l.openedBy=new l({deserialize:e=>e.split(" ")}),l.group=new l({deserialize:e=>e.split(" ")}),l.isolate=new l({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),l.contextHash=new l({perNode:!0}),l.lookAhead=new l({perNode:!0}),l.mounted=new l({perNode:!0});class Xn{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[l.mounted.id]}}const k9=Object.create(null);class F{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):k9,s=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new F(e.name||"",t,e.id,s);if(e.props)for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(l.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return e=>{for(let s=e.prop(l.group),n=-1;n<(s?s.length:0);n++){let o=t[n<0?e.name:s[n]];if(o)return o}}}}F.none=new F("",Object.create(null),0,8);class ls{constructor(e){this.types=e;for(let t=0;t0;for(let e=this.cursor(n|v.IncludeAnonymous);;){let r=!1;if(e.from<=a&&e.to>=i&&(!s&&e.type.isAnonymous||o(e)!==!1)){if(e.firstChild())continue;r=!0}for(;;){if(r&&t&&(s||!e.type.isAnonymous)&&t(e),e.nextSibling())break;if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:gr(F.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new p(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new p(F.none,e,t,n)))}static build(e){return Rv(e)}}p.empty=new p(F.none,[],[],0);class bc{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new bc(this.buffer,this.index)}}class jt{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return F.none}toString(){let e=[];for(let t=0;t0))break;return a}slice(e,t,n){let o=this.buffer,s=new Uint16Array(t-e),i=0;for(let a=e,r=0;a=t&&nt;case 1:return n<=t&&s>t;case 2:return s>t;case 4:return!0}}function Cn(e,t,n,s){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?c.length:-1;e!=d;e+=t){let a=c[e],r=l[e]+i.from;if(!yc(s,n,r,r+a.length))continue;if(a instanceof jt){{if(o&v.ExcludeBuffers)continue;let c=a.findChild(0,a.buffer.length,t,n-r,s);if(c>-1)return new Se(new c9(i,a,e,r),null,c)}}else if(o&v.IncludeAnonymous||!a.type.isAnonymous||_r(a)){let c;if(!(o&v.IgnoreMounts)&&(c=Xn.get(a))&&!c.overlay)return new W(c.tree,r,e,i);let l=new W(a,r,e,i);return o&v.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?a.children.length-1:0,t,n,s)}}if(o&v.IncludeAnonymous||!i.type.isAnonymous)return null;if(i.index>=0?e=i.index+t:e=t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let s;if(!(n&v.IgnoreOverlays)&&(s=Xn.get(this._tree))&&s.overlay){let n=e-this.from;for(let{from:e,to:o}of s.overlay)if((t>0?e<=n:e=n:o>n))return new W(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function xc(e,t,n,s){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(n!=null)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(s!=null&&o.type.is(s))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return s==null?i:[]}}function Cr(e,t,n=t.length-1){for(let s=e.parent;n>=0;s=s.parent){if(!s)return!1;if(!s.type.isAnonymous){if(t[n]&&t[n]!=s.name)return!1;n--}}return!0}class c9{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class Se extends wc{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new Se(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&v.ExcludeBuffers)return null;let{buffer:s}=this.context,o=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new Se(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Se(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Se(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:e}=this.context,s=this.index+4,o=e.buffer[this.index+3];if(o>s){let i=e.buffer[this.index+1];t.push(e.slice(s,o,i)),n.push(0)}return new p(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ac(e){if(!e.length)return null;let n=0,t=e[0];for(let s=1;st.from||o.to=t){let a=new W(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[s])).push(Cn(a,t,n,!1))}}return o?Ac(o):s}class vs{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof W)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:s,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=s+n.buffer[e+1],this.to=s+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof W?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,o=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&v.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&v.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&v.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:n}=this.buffer,t=this.stack.length-1;if(e<0){{let e=t<0?0:this.stack[t]+4;if(this.index!=e)return this.yieldBuf(n.findChild(e,this.index,-1,0,4))}}else{let e=n.buffer[this.index+3];if(e<(t<0?n.buffer.length:n.buffer[this.stack[t]+3]))return this.yieldBuf(e)}return t<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,t,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let s=n+e,i=e<0?-1:t._tree.children.length;s!=i;s+=e){let o=t._tree.children[s];if(this.mode&v.IncludeAnonymous||o instanceof jt||!o.type.isAnonymous||_r(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let i=t;i;i=i._parent)if(i.index==s){if(s==this.index)return i;e=i,n=o+1;break scan}s=this.stack[--o]}for(let t=n;t=0;o--){if(o<0)return Cr(this.node,e,s);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[s]&&e[s]!=i.name)return!1;s--}}return!0}}function _r(e){return e.children.some(e=>e instanceof jt||!e.type.isAnonymous||_r(e))}function Rv(e){let{buffer:s,nodeSet:n,maxBufferLength:o=ac,reused:_=[],minRepeatType:i=n.types.length}=e,t=Array.isArray(s)?new bc(s,s.length):s,v=n.types,r=0,u=0;function m(e,s,a,l,d,h){let{id:O,start:p,end:x,size:C}=t,k=u;for(;C<0;){if(t.next(),C==-1){let t=_[O];a.push(t),l.push(p-e);return}if(C==-3){r=O;return}if(C==-4){u=O;return}throw new RangeError(`Unrecognized record size: ${C}`)}let A=v[O],E,w,S=p-e;if(x-p<=o&&(w=y(t.pos-s,d))){let s=new Uint16Array(w.size-w.skip),i=t.pos-w.size,o=s.length;for(;t.pos>i;)o=g(w.start,s,o);E=new jt(s,x-w.start,n),S=w.start-e}else{let l=t.pos-C;t.next();let e=[],n=[],s=O>=i?O:-1,a=0,r=x;for(;t.pos>l;)s>=0&&t.id==s&&t.size>=0?(t.end<=r-o&&(f(e,n,p,a,t.end,r,s,k),a=e.length,r=t.end),t.next()):h>2500?j(p,l,e,n):m(p,l,e,n,s,h+1);if(s>=0&&a>0&&a-1&&a>0){let t=b(A);E=gr(A,e,n,0,e.length,0,x-p,t,t)}else E=c(A,e,n,x-p,k-x)}a.push(E),l.push(S)}function j(e,s,i,a){let r=[],l=0,c=-1;for(;t.pos>s;){let{id:s,start:e,end:n,size:i}=t;if(i>4)t.next();else if(c>-1&&e=0;e-=3)t[n++]=r[e],t[n++]=r[e+1]-s,t[n++]=r[e+2]-s,t[n++]=n;i.push(new jt(t,r[2]-s,n)),a.push(s-e)}}function b(e){return(t,n,s)=>{let a=0,i=t.length-1,o,r;if(i>=0&&(o=t[i])instanceof p){if(!i&&o.type==e&&o.length==s)return o;(r=o.prop(l.lookAhead))&&(a=n[i]+o.length+r)}return c(e,t,n,s,a)}}function f(e,t,s,o,i,a,r,l){let d=[],u=[];for(;e.length>o;)d.push(e.pop()),u.push(t.pop()+s-i);e.push(c(n.types[r],d,u,a-i,l-a)),t.push(i-s)}function c(e,t,n,s,o=0,i){if(r){let e=[l.contextHash,r];i=i?[e].concat(i):[e]}if(o>25){let e=[l.lookAhead,o];i=i?[e].concat(i):[e]}return new p(e,t,n,s,i)}function y(e,n){let s=t.fork(),r=0,l=0,c=0,d=s.end-o,a={size:0,start:0,skip:0};scan:for(let u=s.pos-e;s.pos>u;){let t=s.size;if(s.id==n&&t>=0){a.size=r,a.start=l,a.skip=c,c+=4,r+=4,s.next();continue}let h=s.pos-t;if(t<0||h=i?4:0,m=s.start;for(s.next();s.pos>h;){if(s.size<0)if(s.size==-3)o+=4;else break scan;else s.id>=i&&(o+=4);s.next()}l=m,r+=t,c+=o}return(n<0||r==e)&&(a.size=r,a.start=l,a.skip=c),a.size>4?a:void 0}function g(e,n,s){let{id:a,start:c,end:l,size:o}=t;if(t.next(),o>=0&&a4){let i=t.pos-(o-4);for(;t.pos>i;)s=g(e,n,s)}n[--s]=i,n[--s]=l-e,n[--s]=c-e,n[--s]=a}else o==-3?r=a:o==-4&&(u=a);return s}let a=[],d=[];for(var h;t.pos>0;)m(e.start||0,e.bufferStart||0,a,d,-1,0);let w=(h=e.length)!==null&&h!==void 0?h:a.length?d[0]+a[0].length:0;return new p(v[e.topID],a.reverse(),d.reverse(),w)}const Dc=new WeakMap;function js(e,t){if(!e.isAnonymous||t instanceof jt||t.type!=e)return 1;let n=Dc.get(t);if(n==null){n=1;for(let s of t.children){if(s.type!=e||!(s instanceof p)){n=1;break}n+=js(e,s)}Dc.set(t,n)}return n}function gr(e,t,n,s,o,i,a,r,c){let d=0;for(let n=s;n=u)break;p+=n}if(r==d+1){if(p>u){let e=t[d];m(e.children,e.positions,0,e.children.length,n[d]+a);continue}l.push(t[d])}else{let s=n[r-1]+t[r-1].length-f;l.push(gr(e,t,n,d,r,f,s,null,c))}h.push(f+a-i)}}return m(t,n,s,o,0),(r||c)(l,h,a)}class pr{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof Se?this.setBuffer(e.context.buffer,e.index,t):e instanceof W&&this.map.set(e.tree,t)}get(e){return e instanceof Se?this.getBuffer(e.context.buffer,e.index):e instanceof W?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class tt{constructor(e,t,n,s,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(o?1:0)|(i?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new tt(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&s.push(n);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let o=[],i=1,s=e.length?e[0]:null;for(let l=0,d=0,r=0;;l++){let a=l=n)for(;s&&s.from=t.from||c<=t.to||r){let e=Math.max(t.from,d)-r,n=Math.min(t.to,c)-r;t=e>=n?null:new tt(e,n,t.tree,t.offset+r,l>0,!!a)}if(t&&o.push(t),s.to>c)break;s=inew X(e.from,e.to)):[new X(0,0)]:[new X(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let e=s.advance();if(e)return e}}}class Mv{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Bc(e){return(t,n,s,o)=>new Ov(t,e,n,s,o)}class Vc{constructor(e,t,n,s,o){this.parser=e,this.parse=t,this.overlay=n,this.target=s,this.from=o}}function $c(e){if(!e.length||e.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class Sv{constructor(e,t,n,s,o,i,a){this.parser=e,this.predicate=t,this.mounts=n,this.index=s,this.start=o,this.target=i,this.prev=a,this.depth=0,this.ranges=[]}}const dr=new l({perNode:!0});class Ov{constructor(e,t,n,s,o){this.nest=t,this.input=n,this.fragments=s,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),this.stoppedAt!=null)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return this.stoppedAt!=null&&(e=new p(e.type,e.children,e.positions,e.length,e.propValues.concat([[dr,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[l.mounted.id]=new Xn(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)a=!1;else if(s.hasNode(e)){if(t){let n=t.mounts.find(t=>t.frag.from<=e.from&&t.frag.to>=e.to&&t.mount.overlay);if(n)for(let i of n.mount.overlay){let s=i.from+n.pos,o=i.to+n.pos;s>=e.from&&o<=e.to&&!t.ranges.some(e=>e.froms)&&t.ranges.push({from:s,to:o})}}a=!1}else if(n&&(r=wv(n.ranges,e.from,e.to)))a=r!=2;else if(!e.type.isAnonymous&&(o=this.nest(e,this.input))&&(e.fromnew X(t.from-e.from,t.to-e.from)):null,e.tree,t.length?t[0].from:e.from)),o.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):a=!1}}else t&&(i=t.predicate(e))&&(i===!0&&(i=new X(e.from,e.to)),i.fromnew X(e.from-t.start,e.to-t.start)),t.target,e[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function wv(e,t,n){for(let s of e){if(s.from>=n)break;if(s.to>t)return s.from<=t&&s.to>=n?2:1}return 0}function Yc(e,t,n,s,o,i){if(t=e&&t.enter(n,1,v.IgnoreOverlays|v.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof p)t=t.children[0];else break}return!1}}let jv=class FragmentCursor{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(dr))!==null&&t!==void 0?t:n.to,this.inner=new Xc(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(dr))!==null&&e!==void 0?e:t.to,this.inner=new Xc(t.tree,-t.offset)}}findMounts(e,t){var n;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let o=(n=e.tree)===null||n===void 0?void 0:n.prop(l.mounted);if(o&&o.parser==t)for(let n=this.fragI;n=e.to)break;t.tree==this.curFrag.tree&&s.push({frag:t,pos:e.from-t.offset,mount:o})}}}return s}};function Zc(e,t){let n=null,s=t;for(let a=1,o=0;a=i)break;if(e.to<=r)continue;n||(s=n=t.slice()),e.fromi&&n.splice(o+1,0,new X(i,e.to))):e.to>i?n[o--]=new X(i,e.to):n.splice(o--,1)}}return s}function bv(e,t,n,s){let r=0,c=0,o=!1,i=!1,a=-1e9,l=[];for(;;){let d=r==e.length?1e9:o?e[r].to:e[r].from,u=c==t.length?1e9:i?t[c].to:t[c].from;if(o!=i){let e=Math.max(a,n),t=Math.min(d,u,s);enew X(e.from+a,e.to+a)),e=bv(t,l,r,c);for(let t=0,a=r;;t++){let d=t==e.length,l=d?c:e[t].from;if(l>a&&n.push(new tt(a,l,o.tree,-i,s.from>=a||s.openStart,s.to<=l||s.openEnd)),d)break;a=e[t].to}}else n.push(new tt(r,c,o.tree,-i,s.from>=i||s.openStart,s.to<=l||s.openEnd))}return n}let vv=0,be=class Tag{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=vv++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let s=typeof e=="string"?e:"?";if(e instanceof Ma&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let n=new Ma(s,[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new rr(e);return e=>e.modified.indexOf(t)>-1?e:rr.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},pv=0;class rr{constructor(e){this.name=e,this.instances=[],this.id=pv++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>n.base==e&&av(t,n.modified));if(n)return n;let s=[],o=new be(e.name,s,e,t);for(let e of t)e.instances.push(o);let i=J7(t);for(let t of e.set)if(!t.modified.length)for(let e of i)s.push(rr.get(t,e));return o}}function av(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function J7(e){let t=[[]];for(let n=0;nt.length-e.length)}function de(e){let t=Object.create(null);for(let s in e){let n=e[s];Array.isArray(n)||(n=[n]);for(let e of s.split(" "))if(e){let s=[],o=2,i=e;for(let t=0;;){if(i=="..."&&t>0&&t+3==e.length){o=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^/!]+/.exec(i);if(!n)throw new RangeError("Invalid path: "+e);if(s.push(n[0]=="*"?"":n[0][0]=='"'?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&a=="!"){o=0;break}if(a!="/")throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=s.length-1,r=s[a];if(!r)throw new RangeError("Invalid path: "+e);let c=new ws(n,o,a>0?s.slice(0,a):null);t[r]=c.sort(t[r])}}return cl.add(t)}const cl=new l;class ws{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let t=o;for(let s of e)for(let o of s.set){let e=n[o.id];if(e){t=t?t+" "+e:e;break}}return t},scope:s}}function U7(e,t){let n=null;for(let o of e){let s=o.style(t);s&&(n=n?n+" "+s:s)}return n}function B7(e,t,n,s=0,o=e.length){let i=new I7(s,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),s,o,"",i.highlighters),i.flush(o)}class I7{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,o){let{type:u,from:i,to:h}=e;if(i>=n||h<=t)return;u.isTop&&(o=this.highlighters.filter(e=>!e.scope||e.scope(u)));let a=s,c=N7(e)||ws.empty,d=U7(o,c.tags);if(d&&(a&&(a+=" "),a+=d,c.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(t,i),a),c.opaque)return;let r=e.tree&&e.tree.prop(l.mounted);if(r&&r.overlay){let l=e.node.enter(r.overlay[0].from+i,1),d=this.highlighters.filter(e=>!e.scope||e.scope(r.tree.type)),c=e.firstChild();for(let p=0,u=i;;p++){let m=p=g||!e.nextSibling())break;if(!m||g>n)break;u=m.to+i,u>t&&(this.highlightRange(l.cursor(),Math.max(t,m.from+i),Math.min(n,u),"",d),this.startSpan(Math.min(n,u),a))}c&&e.parent()}else if(e.firstChild()){r&&(s="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,s,o),this.startSpan(Math.min(n,e.to),a)}while(e.nextSibling())e.parent()}}}function N7(e){let t=e.type.prop(cl);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const s=be.define,Os=s(),Qe=s(),bl=s(Qe),jl=s(Qe),Xe=s(),xs=s(Xe),Za=s(Xe),Ee=s(),lt=s(Ee),_e=s(),Oe=s(),qa=s(),_n=s(qa),As=s(),e={comment:Os,lineComment:s(Os),blockComment:s(Os),docComment:s(Os),name:Qe,variableName:s(Qe),typeName:bl,tagName:s(bl),propertyName:jl,attributeName:s(jl),className:s(Qe),labelName:s(Qe),namespace:s(Qe),macroName:s(Qe),literal:Xe,string:xs,docString:s(xs),character:s(xs),attributeValue:s(xs),number:Za,integer:s(Za),float:s(Za),bool:s(Xe),regexp:s(Xe),escape:s(Xe),color:s(Xe),url:s(Xe),keyword:_e,self:s(_e),null:s(_e),atom:s(_e),unit:s(_e),modifier:s(_e),operatorKeyword:s(_e),controlKeyword:s(_e),definitionKeyword:s(_e),moduleKeyword:s(_e),operator:Oe,derefOperator:s(Oe),arithmeticOperator:s(Oe),logicOperator:s(Oe),bitwiseOperator:s(Oe),compareOperator:s(Oe),updateOperator:s(Oe),definitionOperator:s(Oe),typeOperator:s(Oe),controlOperator:s(Oe),punctuation:qa,separator:s(qa),bracket:_n,angleBracket:s(_n),squareBracket:s(_n),paren:s(_n),brace:s(_n),content:Ee,heading:lt,heading1:s(lt),heading2:s(lt),heading3:s(lt),heading4:s(lt),heading5:s(lt),heading6:s(lt),contentSeparator:s(Ee),list:s(Ee),quote:s(Ee),emphasis:s(Ee),strong:s(Ee),link:s(Ee),monospace:s(Ee),strikethrough:s(Ee),inserted:s(),deleted:s(),changed:s(),invalid:s(),meta:As,documentMeta:s(As),annotation:s(As),processingInstruction:s(As),definition:be.defineModifier("definition"),constant:be.defineModifier("constant"),function:be.defineModifier("function"),standard:be.defineModifier("standard"),local:be.defineModifier("local"),special:be.defineModifier("special")};for(let t in e){let n=e[t];n instanceof be&&(n.name=t)}dl([{tag:e.link,class:"tok-link"},{tag:e.heading,class:"tok-heading"},{tag:e.emphasis,class:"tok-emphasis"},{tag:e.strong,class:"tok-strong"},{tag:e.keyword,class:"tok-keyword"},{tag:e.atom,class:"tok-atom"},{tag:e.bool,class:"tok-bool"},{tag:e.url,class:"tok-url"},{tag:e.labelName,class:"tok-labelName"},{tag:e.inserted,class:"tok-inserted"},{tag:e.deleted,class:"tok-deleted"},{tag:e.literal,class:"tok-literal"},{tag:e.string,class:"tok-string"},{tag:e.number,class:"tok-number"},{tag:[e.regexp,e.escape,e.special(e.string)],class:"tok-string2"},{tag:e.variableName,class:"tok-variableName"},{tag:e.local(e.variableName),class:"tok-variableName tok-local"},{tag:e.definition(e.variableName),class:"tok-variableName tok-definition"},{tag:e.special(e.variableName),class:"tok-variableName2"},{tag:e.definition(e.propertyName),class:"tok-propertyName tok-definition"},{tag:e.typeName,class:"tok-typeName"},{tag:e.namespace,class:"tok-namespace"},{tag:e.className,class:"tok-className"},{tag:e.macroName,class:"tok-macroName"},{tag:e.propertyName,class:"tok-propertyName"},{tag:e.operator,class:"tok-operator"},{tag:e.comment,class:"tok-comment"},{tag:e.meta,class:"tok-meta"},{tag:e.invalid,class:"tok-invalid"},{tag:e.punctuation,class:"tok-punctuation"}]);const yt=new l;function Ha(e){return a.define({combine:e?t=>t.concat(e):void 0})}const Ra=new l;class te{constructor(e,t,n=[],s=""){this.data=e,this.name=s,h.prototype.hasOwnProperty("tree")||Object.defineProperty(h.prototype,"tree",{get(){return g(this)}}),this.parser=t,this.extension=[ot.of(this),h.languageData.of((e,t,n)=>{let s=Ll(e,t,n),o=s.type.prop(yt);if(!o)return[];let i=e.facet(o),a=s.type.prop(Ra);if(a){let o=s.resolve(t-s.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return t.type=="replace"?n:n.concat(i)}}return i})].concat(n)}isActiveAt(e,t,n=-1){return Ll(e,t,n).type.prop(yt)==this.data}findRegions(e){let n=e.facet(ot);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let t=[],s=(e,n)=>{if(e.prop(yt)==this.data){t.push({from:n,to:n+e.length});return}let o=e.prop(l.mounted);if(o){if(o.tree.prop(yt)==this.data){if(o.overlay)for(let e of o.overlay)t.push({from:e.from+n,to:e.to+n});else t.push({from:n,to:n+e.length});return}if(o.overlay){let e=t.length;if(s(o.tree,o.overlay[0].from+n),t.length>e)return}}for(let t=0;te.isTop?t:void 0)]}),e.name)}configure(e,t){return new xe(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function g(e){let t=e.field(te.state,!1);return t?t.tree:p.empty}class k5{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Pn=null;class Fs{constructor(e,t,n=[],s,o,i,a,r){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=r,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new Fs(e,t,[],p.empty,0,n,[],null)}startParse(){return this.parser.startParse(new k5(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=p.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e=="number"){let t=Date.now()+e;e=()=>Date.now()>t}this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(tt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Pn;Pn=this;try{return e()}finally{Pn=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Vl(e,t.from,t.to);return e}changes(e,t){let{fragments:s,tree:i,treeLen:a,viewport:n,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,s,o)=>t.push({fromA:e,toA:n,fromB:s,toB:o})),s=tt.applyChanges(s,t),i=p.empty,a=0,n={from:e.mapPos(n.from,-1),to:e.mapPos(n.to,1)},this.skipped.length){o=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),s=e.mapPos(t.to,-1);ne.from&&(this.fragments=Vl(this.fragments,n,s),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ur{createParse(t,n,s){let o=s[0].from,i=s[s.length-1].to,a={parsedPos:o,advance(){let t=Pn;if(t){for(let e of s)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new p(F.none,[],[],i-o)},stoppedAt:null,stopAt(){}};return a}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Pn}}function Vl(e,t,n){return tt.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class es{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new es(t)}static init(e){let n=Math.min(3e3,e.doc.length),t=Fs.create(e.facet(ot).parser,e,{from:0,to:n});return t.work(20,n)||t.takeTree(),new es(t)}}te.state=N.define({create:es.init,update(e,t){for(let e of t.effects)if(e.is(te.setState))return e.value;return t.startState.facet(ot)!=t.state.facet(ot)?es.init(t.state):e.apply(t)}});let Wl=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback!="undefined"&&(Wl=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:500-100})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Aa=typeof navigator!="undefined"&&((Va=navigator.scheduling)===null||Va===void 0?void 0:Va.isInputPending)?()=>navigator.scheduling.isInputPending():null,Gg=k.fromClass(class ParseWorker{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(te.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(te.state);(e.tree!=e.context.tree||!e.context.isDone(t.doc.length))&&(this.working=Wl(this.work))}work(e){this.working=null;let s=Date.now();if(this.chunkEndn+1e3,a=t.context.work(()=>Aa&&Aa()||Date.now()>r,n+(i?0:1e5));this.chunkBudget-=Date.now()-s,(a||this.chunkBudget<=0)&&(t.context.takeTree(),this.view.dispatch({effects:te.setState.of(new es(t.context))})),this.chunkBudget>0&&!(a&&!i)&&this.scheduleWork(),this.checkAsyncSchedule(t.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>K(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ot=a.define({combine(e){return e.length?e[0]:null},enables:e=>[te.state,Gg,o.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class Le{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ca{constructor(e,t,n,s,o,i=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=s,this.loadFunc=o,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new Ca(e.name,(e.alias||[]).concat(e.name).map(e=>e.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n)for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t;return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let n of e)if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let s=t.indexOf(e);if(s>-1&&(e.length>2||!/\w/.test(t[s-1])&&!/\w/.test(t[s+e.length])))return n}return null}}const Ug=a.define(),bn=a.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Ns(e){let t=e.facet(bn);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Qn(e,t){let n="",o=e.tabSize,s=e.facet(bn)[0];if(s==" "){for(;t>=o;)n+=" ",t-=o;s=" "}for(let e=0;e=t?Tg(e,n,t):null}class Hs{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ns(e)}lineAt(e,t=1){let s=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:o}=this.options;return n!=null&&n>=s.from&&n<=s.to?o&&n==e?{text:"",from:e}:(t<0?n-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return he(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(o);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Te=new l;function Tg(e,t,n){let s=t.resolveStack(n),o=s.node.enterUnfinishedNodesBefore(n);if(o!=s.node){let e=[];for(let t=o;t!=s.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)s={node:e[t],next:s}}return od(s,e,n)}function od(e,t,n){for(let s=e;s;s=s.next){let o=Mg(s.node);if(o)return o(cd.create(t,n,s))}return 0}function Fg(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Mg(e){let t=e.type.prop(Te);if(t)return t;let n=e.firstChild,s;if(n&&(s=n.type.prop(l.closedBy))){let t=e.lastChild,n=t&&s.indexOf(t.name)>-1;return e=>hd(e,!0,1,void 0,n&&!Fg(e)?t.from:void 0)}return e.parent==null?Ag:null}function Ag(){return 0}class cd extends Hs{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new cd(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Cg(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return od(this.context.next,this.base,this.pos)}}function Cg(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function yg(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let s=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=s==null||s<=o.from?o.to:Math.min(o.to,s);for(let s=n.to;;){let e=t.childAfter(s);if(!e||e==i)return null;if(!e.type.isSkipped)return e.fromhd(s,t,n,e)}function hd(e,t,n,s,o){let r=e.textAfter,i=r.match(/^\s*/)[0].length,c=s&&r.slice(i,i+s.length)==s||o==e.pos+i,a=t?yg(e):null;return a?c?e.column(a.from):e.column(a.to):e.baseIndent+(c?0:e.unit*n)}const jg=e=>e.baseIndent;function Qt({except:e,units:t=1}={}){return n=>{let s=e&&e.test(n.textAfter);return n.baseIndent+(s?0:t*n.unit)}}const bg=200;function fg(){return h.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let o=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!o.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,a=i.lineAt(n);if(n>a.from+bg)return e;let c=i.sliceString(a.from,n);if(!o.some(e=>e.test(c)))return e;let{state:t}=e,r=-1,s=[];for(let{head:a}of t.selection.ranges){let e=t.doc.lineAt(a);if(e.from==r)continue;r=e.from;let n=ja(t,e.from);if(n==null)continue;let o=/^\s*/.exec(e.text)[0],i=Qn(t,n);o!=i&&s.push({from:e.from,to:e.from+o.length,insert:i})}return s.length?[e,{changes:s,sequential:!0}]:e})}const vd=a.define(),Ce=new l;function Gn(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(o&&a.from=t&&s.to>n&&(o=s)}}return o}function rg(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Us(e,t,n){for(let o of e.facet(vd)){let s=o(e,t,n);if(s)return s}return cg(e,t,n)}function Od(e,t){let n=t.mapPos(e.from,1),s=t.mapPos(e.to,-1);return n>=s?void 0:{from:n,to:s}}const Ks=d.define({map:Od}),Bn=d.define({map:Od});function Ed(e){let t=[];for(let{head:n}of e.state.selection.ranges){if(t.some(e=>e.from<=n&&e.to>=n))continue;t.push(e.lineBlockAt(n))}return t}const Ot=N.define({create(){return c.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(Ks)&&!Jp(e,n.value.from,n.value.to)){let{preparePlaceholder:s}=t.state.facet(Pd),o=s?c.replace({widget:new Dp(s(t.state,n.value))}):Bd;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(Bn)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let s=!1,{head:n}=t.selection.main;e.between(n,n,(e,t)=>{en&&(s=!0)}),s&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>o.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{(!s||s.from>e)&&(s={from:e,to:t})}),s}function Jp(e,t,n){let s=!1;return e.between(t,t,(e,o)=>{e==t&&o==n&&(s=!0)}),s}function Md(e,t){return e.field(Ot,!1)?t:t.concat(d.appendConfig.of(Hd()))}const Zp=e=>{for(let n of Ed(e)){let t=Us(e.state,n.from,n.to);if(t)return e.dispatch({effects:Md(e.state,[Ks.of(t),zd(e,t)])}),!0}return!1},Wp=e=>{if(!e.state.field(Ot,!1))return!1;let t=[];for(let s of Ed(e)){let n=Xs(e.state,s.from,s.to);n&&t.push(Bn.of(n),zd(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function zd(e,t,n=!0){let s=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return o.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${s} ${e.state.phrase("to")} ${i}.`)}const Bp=e=>{let{state:n}=e,t=[];for(let o=0;o{let t=e.state.field(Ot,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Bn.of({from:e,to:t}))}),e.dispatch({effects:n}),!0},Pp=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Zp},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Wp},{key:"Ctrl-Alt-[",run:Bp},{key:"Ctrl-Alt-]",run:Hp}],Rp={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Pd=a.define({combine(e){return ye(e,Rp)}});function Hd(){let t=[Ot,kp];return t}function Id(e,t){let{state:s}=e,o=s.facet(Pd),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),s=Xs(e.state,n.from,n.to);s&&e.dispatch({effects:Bn.of(s)}),t.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(e,i,t);let n=document.createElement("span");return n.textContent=o.placeholderText,n.setAttribute("aria-label",s.phrase("folded code")),n.title=s.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const Bd=c.replace({widget:new class extends We{toDOM(e){return Id(e,null)}}});class Dp extends We{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Id(e,this.value)}}const zp={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ta extends Ne{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function Ap(e={}){let t=Object.assign(Object.assign({},zp),e),o=new ta(t,!0),i=new ta(t,!1),s=k.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ot)!=e.state.facet(ot)||e.startState.field(Ot,!1)!=e.state.field(Ot,!1)||g(e.startState)!=g(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new ut;for(let n of e.viewportLineBlocks){let s=Xs(e.state,n.from,n.to)?i:Us(e.state,n.from,n.to)?o:null;s&&t.add(n.from,n.from,s)}return t.finish()}}),{domEventHandlers:n}=t;return[s,C9({class:"cm-foldGutter",markers(e){var t;return((t=e.plugin(s))===null||t===void 0?void 0:t.markers)||m.empty},initialSpacer(){return new ta(t,!1)},domEventHandlers:Object.assign(Object.assign({},n),{click:(e,t,s)=>{if(n.click&&n.click(e,t,s))return!0;let o=Xs(e.state,t.from,t.to);if(o)return e.dispatch({effects:Bn.of(o)}),!0;let i=Us(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:Ks.of(i)}),!0)}})}),Hd()]}const kp=o.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Qs{constructor(e,t){this.specs=e;let n;function o(e){let t=Ze.newName();return(n||(n=Object.create(null)))["."+t]=e,t}const i=typeof t.all=="string"?t.all:t.all?o(t.all):void 0,s=t.scope;this.scope=s instanceof te?e=>e.prop(yt)==s.data:s?e=>e==s:void 0,this.style=dl(e.map(e=>({tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Ze(n):null,this.themeType=t.themeType}static define(e,t){return new Qs(e,t||{})}}const Zi=a.define(),Gd=a.define({combine(e){return e.length?[e[0]]:null}});function Qi(e){let t=e.facet(Zi);return t.length?t:e.facet(Gd)}function Qd(e,t){let n=[xp],s;return e instanceof Qs&&(e.module&&n.push(o.styleModule.of(e.module)),s=e.themeType),t?.fallback?n.push(Gd.of(e)):s?n.push(Zi.computeN([o.darkTheme],t=>t.facet(o.darkTheme)==(s=="dark")?[e]:[])):n.push(Zi.of(e)),n}class Cp{constructor(e){this.markCache=Object.create(null),this.tree=g(e.state),this.decorations=this.buildDeco(e,Qi(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=g(e.state),s=Qi(e.state),o=s!=Qi(e.startState),{viewport:n}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length=n.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,s),this.decoratedTo=n.to)}buildDeco(e,t){if(!t||!this.tree.length)return c.none;let n=new ut;for(let{from:s,to:o}of e.visibleRanges)B7(this.tree,t,(e,t,s)=>{n.add(e,t,this.markCache[s]||(this.markCache[s]=c.mark({class:s})))},s,o);return n.finish()}}const xp=Ue.high(k.fromClass(Cp,{decorations:e=>e.decorations})),wp=Qs.define([{tag:e.meta,color:"#404740"},{tag:e.link,textDecoration:"underline"},{tag:e.heading,textDecoration:"underline",fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strong,fontWeight:"bold"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.keyword,color:"#708"},{tag:[e.atom,e.bool,e.url,e.contentSeparator,e.labelName],color:"#219"},{tag:[e.literal,e.inserted],color:"#164"},{tag:[e.string,e.deleted],color:"#a11"},{tag:[e.regexp,e.escape,e.special(e.string)],color:"#e40"},{tag:e.definition(e.variableName),color:"#00f"},{tag:e.local(e.variableName),color:"#30a"},{tag:[e.typeName,e.namespace],color:"#085"},{tag:e.className,color:"#167"},{tag:[e.special(e.variableName),e.macroName],color:"#256"},{tag:e.definition(e.propertyName),color:"#00c"},{tag:e.comment,color:"#940"},{tag:e.invalid,color:"#f00"}]),_p=o.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),nu=1e4,su="()[]{}",ou=a.define({combine(e){return ye(e,{afterCursor:!0,brackets:su,maxScanDistance:nu,renderMatch:vp})}}),jp=c.mark({class:"cm-matchingBracket"}),bp=c.mark({class:"cm-nonmatchingBracket"});function vp(e){let t=[],n=e.matched?jp:bp;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const up=N.define({create(){return c.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let s=[],n=t.state.facet(ou);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=pe(t.state,e.head,-1,n)||e.head>0&&pe(t.state,e.head-1,1,n)||n.afterCursor&&(pe(t.state,e.head,1,n)||e.heado.decorations.from(e)}),lp=[up,_p];function du(e={}){return[ou.of(e),lp]}const Gi=new l;function Yi(e,t,n){let s=e.prop(t<0?l.openedBy:l.closedBy);if(s)return s;if(e.name.length==1){let s=n.indexOf(e.name);if(s>-1&&s%2==(t<0?1:0))return[n[s+t]]}return null}function qi(e){let t=e.type.prop(Gi);return t?t(e.node):e}function pe(e,t,n,s={}){let r=s.maxScanDistance||nu,o=s.brackets||su,i=g(e),a=i.resolveInner(t,n);for(let s=a;s;s=s.parent){let i=Yi(s.type,n,o);if(i&&s.from0?t>=a.from&&ta.from&&t<=a.to))return ap(e,t,n,s,a,i,o)}}return ip(e,t,n,i,a.type,r,o)}function ap(e,t,n,s,o,i,a){let l=s.parent,d={from:o.from,to:o.to},c=0,r=l?.cursor();if(r&&(n<0?r.childBefore(s.from):r.childAfter(s.to)))do if(n<0?r.to<=s.from:r.from>=s.to){if(c==0&&i.indexOf(r.type.name)>-1&&r.from0)return null;let d={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),l=0;for(let u=0;!c.next().done&&u<=i;){let e=c.value;n<0&&(u+=e.length);let h=t+u*n;for(let t=n>0?0:e.length-1,c=n>0?e.length:-1;t!=c;t+=n){let i=a.indexOf(e[t]);if(i<0||s.resolveInner(h+t,1).type!=o)continue;if(i%2==0==n>0)l++;else if(l==1)return{start:d,end:{from:h+t,to:h+t+1},matched:i>>1==r>>1};else l--}n>0&&(u+=e.length)}return c.done?{start:d,matched:!1}:null}const op=Object.create(null),bu=[F.none],ju=[],yu=Object.create(null),sp=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])sp[e]=tp(op,t);function Ui(e,t){if(ju.indexOf(e)>-1)return;ju.push(e),console.warn(t)}function tp(t,n){let s=[];for(let i of n.split(" ")){let o=[];for(let n of i.split(".")){let s=t[n]||e[n];s?typeof s=="function"?o.length?o=o.map(s):Ui(n,`Modifier ${n} used at start of tag`):o.length?Ui(n,`Tag ${n} used as modifier`):o=Array.isArray(s)?s:[s]:Ui(n,`Unknown highlighting tag ${n}`)}for(let e of o)s.push(e)}if(!s.length)return 0;let o=n.replace(/ /g,"_"),i=o+" "+s.map(e=>e.id),a=yu[i];if(a)return a.id;let r=yu[i]=F.define({id:bu.length,name:o,props:[de({[o]:s})]});return bu.push(r),r.id}({rtl:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:j.RTL}),ltr:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:j.LTR}),auto:c.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})});const ep=e=>{let{state:t}=e,s=t.doc.lineAt(t.selection.main.from),n=Vi(e.state,s.from);return n.line?Z6(e):!!n.block&&X6(e)};function $i(e,t){return({state:n,dispatch:s})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(s(n.update(o)),!0)}}const Z6=$i(_f,0),Q6=$i(zu,0),X6=$i((e,t)=>zu(e,t,q6(t)),0);function Vi(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const vn=50;function Y6(e,{open:t,close:n},s,o){let l=e.sliceDoc(s-vn,s),h=e.sliceDoc(o,o+vn),d=/\s*$/.exec(l)[0].length,r=/^\s*/.exec(h)[0].length,m=l.length-d;if(l.slice(m-t.length,m)==t&&h.slice(r,r+n.length)==n)return{open:{pos:s-d,margin:d&&1},close:{pos:o+r,margin:r&&1}};let a,i;o-s<=2*vn?a=i=e.sliceDoc(s,o):(a=e.sliceDoc(s,s+vn),i=e.sliceDoc(o-vn,o));let c=/^\s*/.exec(a)[0].length,f=/\s*$/.exec(i)[0].length,u=i.length-f-n.length;return a.slice(c,c+t.length)==t&&i.slice(u,u+n.length)==n?{open:{pos:s+c+t.length,margin:/\s/.test(a.charAt(c+t.length))?1:0},close:{pos:o-f-n.length,margin:/\s/.test(i.charAt(u-1))?1:0}}:null}function q6(e){let t=[];for(let s of e.selection.ranges){let n=e.doc.lineAt(s.from),i=s.to<=n.to?n:e.doc.lineAt(s.to),o=t.length-1;o>=0&&t[o].to>n.from?t[o].to=i.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:i.to})}return t}function zu(e,t,n=t.selection.ranges){let s=n.map(e=>Vi(t,e.from).block);if(!s.every(e=>e))return null;let o=n.map((e,n)=>Y6(t,s[n],e.from,e.to));if(e!=2&&!o.every(e=>e))return{changes:t.changes(n.map((e,t)=>o[t]?[]:[{from:e.from,insert:s[t].open+" "},{from:e.to,insert:" "+s[t].close}]))};if(e!=1&&o.some(e=>e)){let e=[];for(let t=0,n;to&&(a==r||r>n.from)){o=n.from;let t=/^\s*/.exec(n.text)[0].length,a=t==n.length,r=n.text.slice(t,t+i.length)==i?t:-1;te.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of s)(a||!i)&&e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&s.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:o}of s)if(n>=0){let i=t.from+n,s=i+o.length;t.text[s-t.from]==" "&&s++,e.push({from:i,to:s})}return{changes:e}}return null}const Hi=Re.define(),cf=Re.define(),L2=a.define(),Pu=a.define({combine(e){return ye(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),Hu=N.define({create(){return qe.empty},update(e,t){let o=t.state.facet(Pu),n=t.annotation(Hi);if(n){let a=Z.fromTransaction(t,n.selection),i=n.side,s=i==0?e.undone:e.done;return a?s=io(s,s.length,o.minDepth,a):s=Ju(s,t.startState.selection),new qe(i==0?n.rest:s,i==0?s:n.rest)}let s=t.annotation(cf);if((s=="full"||s=="before")&&(e=e.isolate()),t.annotation(S.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let i=Z.fromTransaction(t),a=t.annotation(S.time),r=t.annotation(S.userEvent);return i?e=e.addChanges(i,a,r,o,t):t.selection&&(e=e.addSelection(t.startState.selection,a,r,o.newGroupDelay)),(s=="full"||s=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new qe(e.done.map(Z.fromJSON),e.undone.map(Z.fromJSON))}});function Iu(e={}){return[Hu,Pu.of(e),o.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?Vu:e.inputType=="historyRedo"?zi:null;return!!n&&(e.preventDefault(),n(t))}})]}function to(e,t){return function({state:n,dispatch:s}){if(!t&&n.readOnly)return!1;let o=n.field(Hu,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(s(i),!0)}}const Vu=to(0,!1),zi=to(1,!1),$6=to(0,!0),R6=to(1,!0);class Z{constructor(e,t,n,s,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=o}setSelAfter(e){return new Z(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new Z(e.changes&&z.fromJSON(e.changes),[],e.mapped&&Ve.fromJSON(e.mapped),e.startSelection&&t.fromJSON(e.startSelection),e.selectionsAfter.map(t.fromJSON))}static fromTransaction(e,t){let n=ae;for(let s of e.startState.facet(L2)){let t=s(e);t.length&&(n=n.concat(t))}return!n.length&&e.changes.empty?null:new Z(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,ae)}static selection(e){return new Z(void 0,ae,void 0,void 0,e)}}function io(e,t,n,s){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(s),o}function N6(e,t){let n=[],s=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,o,i)=>{for(let e=0;e=t&&o<=a&&(s=!0)}}),s}function D6(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Xu(e,t){return e.length?t.length?e.concat(t):e:t}const ae=[],T6=200;function Ju(e,t){if(e.length){let s=e[e.length-1],n=s.selectionsAfter.slice(Math.max(0,s.selectionsAfter.length-T6));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),io(e,e.length-1,1e9,s.setSelAfter(n)))}return[Z.selection([t])]}function A6(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ei(e,t){if(!e.length)return e;let n=e.length,s=ae;for(;n;){let o=x6(e[n-1],t,s);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,s=o.selectionsAfter}return s.length?[Z.selection(s)]:ae}function x6(e,t,n){let o=Xu(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):ae,n);if(!e.changes)return Z.selection(o);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(s):s;return new Z(i,d.mapEffects(e.effects,t),a,e.startSelection.map(s),o)}const O6=/^(input\.type|delete)($|\.)/;class qe{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new qe(this.done,this.undone):this}addChanges(e,t,n,s,o){let i=this.done,a=i[i.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!n||O6.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimen.empty?e.moveByChar(n,t):mo(n,t))}function B(e){return e.textDirectionAt(e.state.selection.main.head)==j.LTR}const h1=e=>d1(e,!B(e)),m1=e=>d1(e,B(e));function f1(e,t){return me(e,n=>n.empty?e.moveByGroup(n,t):mo(n,t))}const g6=e=>f1(e,!B(e)),p6=e=>f1(e,B(e));function h6(e,t,n){if(t.type.prop(n))return!0;let s=t.to-t.from;return s&&(s>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function fo(e,n,s){let o=g(e).resolveInner(n.head),r=s?l.closedBy:l.openedBy;for(let i=n.head;;){let t=s?o.childAfter(i):o.childBefore(i);if(!t)break;h6(e,t,r)?o=t:i=s?t.to:t.from}let c=o.type.prop(r),i,a;return c&&(i=s?pe(e,o.from,1):pe(e,o.to,-1))&&i.matched?a=s?i.end.to:i.end.from:a=s?o.to:o.from,t.cursor(a,s?-1:1)}const r6=e=>me(e,t=>fo(e.state,t,!B(e))),a6=e=>me(e,t=>fo(e.state,t,B(e)));function _1(e,t){return me(e,n=>{if(!n.empty)return mo(n,t);let s=e.moveVertically(n,t);return s.head!=n.head?s:e.moveToLineBoundary(n,t)})}const w1=e=>_1(e,!1),O1=e=>_1(e,!0);function x1(e){let i=e.scrollDOM.clientHeights.empty?e.moveVertically(s,t,n.height):mo(s,t));if(i.eq(s.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(s.selection.main.head),r=e.scrollDOM.getBoundingClientRect(),c=r.top+n.marginTop,l=r.bottom-n.marginBottom;t&&t.top>c&&t.bottomC1(e,!1),vi=e=>C1(e,!0);function at(e,n,s){let o=e.lineBlockAt(n.head),i=e.moveToLineBoundary(n,s);if(i.head==n.head&&i.head!=(s?o.to:o.from)&&(i=e.moveToLineBoundary(n,s,!1)),!s&&i.head==o.from&&o.length){let s=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;s&&n.head!=o.from+s&&(i=t.cursor(o.from+s))}return i}const o6=e=>me(e,t=>at(e,t,!0)),Uf=e=>me(e,t=>at(e,t,!1)),Bf=e=>me(e,t=>at(e,t,!B(e))),Hf=e=>me(e,t=>at(e,t,B(e))),Rf=e=>me(e,n=>t.cursor(e.lineBlockAt(n.head).from,1)),Lf=e=>me(e,n=>t.cursor(e.lineBlockAt(n.head).to,-1));function Nf(e,n){let o=!1,i=Ut(e.selection,n=>{let s=pe(e,n.head,-1)||pe(e,n.head,1)||n.head>0&&pe(e,n.head-1,1)||n.headNf(e,t);function ce(e,n){let s=Ut(e.state.selection,e=>{let s=n(e);return t.range(e.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return!s.eq(e.state.selection)&&(e.dispatch(ve(e.state,s)),!0)}function P1(e,t){return ce(e,n=>e.moveByChar(n,t))}const H1=e=>P1(e,!B(e)),I1=e=>P1(e,B(e));function B1(e,t){return ce(e,n=>e.moveByGroup(n,t))}const Tf=e=>B1(e,!B(e)),wf=e=>B1(e,B(e)),jf=e=>ce(e,t=>fo(e.state,t,!B(e))),vf=e=>ce(e,t=>fo(e.state,t,B(e)));function K1(e,t){return ce(e,n=>e.moveVertically(n,t))}const q1=e=>K1(e,!1),Y1=e=>K1(e,!0);function G1(e,t){return ce(e,n=>e.moveVertically(n,t,x1(e).height))}const X1=e=>G1(e,!1),Q1=e=>G1(e,!0),gf=e=>ce(e,t=>at(e,t,!0)),df=e=>ce(e,t=>at(e,t,!1)),lf=e=>ce(e,t=>at(e,t,!B(e))),R2=e=>ce(e,t=>at(e,t,B(e))),rf=e=>ce(e,n=>t.cursor(e.lineBlockAt(n.head).from)),af=e=>ce(e,n=>t.cursor(e.lineBlockAt(n.head).to)),o4=({state:e,dispatch:t})=>(t(ve(e,{anchor:0})),!0),i4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.doc.length})),!0),a4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.selection.main.anchor,head:0})),!0),r4=({state:e,dispatch:t})=>(t(ve(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),nf=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),G8=({state:e,dispatch:n})=>{let s=wo(e).map(({from:n,to:s})=>t.range(n,Math.min(s+1,e.doc.length)));return n(e.update({selection:t.create(s),userEvent:"select"})),!0},Y8=({state:e,dispatch:n})=>{let s=Ut(e.selection,n=>{var s;let o=g(e).resolveStack(n.from,1);for(let i=o;i;i=i.next){let{node:e}=i;if((e.from=n.to||e.to>n.to&&e.from<=n.from)&&((s=e.parent)===null||s===void 0?void 0:s.parent))return t.range(e.to,e.from)}return n});return n(ve(e,s)),!0},U8=({state:e,dispatch:n})=>{let s=e.selection,o=null;return s.ranges.length>1?o=t.create([s.main]):s.main.empty||(o=t.create([t.cursor(s.main.head)])),!!o&&(n(ve(e,o)),!0)};function Fn(e,n){if(e.state.readOnly)return!1;let s="delete.selection",{state:i}=e,a=i.changeByRange(o=>{let{from:i,to:a}=o;if(i==a){let t=n(o);ti&&(s="delete.forward",t=_o(e,t,!0)),i=Math.min(i,t),a=Math.max(a,t)}else i=_o(e,i,!1),a=_o(e,a,!0);return i==a?{range:o}:{changes:{from:i,to:a},range:t.cursor(i,it(e)))s.between(t,t,(e,s)=>{et&&(t=n?s:e)});return t}const f4=(e,t,n)=>Fn(e,s=>{let i=s.from,{state:c}=e,o=c.doc.lineAt(i),r,a;if(n&&!t&&i>o.from&&if4(e,!1,!0),g4=e=>f4(e,!0,!1),v4=(e,t)=>Fn(e,n=>{let s=n.head,{state:i}=e,o=i.doc.lineAt(s),a=i.charCategorizer(s);for(let e=null;;){if(s==(t?o.to:o.from)){s==n.head&&o.number!=(t?i.doc.lines:1)&&(s+=t?1:-1);break}let r=R(o.text,s-o.from,t)+o.from,c=o.text.slice(Math.min(s,r)-o.from,Math.max(s,r)-o.from),l=a(c);if(e!=null&&l!=e)break;(c!=" "||s!=n.head)&&(e=l),s=r}return s}),b4=e=>v4(e,!1),N8=e=>v4(e,!0),z8=e=>Fn(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headFn(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),O8=e=>Fn(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let s=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:f.of(["",""])},range:t.cursor(e.from)}));return n(e.update(s,{scrollIntoView:!0,userEvent:"input"})),!0},f8=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let s=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let s=n.from,o=e.doc.lineAt(s),a=s==o.from?s-1:R(o.text,s-o.from,!1)+o.from,i=s==o.to?s+1:R(o.text,s-o.from,!0)+o.from;return{changes:{from:a,to:i,insert:e.doc.slice(s,i).append(e.doc.slice(a,s))},range:t.cursor(i)}});return!s.changes.empty&&(n(e.update(s,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function wo(e){let t=[],n=-1;for(let s of e.selection.ranges){let i=e.doc.lineAt(s.from),o=e.doc.lineAt(s.to);if(!s.empty&&s.to==o.from&&(o=e.doc.lineAt(s.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(s)}else t.push({from:i.from,to:o.to,ranges:[s]});n=o.number+1}return t}function E4(e,n,s){if(e.readOnly)return!1;let o=[],i=[];for(let n of wo(e)){if(s?n.to==e.doc.length:n.from==0)continue;let a=e.doc.lineAt(s?n.to+1:n.from-1),r=a.length+1;if(s){o.push({from:n.to,to:a.to},{from:n.from,insert:a.text+e.lineBreak});for(let s of n.ranges)i.push(t.range(Math.min(e.doc.length,s.anchor+r),Math.min(e.doc.length,s.head+r)))}else{o.push({from:a.from,to:n.from},{from:n.to,insert:e.lineBreak+a.text});for(let e of n.ranges)i.push(t.range(e.anchor-r,e.head-r))}}return!!o.length&&(n(e.update({changes:o,scrollIntoView:!0,selection:t.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}const u8=({state:e,dispatch:t})=>E4(e,t,!1),d8=({state:e,dispatch:t})=>E4(e,t,!0);function S4(e,t,n){if(e.readOnly)return!1;let s=[];for(let t of wo(e))n?s.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):s.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:s,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const r8=({state:e,dispatch:t})=>S4(e,t,!1),Jm=({state:e,dispatch:t})=>S4(e,t,!0),Qm=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(wo(t).map(({from:e,to:n})=>(e>0?e--:n{let n=void 0;if(e.lineWrapping){let o=e.lineBlockAt(t.head),s=e.coordsAtPos(t.head,t.assoc||1);s&&(n=o.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:s,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Gm(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let o=g(e).resolveInner(t),n=o.childBefore(t),s=o.childAfter(t),i;return n&&s&&n.to<=t&&s.from>=t&&(i=n.type.prop(l.closedBy))&&i.indexOf(s.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const Ym=L4(!1),qm=L4(!0);function L4(e){return({state:n,dispatch:s})=>{if(n.readOnly)return!1;let o=n.changeByRange(s=>{let{from:o,to:a}=s,i=n.doc.lineAt(o),r=!e&&o==a&&Gm(n,o);e&&(o=a=(a<=i.to?i:n.doc.lineAt(a)).to);let d=new Hs(n,{simulateBreak:o,simulateDoubleBreak:!!r}),c=ja(d,o);for(c==null&&(c=he(/^\s*/.exec(n.doc.lineAt(o).text)[0],n.tabSize));ai.from&&o{let i=[];for(let a=o.from;a<=o.to;){let t=e.doc.lineAt(a);t.number>s&&(o.empty||o.to>t.from)&&(n(t,i,o),s=t.number),a=t.to+1}let a=e.changes(i);return{changes:i,range:t.range(a.mapPos(o.anchor,1),a.mapPos(o.head,1))}})}const Um=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),o=new Hs(e,{overrideIndentation:e=>{let t=n[e];return t??-1}}),s=ni(e,(t,s,i)=>{let a=ja(o,t.from);if(a==null)return;/\S/.test(t.text)||(a=0);let r=/^\s*/.exec(t.text)[0],c=Qn(e,a);(r!=c||i.from!e.readOnly&&(t(e.update(ni(e,(t,n)=>{n.push({from:t.from,insert:e.facet(bn)})}),{userEvent:"input.indent"})),!0),I4=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(ni(e,(t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let a=he(o,e.tabSize),s=0,i=Qn(e,Math.max(0,a-Ns(e)));for(;s(e.setTabFocusMode(),!0),V4=[{key:"Ctrl-b",run:h1,shift:H1,preventDefault:!0},{key:"Ctrl-f",run:m1,shift:I1},{key:"Ctrl-p",run:w1,shift:q1},{key:"Ctrl-n",run:O1,shift:Y1},{key:"Ctrl-a",run:Rf,shift:rf},{key:"Ctrl-e",run:Lf,shift:af},{key:"Ctrl-d",run:g4},{key:"Ctrl-h",run:ii},{key:"Ctrl-k",run:z8},{key:"Ctrl-Alt-h",run:b4},{key:"Ctrl-o",run:g8},{key:"Ctrl-t",run:f8},{key:"Ctrl-v",run:vi}],$m=[{key:"ArrowLeft",run:h1,shift:H1,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:g6,shift:Tf,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Bf,shift:lf,preventDefault:!0},{key:"ArrowRight",run:m1,shift:I1,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:p6,shift:wf,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Hf,shift:R2,preventDefault:!0},{key:"ArrowUp",run:w1,shift:q1,preventDefault:!0},{mac:"Cmd-ArrowUp",run:o4,shift:a4},{mac:"Ctrl-ArrowUp",run:E1,shift:X1},{key:"ArrowDown",run:O1,shift:Y1,preventDefault:!0},{mac:"Cmd-ArrowDown",run:i4,shift:r4},{mac:"Ctrl-ArrowDown",run:vi,shift:Q1},{key:"PageUp",run:E1,shift:X1},{key:"PageDown",run:vi,shift:Q1},{key:"Home",run:Uf,shift:df,preventDefault:!0},{key:"Mod-Home",run:o4,shift:a4},{key:"End",run:o6,shift:gf,preventDefault:!0},{key:"Mod-End",run:i4,shift:r4},{key:"Enter",run:Ym},{key:"Mod-a",run:nf},{key:"Backspace",run:ii,shift:ii},{key:"Delete",run:g4},{key:"Mod-Backspace",mac:"Alt-Backspace",run:b4},{key:"Mod-Delete",mac:"Alt-Delete",run:N8},{mac:"Mod-Backspace",run:x8},{mac:"Mod-Delete",run:O8}].concat(V4.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),W4=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:r6,shift:jf},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:a6,shift:vf},{key:"Alt-ArrowUp",run:u8},{key:"Shift-Alt-ArrowUp",run:r8},{key:"Alt-ArrowDown",run:d8},{key:"Shift-Alt-ArrowDown",run:Jm},{key:"Escape",run:U8},{key:"Mod-Enter",run:qm},{key:"Alt-l",mac:"Ctrl-l",run:G8},{key:"Mod-i",run:Y8,preventDefault:!0},{key:"Mod-[",run:I4},{key:"Mod-]",run:H4},{key:"Mod-Alt-\\",run:Um},{key:"Shift-Mod-k",run:Qm},{key:"Shift-Mod-\\",run:Df},{key:"Mod-/",run:ep},{key:"Alt-A",run:Q6},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Wm}].concat($m),Bm={key:"Tab",run:H4,shift:I4};function y(){e=arguments[0],typeof e=="string"&&(e=document.createElement(e));var e,n,o,s=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n=t[o],typeof n=="string"?e.setAttribute(o,n):n!=null&&(e[o]=n));s++}for(;se.normalize("NFKD"):e=>e;class Ft{constructor(e,t,n=0,s=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=o?e=>o(Y4(e)):Y4,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return D(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=xr(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=re(e);let s=this.normalize(t);for(let e=0,o=n;;e++){let i=s.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==s.length-1){if(a)return this.value=a,this;break}o==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,s=n+e[0].length;if(this.matchPos=Eo(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,s,e)))return this.value={from:n,to:s,match:e},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||s.to<=t){let s=new On(t,e.sliceString(t,n));return Zo.set(e,s),s}if(s.from==t&&s.to==n)return s;let{text:i,from:o}=s;return o>t&&(i=e.sliceString(t,o)+i,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,n=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,n,e)))return this.value={from:t,to:n,match:e},this.matchPos=Eo(this.text,n+(t==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=On.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(Z4.prototype[Symbol.iterator]=t0.prototype[Symbol.iterator]=function(){return this});function Hm(e){try{return new RegExp(e,Jo),!0}catch{return!1}}function Eo(e,t){if(t>=e.length)return t;let n=e.lineAt(t),s;for(;t=56320&&s<57344;)t++;return t}function Yo(e){let i=String(e.state.doc.lineAt(e.state.selection.main.head).number),n=y("input",{class:"cm-textfield",name:"line",value:i}),a=y("form",{class:"cm-gotoLine",onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:Fo.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),s())},onsubmit:e=>{e.preventDefault(),s()}},y("label",e.state.phrase("Go to line"),": ",n)," ",y("button",{class:"cm-button",type:"submit"},e.state.phrase("go")));function s(){let l=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!l)return;let{state:s}=e,c=s.doc.lineAt(s.selection.main.head),[,a,r,d,m]=l,f=d?+d.slice(1):0,i=r?+r:c.number;if(r&&m){let e=i/100;a&&(e=e*(a=="-"?-1:1)+c.number/s.doc.lines),i=Math.round(s.doc.lines*e)}else r&&a&&(i=i*(a=="-"?-1:1)+c.number);let u=s.doc.line(Math.max(1,Math.min(s.doc.lines,i))),h=t.cursor(u.from+Math.max(0,Math.min(f,u.length)));e.dispatch({effects:[Fo.of(!1),o.scrollIntoView(h.from,{y:"center"})],selection:h}),e.focus()}return{dom:a}}const Fo=d.define(),a0=N.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(Fo)&&(e=n.value);return e},provide:e=>Rn.from(e,e=>e?Yo:null)}),Dm=e=>{let t=zn(e,Yo);if(!t){let n=[Fo.of(!0)];e.state.field(a0,!1)==null&&n.push(d.appendConfig.of([a0,Tm])),e.dispatch({effects:n}),t=zn(e,Yo)}return t&&t.dom.querySelector("input").select(),!0},Tm=o.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Cm={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},mm=a.define({combine(e){return ye(e,Cm,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function um(){let t=[Gh,Xh];return t}const dm=c.mark({class:"cm-selectionMatch"}),em=c.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function f0(e,t,n,s){return(n==0||e(t.sliceDoc(n-1,n))!=O.Word)&&(s==t.doc.length||e(t.sliceDoc(s,s+1))!=O.Word)}function Zh(e,t,n,s){return e(t.sliceDoc(n,n+1))==O.Word&&e(t.sliceDoc(s-1,s))==O.Word}const Xh=k.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let i=e.state.facet(mm),{state:n}=e,r=n.selection;if(r.ranges.length>1)return c.none;let t=r.main,o,s=null;if(t.empty){if(!i.highlightWordAroundCursor)return c.none;let e=n.wordAt(t.head);if(!e)return c.none;s=n.charCategorizer(t.head),o=n.sliceDoc(e.from,e.to)}else{let e=t.to-t.from;if(e200)return c.none;if(i.wholeWords){if(o=n.sliceDoc(t.from,t.to),s=n.charCategorizer(t.head),!f0(s,n,t.from,t.to)||!Zh(s,n,t.from,t.to))return c.none}else if(o=n.sliceDoc(t.from,t.to),!o)return c.none}let a=[];for(let r of e.visibleRanges){let l=new Ft(n.doc,o,r.from,r.to);for(;!l.next().done;){let{from:e,to:o}=l.value;if((!s||f0(s,n,e,o))&&(t.empty&&e<=t.from&&o>=t.to?a.push(em.range(e,o)):(e>=t.to||o<=t.from)&&a.push(dm.range(e,o)),a.length>i.maxMatches))return c.none}}return c.set(a)}},{decorations:e=>e.decorations}),Gh=o.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qh=({state:e,dispatch:n})=>{let{selection:s}=e,o=t.create(s.ranges.map(n=>e.wordAt(n.head)||t.cursor(n.head)),s.mainIndex);return!o.eq(s)&&(n(e.update({selection:o})),!0)};function Uh(e,t){let{main:s,ranges:n}=e.selection,o=e.wordAt(s.head),i=o&&o.from==s.from&&o.to==s.to;for(let o=!1,s=new Ft(e.doc,t,n[n.length-1].to);;)if(s.next(),s.done){if(o)return null;s=new Ft(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(e=>e.from==s.value.from))continue;if(i){let t=e.wordAt(s.value.from);if(!t||t.from!=s.value.from||t.to!=s.value.to)continue}return s.value}}const Bh=({state:e,dispatch:n})=>{let{ranges:i}=e.selection;if(i.some(e=>e.from===e.to))return qh({state:e,dispatch:n});let a=e.sliceDoc(i[0].from,i[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=a))return!1;let s=Uh(e,a);return!!s&&(n(e.update({selection:e.selection.addRange(t.range(s.from,s.to),!1),effects:o.scrollIntoView(s.to)})),!0)},wt=a.define({combine(e){return ye(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new X3(e),scrollToMatch:e=>o.scrollIntoView(e)})}});function Hh(e){return e?[wt.of(e),ti]:ti}class Uo{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Hm(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t=="n"?` +`:t=="r"?"\r":t=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new zh(this):new Lh(this)}getCursor(e,t=0,n){let s=e.doc?e:h.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Pt(this,s,t,n):Lt(this,s,t,n)}}class x0{constructor(e){this.spec=e}}function Lt(e,t,n,s){return new Ft(t.doc,e.unquoted,n,s,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?Rh(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function Rh(e,t){return(n,s,o,i)=>((i>n||i+o.length=t)return null;n.push(s.value)}return n}highlight(e,t,n,s){let o=Lt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}function Pt(e,t,n,s){return new Z4(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?Dh(t.charCategorizer(t.selection.main.head)):void 0},n,s)}function zo(e,t){return e.slice(R(e,t,!1),t)}function os(e,t){return e.slice(t,R(e,t))}function Dh(e){return(t,n,s)=>!s[0].length||(e(zo(s.input,s.index))!=O.Word||e(os(s.input,s.index))!=O.Word)&&(e(os(s.input,s.index+s[0].length))!=O.Word||e(zo(s.input,s.index+s[0].length))!=O.Word)}class zh extends x0{nextMatch(e,t,n){let s=Pt(this.spec,e,n,e.doc.length).next();return s.done&&(s=Pt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let s=Math.max(t,n-i*1e4),a=Pt(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n=t)return null;n.push(s.value)}return n}highlight(e,t,n,s){let o=Pt(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)s(o.value.from,o.value.to)}}const It=d.define(),Ho=d.define(),Ie=N.define({create(e){return new Ro(Mo(e).create(),null)},update(e,t){for(let n of t.effects)n.is(It)?e=new Ro(n.value.create(),e.panel):n.is(Ho)&&(e=new Ro(e.query,n.value?qo:null));return e},provide:e=>Rn.from(e,e=>e.panel)});function L0(e){let t=e.field(Ie,!1);return t?t.query.spec:Mo(e)}class Ro{constructor(e,t){this.query=e,this.panel=t}}const Mh=c.mark({class:"cm-searchMatch"}),Ah=c.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Eh=k.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Ie))}update(e){let t=e.state.field(Ie);(t!=e.startState.field(Ie)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return c.none;let{view:n}=this,s=new ut;for(let t=0,o=n.visibleRanges,a=o.length;to[t+1].from-2*250;)i=o[++t].to;e.highlight(n.state,r,i,(e,t)=>{let o=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);s.add(e,t,o?Ah:Mh)})}return s.finish()}},{decorations:e=>e.decorations});function dn(e){return t=>{let n=t.state.field(Ie,!1);return n&&n.query.spec.valid?e(t,n):Z0(t)}}const Wt=dn((e,{query:n})=>{let{to:o}=e.state.selection.main,s=n.nextMatch(e.state,o,o);if(!s)return!1;let i=t.single(s.from,s.to),a=e.state.facet(wt);return e.dispatch({selection:i,effects:[Go(e,s),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),Q0(e),!0}),Do=dn((e,{query:n})=>{let{state:o}=e,{from:i}=o.selection.main,s=n.prevMatch(o,i,i);if(!s)return!1;let a=t.single(s.from,s.to),r=e.state.facet(wt);return e.dispatch({selection:a,effects:[Go(e,s),r.scrollToMatch(a.main,e)],userEvent:"select.search"}),Q0(e),!0}),gh=dn((e,{query:n})=>{let s=n.matchAll(e.state,1e3);return!!s&&!!s.length&&(e.dispatch({selection:t.create(s.map(e=>t.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),ph=({state:e,dispatch:n})=>{let o=e.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:i,to:r}=o.main,s=[],a=0;for(let n=new Ft(e.doc,e.sliceDoc(i,r));!n.next().done;){if(s.length>1e3)return!1;n.value.from==i&&(a=s.length),s.push(t.range(n.value.from,n.value.to))}return n(e.update({selection:t.create(s,a),userEvent:"select.search.matches"})),!0},K0=dn((e,{query:n})=>{let{state:i}=e,{from:a,to:u}=i.selection.main;if(i.readOnly)return!1;let s=n.nextMatch(i,a,a);if(!s)return!1;let r=[],l,d,c=[];if(s.from==a&&s.to==u&&(d=i.toText(n.getReplacement(s)),r.push({from:s.from,to:s.to,insert:d}),s=n.nextMatch(i,s.from,s.to),c.push(o.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(a).number)+"."))),s){let n=r.length==0||r[0].from>=s.to?0:s.to-s.from-d.length;l=t.single(s.from-n,s.to-n),c.push(Go(e,s)),c.push(i.facet(wt).scrollToMatch(l.main,e))}return e.dispatch({changes:r,selection:l,effects:c,userEvent:"input.replace"}),!0}),uh=dn((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:s}=e;return{from:n,to:s,insert:t.getReplacement(e)}});if(!n.length)return!1;let s=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:o.announce.of(s),userEvent:"input.replace.all"}),!0});function qo(e){return e.state.facet(wt).createPanel(e)}function Mo(e,t){var o,i,a,r,c;let n=e.selection.main,l=n.empty||n.to>n.from+100?"":e.sliceDoc(n.from,n.to);if(t&&!l)return t;let s=e.facet(wt);return new Uo({search:((o=t?.literal)!==null&&o!==void 0?o:s.literal)?l:l.replace(/\n/g,`\\n`),caseSensitive:(i=t?.caseSensitive)!==null&&i!==void 0?i:s.caseSensitive,literal:(a=t?.literal)!==null&&a!==void 0?a:s.literal,regexp:(r=t?.regexp)!==null&&r!==void 0?r:s.regexp,wholeWord:(c=t?.wholeWord)!==null&&c!==void 0?c:s.wholeWord})}function X0(e){let t=zn(e,qo);return t&&t.dom.querySelector("[main-field]")}function Q0(e){let t=X0(e);t&&t==e.root.activeElement&&t.select()}const Z0=e=>{let t=e.state.field(Ie,!1);if(t&&t.panel){{let n=X0(e);if(n&&n!=e.root.activeElement){let s=Mo(e.state,t.query.spec);s.valid&&e.dispatch({effects:It.of(s)}),n.focus(),n.select()}}}else e.dispatch({effects:[Ho.of(!0),t?It.of(Mo(e.state,t.query.spec)):d.appendConfig.of(ti)]});return!0},J0=e=>{let t=e.state.field(Ie,!1);if(!t||!t.panel)return!1;let n=zn(e,qo);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Ho.of(!1)}),!0},e2=[{key:"Mod-f",run:Z0,scope:"editor search-panel"},{key:"F3",run:Wt,shift:Do,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wt,shift:Do,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:J0,scope:"editor search-panel"},{key:"Mod-Shift-l",run:ph},{key:"Mod-Alt-g",run:Dm},{key:"Mod-d",run:Bh,preventDefault:!0}];class X3{constructor(e){this.view=e;let t=this.query=e.state.field(Ie).query.spec;this.commit=this.commit.bind(this),this.searchField=y("input",{value:t.search,placeholder:G(e,"Find"),"aria-label":G(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=y("input",{value:t.replace,placeholder:G(e,"Replace"),"aria-label":G(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=y("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=y("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=y("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return y("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.dom=y("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>Wt(e),[G(e,"next")]),n("prev",()=>Do(e),[G(e,"previous")]),n("select",()=>gh(e),[G(e,"all")]),y("label",null,[this.caseField,G(e,"match case")]),y("label",null,[this.reField,G(e,"regexp")]),y("label",null,[this.wordField,G(e,"by word")]),...e.state.readOnly?[]:[y("br"),this.replaceField,n("replace",()=>K0(e),[G(e,"replace")]),n("replaceAll",()=>uh(e),[G(e,"replace all")])],y("button",{name:"close",onclick:()=>J0(e),"aria-label":G(e,"close"),type:"button"},["×"])])}commit(){let e=new Uo({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:It.of(e)}))}keydown(e){ig(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Do:Wt)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),K0(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(It)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(wt).top}}function G(e,t){return e.state.phrase(t)}const Ao=30,ko=/[\s.,:;?!]/;function Go(e,{from:t,to:n}){let i=e.state.doc.lineAt(t),a=e.state.doc.lineAt(n).to,r=Math.max(i.from,t-Ao),c=Math.min(a,n+Ao),s=e.state.sliceDoc(r,c);if(r!=i.from)for(let e=0;es.length-Ao;e--)if(!ko.test(s[e-1])&&ko.test(s[e])){s=s.slice(0,e);break}return o.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${i.number}.`)}const D3=o.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ti=[Ie,Ue.low(Eh),D3];class si{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=g(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),s=Math.max(t.from,this.pos-250),o=t.text.slice(s-t.from,this.pos-t.from),n=o.search(p2(e,!1));return n<0?null:{from:s+n,to:this.pos,text:o.slice(n)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l2(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function T3(e){let t=Object.create(null),n=Object.create(null);for(let{label:s}of e){t[s[0]]=!0;for(let e=1;etypeof e=="string"?{label:e}:e),[n,s]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:T3(t);return e=>{let o=e.matchBefore(s);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}function h2(e,t){return n=>{for(let t=g(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class m2{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function mt(e){return e.selection.main.from}function p2(e,t){var s;let{source:n}=e,o=t&&n[0]!="^",i=n[n.length-1]!="$";return!o&&!i?e:new RegExp(`${o?"^":""}(?:${n})${i?"$":""}`,(s=e.flags)!==null&&s!==void 0?s:e.ignoreCase?"i":"")}const di=Re.define();function S3(e,n,s,o){let{main:i}=e.selection,a=s-i.from,r=o-i.from;return Object.assign(Object.assign({},e.changeByRange(c=>{if(c!=i&&s!=o&&e.sliceDoc(c.from+a,c.from+r)!=e.sliceDoc(s,o))return{range:c};let l=e.toText(n);return{changes:{from:c.from+a,to:o==i.from?c.to:c.from+r,insert:l},range:t.cursor(c.from+a+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const b2=new WeakMap;function A3(e){if(!Array.isArray(e))return e;let t=b2.get(e);return t||b2.set(e,t=ai(e)),t}const bo=d.define(),rn=d.define();class O3{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&r<=57||r>=97&&r<=122?2:r>=65&&r<=90?1:0:(v=xr(r))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!m||b==1&&g||j==0&&b!=0)&&(s[o]==r||c[o]==r&&(u=!0)?a[o++]=m:a.length&&(f=!1)),j=b,m+=re(r)}return o==t&&a[0]==0&&f?this.result(-100+(u?-200:0),a,e):n==t&&h==0?this.ret(-200-e.length+(l==e.length?0:-100),[0,l]):i>-1?this.ret(-700-e.length,[i,i+this.pattern.length]):n==t?this.ret(-200+-700-e.length,[h,l]):o==t?this.result(-100+(u?-200:0)+-700+(f?0:-1100),a,e):s.length==2?null:this.result((m[0]?-700:0)+-200+-1100,m,e)}result(e,t,n){let s=[],o=0;for(let e of t){let i=e+(this.astral?re(D(n,e)):1);o&&s[o-1]==e?s[o-1]=i:(s[o++]=e,s[o++]=i)}return this.ret(e-n.length,s)}}class b3{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:l3,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>C2(e(n),t(n)),optionClass:(e,t)=>n=>C2(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function C2(e,t){return e?t?e+" "+t:e:t}function l3(e,t,n,s,o,i){let d=e.textDirection==j.RTL,a=d,m=!1,f="top",r,u,c=t.left-o.left,l=o.right-t.right,h=s.right-s.left,p=s.bottom-s.top;if(a&&c=p||e>t.top?r=n.bottom-t.top:(f="bottom",r=t.bottom-n.top)}let g=(t.bottom-t.top)/i.offsetHeight,v=(t.right-t.left)/i.offsetWidth;return{style:`${f}: ${r/g}px; max-width: ${u/v}px`,class:"cm-completionInfo-"+(m?d?"left-narrow":"right-narrow":a?"left":"right")}}function c3(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=e.displayLabel||e.label,i=0;for(let e=0;ei&&o.appendChild(document.createTextNode(a.slice(i,t)));let r=o.appendChild(document.createElement("span"));r.appendChild(document.createTextNode(a.slice(t,n))),r.className="cm-completionMatchedText",i=n}return ie.position-t.position).map(e=>e.render)}function mi(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let s=Math.floor((e-t)/n);return{from:e-(s+1)*n,to:e-s*n}}class Z2{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let o=e.state.field(t),{options:i,selected:a}=o.open,s=e.state.facet(T);this.optionContent=c3(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=mi(i.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:s}=e.state.field(t).open;for(let t=n.target,o;t&&t!=this.dom;t=t.parentNode)if(t.nodeName=="LI"&&(o=/-(\d+)$/.exec(t.id))&&+o[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(T).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:rn.of(null)})}),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let s=e.state.field(this.stateField),t=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),s!=t){let{options:o,selected:a,disabled:i}=s.open;(!t.open||t.open.options!=o)&&(this.range=mi(o.length,a,e.state.facet(T).maxRenderedOptions),this.showOptions(o,s.id)),this.updateSel(),i!=((n=t.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!i)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=mi(e.options.length,e.selected,this.view.state.facet(T).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:s}=n;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(n);if(!o)return;"then"in o?o.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)}).catch(e=>K(this.view.state,e,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:s}=e;n.appendChild(t),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&$2(this.list,t),t}measureInfo(){let s=this.dom.querySelector("[aria-selected]");if(!s||!this.info)return null;let t=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),n=s.getBoundingClientRect(),e=this.space;if(!e){let t=this.dom.ownerDocument.defaultView||window;e={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(e.bottom,t.bottom)-10||n.bottomn.from||n.from==0))if(o=e,typeof i!="string"&&i.header)s.appendChild(i.header(i));else{let t=s.appendChild(document.createElement("completion-section"));t.textContent=e}}const r=s.appendChild(document.createElement("li"));r.id=t+"-"+a,r.setAttribute("role","option");let l=this.optionClass(c);l&&(r.className=l);for(let t of this.optionContent){let e=t(c,this.view.state,this.view,d);e&&r.appendChild(e)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.tonew Z2(n,e,t)}function $2(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=n.height/e.offsetHeight;s.topn.bottom&&(e.scrollTop+=(s.bottom-n.bottom)/o)}function T2(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function B2(e,t){let o=[],s=null,a=e=>{o.push(e);let{section:t}=e.completion;if(t){s||(s=[]);let e=typeof t=="string"?t:t.name;s.some(t=>t.name==e)||s.push(typeof t=="string"?{name:e}:t)}},r=t.facet(T);for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(n.result.filter===!1)for(let t of n.result.options)a(new m2(t,n.source,e?e(t):[],1e9-o.length));else{let o=t.sliceDoc(n.from,n.to),s,i=r.filterStrict?new b3(o):new O3(o);for(let t of n.result.options)if(s=i.match(t.label)){let o=t.displayLabel?e?e(t,s.matched):[]:s.matched;a(new m2(t,n.source,o,s.score+(t.boost||0)))}}}if(s){let e=Object.create(null),t=0,n=(e,t)=>{var n,s;return((n=e.rank)!==null&&n!==void 0?n:1e9)-((s=t.rank)!==null&&s!==void 0?s:1e9)||(e.namet.score-e.score||c(e.completion,t.completion))){let e=t.completion;!n||n.label!=e.label||n.detail!=e.detail||n.type!=null&&e.type!=null&&n.type!=e.type||n.apply!=e.apply||n.boost!=e.boost?i.push(t):T2(t.completion)>T2(n)&&(i[i.length-1]=t),n=t.completion}return i}class sn{constructor(e,t,n,s,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new sn(this.options,D2(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,o,i){if(s&&!i&&e.some(e=>e.isPending))return s.setDisabled();let a=B2(e,t);if(!a.length)return s&&e.some(e=>e.isPending)?s.setDisabled():null;let r=t.facet(T).selectOnOpen?0:-1;if(s&&s.selected!=r&&s.selected!=-1){let e=s.options[s.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e,1e8),create:G2,above:o.aboveCursor},s?s.timestamp:Date.now(),r,!1)}map(e){return new sn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new sn(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class _i{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new _i(I2,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:s}=e,o=s.facet(T),a=o.override||s.languageDataAt("autocomplete",mt(s)).map(A3),n=a.map(t=>{let n=this.active.find(e=>e.source==t)||new fe(t,this.active.some(e=>e.state!=0)?1:0);return n.update(e,o)});n.length==this.active.length&&n.every((e,t)=>e==this.active[t])&&(n=this.active);let t=this.open,i=e.effects.some(e=>e.is(Si));t&&e.docChanged&&(t=t.map(e.changes)),e.selection||n.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!hp(n,this.active)||i?t=sn.build(n,s,this.id,t,o,i):t&&t.disabled&&!n.some(e=>e.isPending)&&(t=null),!t&&n.every(e=>!e.isPending)&&n.some(e=>e.hasResult())&&(n=n.map(e=>e.hasResult()?new fe(e.source,0):e));for(let n of e.effects)n.is(M2)&&(t=t&&t.setSelected(n.value,this.id));return n==this.active&&t==this.open?this:new _i(n,this.id,t)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?U6:P2}}function hp(e,t){if(e==t)return!0;for(let n=0,s=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}const I2=[];function z2(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(di);if(n&&t.activateOnCompletion(n))return 4|8}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?4|1:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class fe{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let s=z2(e,t),n=this;(s&8||s&16&&this.touches(e))&&(n=new fe(n.source,0)),s&4&&n.state==0&&(n=new fe(this.source,1)),n=n.updateFor(e,s);for(let t of e.effects)if(t.is(bo))n=new fe(n.source,1,t.value);else if(t.is(rn))n=new fe(n.source,0);else if(t.is(Si))for(let e of t.value)e.source==n.source&&(n=e);return n}updateFor(e){return this.map(e.changes)}map(){return this}touches(e){return e.changes.touchesRange(mt(e.state))}}class cn extends fe{constructor(e,t,n,s,o,i){super(e,3,t),this.limit=n,this.result=s,this.from=o,this.to=i}hasResult(){return!0}updateFor(e,t){var o;if(!(t&3))return this.map(e.changes);let n=this.result;n.map&&!e.changes.empty&&(n=n.map(n,e.changes));let i=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=mt(e.state);if(a>s||!n||t&2&&(mt(e.startState)==this.from||ae.map(t))}}),M2=d.define(),Y=N.define({create(){return _i.start()},update(e,t){return e.update(t)},provide:e=>[vr.from(e,e=>e.tooltip),o.contentAttributes.from(e,e=>e.attrs)]});function Ni(e,t){const s=t.completion.apply||t.completion.label;let n=e.state.field(Y).active.find(e=>e.source==t.source);return n instanceof cn&&(typeof s=="string"?e.dispatch(Object.assign(Object.assign({},S3(e.state,s,n.from,n.to)),{annotations:di.of(t.completion)})):s(e,t.completion,n.from,n.to),!0)}const G2=K2(Y,Ni);function no(e,t="option"){return n=>{let s=n.state.field(Y,!1);if(!s||!s.open||s.open.disabled||Date.now()-s.open.timestamp-1?s.open.selected+r*(e?1:-1):e?0:i-1;return o<0?o=t=="page"?0:i-1:o>=i&&(o=t=="page"?i-1:0),n.dispatch({effects:M2.of(o)}),!0}}const Q2=e=>{let t=e.state.field(Y,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp{let t=e.state.field(Y,!1);return!!t&&(e.dispatch({effects:bo.of(!0)}),!0)},J2=e=>{let t=e.state.field(Y,!1);return!!t&&!!t.active.some(e=>e.state!=0)&&(e.dispatch({effects:rn.of(null)}),!0)};class e3{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const t3=50,n3=1e3,s3=k.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Y).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Y),n=e.state.facet(T);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Y)==t)return;let s=e.transactions.some(e=>{let t=z2(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let n=0;nt3&&Date.now()-t.time>n3){for(let e of t.context.abortListeners)try{e()}catch(e){K(this.view.state,e)}t.context.abortListeners=null,this.running.splice(n--,1)}else t.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(bo)))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),o):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Y);for(let t of e.active)t.isPending&&!this.running.some(e=>e.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(T).updateSyncTime))}startQuery(e){let{state:n}=this.view,o=mt(n),s=new si(n,o,e.explicit,this.view),t=new e3(e,s);this.running.push(t),Promise.resolve(e.source(s)).then(e=>{t.context.aborted||(t.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:rn.of(null)}),K(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(T).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],s=this.view.state.facet(T),n=this.view.state.field(Y);for(let i=0;ie.source==o.active.source);if(a&&a.isPending)if(o.done==null){let t=new fe(o.active.source,0);for(let e of o.updates)t=t.update(e,s);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Si.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Y,!1);if(t&&t.tooltip&&this.view.state.facet(T).closeOnBlur){let n=t.open&&Oc(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:rn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:bo.of(!1)}),20),this.composing=0}}}),o3=typeof navigator=="object"&&/Win/.test(navigator.platform),i3=Ue.highest(o.domEventHandlers({keydown(e,t){let n=t.state.field(Y,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(o3&&e.altKey)||e.metaKey)return!1;let s=n.open.options[n.open.selected],i=n.active.find(e=>e.source==s.source),o=s.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&Ni(t,s),!1}})),A2=o.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class r3{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class k2{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,L.TrackDel),n=e.mapPos(this.to,1,L.TrackDel);return t==null||n==null?null:new k2(this.field,t,n)}}class E2{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],o=e.doc.lineAt(t),i=/^\s*/.exec(o.text)[0];for(let o of this.lines){if(n.length){let n=i,a=/^\t*/.exec(o)[0].length;for(let t=0;tnew k2(e.field,s[e.line]+e.from,s[e.line]+e.to));return{text:n,ranges:a}}static parse(e){let n=[],s=[],o=[],t;for(let i of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(i);){let e=t[1]?+t[1]:null,c=t[2]||t[3]||"",a=-1,r=c.replace(/\\[{}]/g,e=>e[1]);for(let t=0;t=a&&e.field++}o.push(new r3(a,s.length,t.index,t.index+r.length)),i=i.slice(0,t.index)+c+i.slice(t.index+t[0].length)}i=i.replace(/\\([{}])/g,(e,t,n)=>{for(let e of o)e.line==s.length&&e.from>n&&(e.from--,e.to--);return t}),s.push(i)}return new E2(s,o)}}let d3=c.widget({widget:new class extends We{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),u3=c.mark({class:"cm-snippetField"});class fn{constructor(e,t){this.ranges=e,this.active=t,this.deco=c.set(e.map(e=>(e.from==e.to?d3:u3).range(e.from,e.to)))}map(e){let t=[];for(let s of this.ranges){let n=s.map(e);if(!n)return null;t.push(n)}return new fn(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const jn=d.define({map(e,t){return e&&e.map(t)}}),f3=d.define(),yn=N.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(jn))return n.value;if(n.is(f3)&&e)return new fn(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>o.decorations.from(e,e=>e?e.deco:c.none)});function ea(e,n){return t.create(e.filter(e=>e.field==n).map(e=>t.range(e.from,e.to)))}function v3(e){let t=E2.parse(e);return(e,n,s,o)=>{let{text:r,ranges:i}=t.instantiate(e.state,s),a={changes:{from:s,to:o,insert:f.of(r)},scrollIntoView:!0,annotations:n?[di.of(n),S.userEvent.of("input.complete")]:void 0};if(i.length&&(a.selection=ea(i,0)),i.some(e=>e.field>0)){let t=new fn(i,0),n=a.effects=[jn.of(t)];e.state.field(yn,!1)===void 0&&n.push(d.appendConfig.of([yn,x3,E3,A2]))}e.dispatch(e.state.update(a))}}function O2(e){return({state:t,dispatch:n})=>{let s=t.field(yn,!1);if(!s||e<0&&s.active==0)return!1;let o=s.active+e,i=e>0&&!s.ranges.some(t=>t.field==o+e);return n(t.update({selection:ea(s.ranges,o),effects:jn.of(i?null:new fn(s.ranges,o)),scrollIntoView:!0})),!0}}const j3=({state:e,dispatch:t})=>{let n=e.field(yn,!1);return!!n&&(t(e.update({effects:jn.of(null)})),!0)},y3=O2(1),_3=O2(-1),w3=[{key:"Tab",run:y3,shift:_3},{key:"Escape",run:j3}],w2=a.define({combine(e){return e.length?e[0]:w3}}),x3=Ue.highest(xt.compute([w2],e=>e.facet(w2)));function x(e,t){return Object.assign(Object.assign({},t),{apply:v3(e)})}const E3=o.domEventHandlers({mousedown(e,t){let n=t.state.field(yn,!1),o;if(!n||(o=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let s=n.ranges.find(e=>e.from<=o&&e.to>=o);return!!s&&s.field!=n.active&&(t.dispatch({selection:ea(n.ranges,s.field),effects:jn.of(n.ranges.some(e=>e.field>s.field)?new fn(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),xn={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ct=d.define({map(e,t){let n=t.mapPos(e,-1,L.TrackAfter);return n??void 0}}),ra=new class extends bt{};ra.startSide=1,ra.endSide=-1;const f2=N.define({create(){return m.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(ct)&&(e=e.update({add:[ra.range(n.value,n.value+1)]}));return e}});function F3(){return[L3,f2]}const ca="()[]{}<>";function c2(e){for(let t=0;t{if((N3?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(s.length>2||s.length==2&&re(D(s,0))==1||t!=o.from||n!=o.to)return!1;let i=H3(e.state,s);return!!i&&(e.dispatch(i),!0)}),R3=({state:e,dispatch:n})=>{if(e.readOnly)return!1;let o=a2(e,e.selection.main.head),i=o.brackets||xn.brackets,s=null,a=e.changeByRange(n=>{if(n.empty){let s=V3(e.doc,n.head);for(let o of i)if(o==s&&$s(e.doc,n.head)==c2(D(o,0)))return{changes:{from:n.head-o.length,to:n.head+o.length},range:t.cursor(n.head-o.length)}}return{range:s=n}});return s||n(e.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},P3=[{key:"Backspace",run:R3}];function H3(e,t){let n=a2(e,e.selection.main.head),s=n.brackets||xn.brackets;for(let o of s){let i=c2(D(o,0));if(t==o)return i==o?U3(e,o,s.indexOf(o+o+o)>-1,n):$3(e,o,i,n.before||xn.before);if(t==i&&i2(e,e.selection.main.from))return W3(e,o,i)}return null}function i2(e,t){let n=!1;return e.field(f2).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $s(e,t){let n=e.sliceString(t,t+2);return n.slice(0,re(D(n,0)))}function V3(e,t){let n=e.sliceString(t-2,t);return re(D(n,0))==n.length?n:n.slice(1)}function $3(e,n,s,o){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:n,from:a.from},{insert:s,from:a.to}],effects:ct.of(a.to+n.length),range:t.range(a.anchor+n.length,a.head+n.length)};let r=$s(e.doc,a.head);return!r||/\s/.test(r)||o.indexOf(r)>-1?{changes:{insert:n+s,from:a.head},effects:ct.of(a.head+n.length),range:t.cursor(a.head+n.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function W3(e,n,s){let o=null,i=e.changeByRange(n=>n.empty&&$s(e.doc,n.head)==s?{changes:{from:n.head,to:n.head+s.length,insert:s},range:t.cursor(n.head+s.length)}:o={range:n});return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function U3(e,n,s,o){let i=o.stringPrefixes||xn.stringPrefixes,a=null,r=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:ct.of(o.to+n.length),range:t.range(o.anchor+n.length,o.head+n.length)};let r=o.head,c=$s(e.doc,r),l;if(c==n){{if(o2(e,r))return{changes:{insert:n+n,from:r},effects:ct.of(r+n.length),range:t.cursor(r+n.length)};if(i2(e,r)){let i=s&&e.sliceDoc(r,r+n.length*3)==n+n+n,o=i?n+n+n:n;return{changes:{from:r,to:r+o.length,insert:o},range:t.cursor(r+o.length)}}}}else if(s&&e.sliceDoc(r-2*n.length,r)==n+n&&(l=s2(e,r-2*n.length,i))>-1&&o2(e,l))return{changes:{insert:n+n+n+n,from:r},effects:ct.of(r+n.length),range:t.cursor(r+n.length)};else if(e.charCategorizer(r)(c)!=O.Word&&s2(e,r,i)>-1&&!q3(e,r,n,i))return{changes:{insert:n+n,from:r},effects:ct.of(r+n.length),range:t.cursor(r+n.length)};return{range:a=o}});return a?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function o2(e,t){let n=g(e).resolveInner(t+1);return n.parent&&n.from==t}function q3(e,t,n,s){let o=g(e).resolveInner(t,-1),i=s.reduce((e,t)=>Math.max(e,t.length),0);for(let r=0;r<5;r++){let c=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),a=c.indexOf(n);if(!a||a>-1&&s.indexOf(c.slice(0,a))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}function s2(e,t,n){let s=e.charCategorizer(t);if(s(e.sliceDoc(t-1,t))!=O.Word)return t;for(let i of n){let o=t-i.length;if(e.sliceDoc(o,t)==i&&s(e.sliceDoc(o-1,o))!=O.Word)return o}return-1}function n2(e={}){return[i3,Y,T.of(e),s3,Q3,A2]}const t2=[{key:"Ctrl-Space",run:S2},{mac:"Alt-`",run:S2},{key:"Escape",run:J2},{key:"ArrowDown",run:no(!0)},{key:"ArrowUp",run:no(!1)},{key:"PageDown",run:no(!0,"page")},{key:"PageUp",run:no(!1,"page")},{key:"Enter",run:Q2}],Q3=Ue.highest(xt.computeN([T],e=>e.facet(T).defaultKeymap?[t2]:[]));class Z3{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class kt{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=e,o=n.facet(Dn).markerFilter;o&&(s=o(s,n));let i=c.set(s.map(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?c.widget({widget:new vh(e),diagnostic:e}).range(e.from):c.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to)),!0);return new kt(i,t,Mt(i))}}function Mt(e,t=null,n=0){let s=null;return e.between(n,1e9,(e,n,{spec:o})=>{if(t&&o.diagnostic!=t)return;return s=new Z3(e,n,o.diagnostic),!1}),s}function th(e,t){let n=t.pos,s=t.end||n,o=e.state.facet(Dn).hideOn(e,n,s);if(o!=null)return o;let i=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(G0))||e.changes.touchesRange(i.from,Math.max(i.to,s)))}function nh(e,t){return e.field(J,!1)?t:t.concat(d.appendConfig.of(Oh))}const G0=d.define(),va=d.define(),Y0=d.define(),J=N.define({create(){return new kt(c.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),o=null,s=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);o=Mt(n,e.selected.diagnostic,s)||Mt(n,null,s)}!n.size&&s&&t.state.facet(Dn).autoPanel&&(s=null),e=new kt(n,s,o)}for(let n of t.effects)if(n.is(G0)){let s=t.state.facet(Dn).autoPanel?n.value.length?Rs.open:null:e.panel;e=kt.init(n.value,s,t.state)}else n.is(va)?e=new kt(e.diagnostics,n.value?Rs.open:null,e.selected):n.is(Y0)&&(e=new kt(e.diagnostics,e.panel,n.value));return e},provide:e=>[Rn.from(e,e=>e.panel),o.decorations.from(e,e=>e.diagnostics)]}),rh=c.mark({class:"cm-lintRange cm-lintRange-active"});function ch(e,t,n){let{diagnostics:r}=e.state.field(J),s=[],o=2e8,i=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,a,{spec:r})=>{t>=e&&t<=a&&(e==a||(t>e||n>0)&&(tW0(e,t,!1)))}const dh=e=>{let t=e.state.field(J,!1);(!t||!t.panel)&&e.dispatch({effects:nh(e.state,[va.of(!0)])});let n=zn(e,Rs.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},q0=e=>{let t=e.state.field(J,!1);return!!t&&!!t.panel&&(e.dispatch({effects:va.of(!1)}),!0)},hh=e=>{let n=e.state.field(J,!1);if(!n)return!1;let s=e.state.selection.main,t=n.diagnostics.iter(s.to+1);return!(!t.value&&(t=n.diagnostics.iter(0),!t.value||t.from==s.from&&t.to==s.to))&&(e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),!0)},mh=[{key:"Mod-Shift-m",run:dh,preventDefault:!0},{key:"F8",run:hh}],Dn=a.define({combine(e){return Object.assign({sources:e.map(e=>e.source).filter(e=>e!=null)},ye(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function U0(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==s.toLowerCase())){t.push(s);continue actions}}t.push("")}return t}function W0(e,t,n){var s;let o=n?U0(t.actions):[];return y("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},y("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(s=t.actions)===null||s===void 0?void 0:s.map((n,s)=>{let r=!1,c=s=>{if(s.preventDefault(),r)return;r=!0;let o=Mt(e.state.field(J).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:i}=n,a=o[s]?i.indexOf(o[s]):-1,l=a<0?i:[i.slice(0,a),y("u",i.slice(a,a+1)),i.slice(a+1)];return y("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${i}${a<0?"":` (access key "${o[s]})"`}.`},l)}),t.source&&y("div",{class:"cm-diagnosticSource"},t.source))}class vh extends We{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return y("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class V0{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=W0(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Rs{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)q0(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){{let{diagnostic:n}=this.items[this.selectedIndex],s=U0(n.actions);for(let o=0;o{for(let t=0;tq0(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(J).selected;if(!e)return-1;for(let t=0;t{let c=-1,r;for(let t=e;te&&(this.items.splice(e,c-e),t=!0)),s&&r.diagnostic==s.diagnostic?r.dom.hasAttribute("aria-selected")||(r.dom.setAttribute("aria-selected","true"),n=r):r.dom.hasAttribute("aria-selected")&&r.dom.removeAttribute("aria-selected"),e++});e({sel:n.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),t&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(J),t=Mt(n.diagnostics,this.items[e].diagnostic);if(!t)return;this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Y0.of(t)})}static open(e){return new Rs(e)}}function yh(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function Ls(e){return yh(``,`width="6" height="3"`)}const wh=o.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ls("#d11")},".cm-lintRange-warning":{backgroundImage:Ls("orange")},".cm-lintRange-info":{backgroundImage:Ls("#999")},".cm-lintRange-hint":{backgroundImage:Ls("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Oh=[J,o.decorations.compute([J],e=>{let{selected:t,panel:n}=e.field(J);return!t||!n||t.from==t.to?c.none:c.set([rh.range(t.from,t.to)])}),u9(ch,{hideOn:th}),wh],xh=(()=>[tc(),N9(),Ml(),Iu(),Ap(),Vg(),W5(),h.allowMultipleSelections.of(!0),fg(),Qd(wp,{fallback:!0}),du(),F3(),n2(),Y7(),gv(),_7(),um(),xt.of([...P3,...W4,...e2,...i1,...Pp,...t2,...mh])])();class wa{constructor(e,t,n,s,o,i,a,r,c,l=0,d){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=r,this.curContext=c,this.lookAhead=l,this.parent=d}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new wa(e,[],t,n,n,0,[],0,s?new I0(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let r=e>>19,t=e&65535,{parser:s}=this.p,c=this.reducePos=2e3&&!((a=this.p.parser.nodeSet.types[t])===null||a===void 0?void 0:a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=i):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(t,o)}storeNode(e,t,n,s=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&e.buffer[s-4]==0&&e.buffer[s-1]>-1){if(t==n)return;if(e.buffer[s-2]>=t){e.buffer[s-2]=n;return}}}if(!o||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let i=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}else this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4)}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let s=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new wa(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new kh(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let n=[];for(let s=0,o;st&1&&e==s)||n.push(t[e],s)}t=n}let n=[];for(let s=0;s>19,o=e&65535,n=this.stack.length-s*3;if(n<0||t.getGoto(this.stack[n],o,!1)<0){let t=this.findForcedReduction();if(t==null)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,o)=>{if(t.includes(s))return;return t.push(s),e.allActions(s,t=>{if(t&(262144|131072));else if(t&65536){{let n=(t>>19)-o;if(n>1){let s=t&65535,o=this.stack.length-n*3;if(o>=0&&e.getGoto(this.stack[o],s,!1)>=0)return n<<19|65536|s}}}else{let e=n(t,o+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class I0{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class kh{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class Oa{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Oa(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Oa(this.stack,this.pos,this.index)}}function Nn(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let o=0,i=0;o=92&&t--,t>=34&&t--;let n=t-32;if(n>=46&&(n-=46,i=!0),s+=n,i)break;s*=46}n?n[i++]=s:n=new t(s)}return n}class Ts{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const D0=new Ts;class Th{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=D0,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,o=this.rangeIndex,s=this.pos+e;for(;sn.to:s>=n.to;){if(o==this.ranges.length-1)return null;let e=this.ranges[++o];s+=e.from-n.to,n=e}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let s=this.chunkOff+e,t,n;if(s>=0&&s=this.chunk2Pos&&te.to&&(this.chunk2=this.chunk2.slice(0,e.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=D0,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class Yt{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;k0(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}Yt.prototype.contextual=Yt.prototype.fallback=Yt.prototype.extend=!1;class ks{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?Nn(e):e}token(e,t){let s=e.pos,n=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(k0(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||n++,s==null)break;e.reset(s,e.token)}n&&(e.reset(s,e.token),e.acceptToken(this.elseToken,n))}}ks.prototype.contextual=Yt.prototype.fallback=Yt.prototype.extend=!1;class C{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function k0(e,t,n,s,o,i){let a=0,r=1<0){let s=e[n];if(c.allows(s)&&(t.token.value==-1||t.token.value==s||Ph(s,t.token.value,o,i))){t.acceptToken(s);break}}let d=t.next,l=0,n=e[a+2];if(t.next<0&&n>l&&e[s+n*3-3]==65535){a=e[s+n*3-1];continue scan}for(;l>1,i=s+o+(o<<1),r=e[i],c=e[i+1]||65536;if(d=c)l=o+1;else{a=e[i+2],t.advance();continue scan}}break}}function E0(e,t,n){for(let s=t,o;(o=e[s])!=65535;s++)if(o==n)return s-t;return-1}function Ph(e,t,n,s){let o=E0(n,s,t);return o<0||E0(n,s,e)t)&&!s.type.isError)return n<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(e.length,Math.max(s.from+1,t+25));if(n<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return n<0?0:e.length}}let Vh=class FragmentCursor{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?y0(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?y0(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=t,null;if(n instanceof p){if(t==e){if(t=Math.max(this.safeFrom,e)&&(this.trees.push(n),this.start.push(t),this.index.push(0))}else this.index[s]++,this.nextStart=t+n.length}}};class $h{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new Ts)}getActions(e){let n=0,t=null,{parser:i}=e.p,{tokenizers:a}=i,o=i.stateSlot(e.state,3),r=e.curContext?e.curContext.hash:0,s=0;for(let c=0;ci.end+25&&(s=Math.max(i.lookAhead,s)),i.value!=0){let s=n;if(i.extended>-1&&(n=this.addActions(e,i.extended,i.end,n)),n=this.addActions(e,i.value,i.end,n),!l.extend&&(t=i,n>s))break}}for(;this.actions.length>n;)this.actions.pop();return s&&e.setLookAhead(s),!t&&e.pos==this.stream.end&&(t=new Ts,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,n=this.addActions(e,t.value,t.end,n)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Ts,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){{let{parser:t}=n.p;for(let s=0;s=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,n,s){for(let t=0;te.bufferLength*4?new Vh(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let n=this.stacks,s=this.minStackPos,e=this.stacks=[],t,o;if(this.bigReductionCount>300&&n.length==1){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;as)e.push(i);else if(this.advanceStack(i,e,n))continue;else{t||(t=[],o=[]),t.push(i);let e=this.tokens.getMainToken(i);o.push(e.value,e.end)}break}}if(!e.length){let e=t&&Qh(t);if(e)return Q&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Q&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+s);this.recovering||(this.recovering=5)}if(this.recovering&&t){let n=this.stoppedAt!=null&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,o,e);if(n)return Q&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let t=this.recovering==1?1:this.recovering*3;if(e.length>t)for(e.sort((e,t)=>t.score-e.score);e.length>t;)e.pop();e.some(e=>e.reducePos>s)&&this.recovering--}else if(e.length>1){outer:for(let t=0;t500&&o.buffer.length>500)if((n.score-o.score||n.buffer.length-o.buffer.length)>0)e.splice(s--,1);else{e.splice(t--,1);continue outer}}}e.length>12&&e.splice(12,e.length-12)}this.minStackPos=e[0].pos;for(let t=1;t ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(l.contextHash)||0)==n))return e.useNode(o,r),Q&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(o.type.id)})`),!0;if(!(o instanceof p)||o.children.length==0||o.positions[0]>0)break;let c=o.children[0];if(c instanceof p&&o.positions[0]==0)o=c;else break}}let r=s.stateSlot(e.state,4);if(r>0)return e.reduce(r),Q&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(r&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let c=0;ci?t.push(r):n.push(r)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return j0(e,t),!0}}runRecovery(e,t,n){let s=null,o=!1;for(let a=0;a ":"";if(i.deadEnd){if(o)continue;o=!0,i.restart(),Q&&console.log(c+this.stackID(i)+" (restarted)");let e=this.advanceFully(i,n);if(e)continue}let l=i.split(),u=c;for(let e=0;l.forceReduce()&&e<10;e++){Q&&console.log(u+this.stackID(l)+" (via force-reduce)");let t=this.advanceFully(l,n);if(t)break;Q&&(u=this.stackID(l)+" -> ")}for(let e of i.recoverByInsert(r))Q&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>i.pos?(d==i.pos&&(d++,r=0),i.recoverByDelete(r,d),Q&&console.log(c+this.stackID(i)+` (via recover-delete ${this.parser.getName(r)})`),j0(i,n)):(!s||s.scoree;class Yn{constructor(e){this.start=e.start,this.shift=e.shift||br,this.reduce=e.reduce||br,this.reuse=e.reuse||br,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ke extends ur{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1]),n=[];for(let e=0;e=0)s(o,n,t[e++]);else{let i=t[e+-o];for(let a=-o;a>0;a--)s(t[e++],n,i);e++}}}this.nodeSet=new ls(t.map((t,s)=>F.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:n[s],top:o.indexOf(s)>-1,error:s==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=ac;let i=Nn(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;etypeof e=="number"?new Yt(i,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let s=new Wh(this,e,t,n);for(let o of this.wrappers)s=o(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let o=s[t+1];;){let i=s[o++],a=i&1,r=s[o++];if(a&&n)return r;for(let t=o+(i>>1);o0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let s=this.stateSlot(e,4),n=s?t(s):void 0;for(let s=this.stateSlot(e,1);n==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Me(this.data,s+2);else break;n=t(Me(this.data,s+1))}return n}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Me(this.data,n+2);else break;if((this.data[n+2]&65536>>16)==0){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(ke.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let o=e.specializers.find(e=>e.from==n.external);if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[s]=p0(i),i})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let o of e.split(" ")){let s=t.indexOf(o);s>=0&&(n[s]=!0)}let s=null;for(let e=0;es)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,s)<<1|t}return e.get}const Jh=312,m0=1,tm=2,nm=3,sm=4,om=313,im=315,am=316,rm=5,cm=6,lm=0,Rr=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],u0=125,hm=59,Hr=47,fm=42,pm=43,gm=45,vm=60,bm=44,jm=63,ym=46,_m=new Yn({start:!1,shift(e,t){return t==rm||t==cm||t==im?e:t==am},strict:!1}),wm=new C((e,t)=>{let{next:n}=e;(n==u0||n==-1||t.context)&&e.acceptToken(om)},{contextual:!0,fallback:!0}),Om=new C((e,t)=>{let{next:n}=e,s;if(Rr.indexOf(n)>-1)return;if(n==Hr&&((s=e.peek(1))==Hr||s==fm))return;n!=u0&&n!=hm&&n!=-1&&!t.context&&e.acceptToken(Jh)},{contextual:!0}),xm=new C((e,t)=>{let{next:n}=e;if(n==pm||n==gm){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(m0);e.acceptToken(n?m0:tm)}}else n==jm&&e.peek(1)==ym&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(nm))},{contextual:!0});function Br(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}const Em=new C((e,t)=>{if(e.next!=vm||!t.dialectEnabled(lm))return;if(e.advance(),e.next==Hr)return;let n=0;for(;Rr.indexOf(e.next)>-1;)e.advance(),n++;if(Br(e.next,!0)){for(e.advance(),n++;Br(e.next,!1);)e.advance(),n++;for(;Rr.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==bm)return;for(let t=0;;t++){if(t==7){if(!Br(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),n++}}e.acceptToken(sm,-n)}),km=de({"get set async static":e.modifier,"for while do if else switch try catch finally return throw break continue default case":e.controlKeyword,"in of await yield void typeof delete instanceof":e.operatorKeyword,"let var const using function class extends":e.definitionKeyword,"import export from":e.moduleKeyword,"with debugger as new":e.keyword,TemplateString:e.special(e.string),super:e.atom,BooleanLiteral:e.bool,this:e.self,null:e.null,Star:e.modifier,VariableName:e.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":e.function(e.variableName),VariableDefinition:e.definition(e.variableName),Label:e.labelName,PropertyName:e.propertyName,PrivatePropertyName:e.special(e.propertyName),"CallExpression/MemberExpression/PropertyName":e.function(e.propertyName),"FunctionDeclaration/VariableDefinition":e.function(e.definition(e.variableName)),"ClassDeclaration/VariableDefinition":e.definition(e.className),PropertyDefinition:e.definition(e.propertyName),PrivatePropertyDefinition:e.definition(e.special(e.propertyName)),UpdateOp:e.updateOperator,"LineComment Hashbang":e.lineComment,BlockComment:e.blockComment,Number:e.number,String:e.string,Escape:e.escape,ArithOp:e.arithmeticOperator,LogicOp:e.logicOperator,BitOp:e.bitwiseOperator,CompareOp:e.compareOperator,RegExp:e.regexp,Equals:e.definitionOperator,Arrow:e.function(e.punctuation),": Spread":e.punctuation,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace,"InterpolationStart InterpolationEnd":e.special(e.brace),".":e.derefOperator,", ;":e.separator,"@":e.meta,TypeName:e.typeName,TypeDefinition:e.definition(e.typeName),"type enum interface implements namespace module declare":e.definitionKeyword,"abstract global Privacy readonly override":e.modifier,"is keyof unique infer":e.operatorKeyword,JSXAttributeValue:e.attributeValue,JSXText:e.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":e.angleBracket,"JSXIdentifier JSXNameSpacedName":e.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":e.attributeName,"JSXBuiltin/JSXIdentifier":e.standard(e.tagName)}),Am={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Sm={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Mm={__proto__:null,"<":187},Fm=ke.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[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#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:_m,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,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!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-Am[e]||-1},{term:338,get:e=>Sm[e]||-1},{term:92,get:e=>Mm[e]||-1}],tokenPrec:14749}),c0=[x("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),x("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),x("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),x("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),x("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),x(`try { \${} } catch (\${error}) { \${} @@ -21,11 +21,11 @@ constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),x('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),x('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],zm=c0.concat([x("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),x("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),x("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),r0=new pr,i0=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ts(e){return(t,n)=>{let s=t.node.getChild("VariableDefinition");return s&&n(s,e),!0}}const Rm=["FunctionDeclaration"],Pm={FunctionDeclaration:ts("function"),ClassDeclaration:ts("class"),ClassExpression:()=>!0,EnumDeclaration:ts("constant"),TypeAliasDeclaration:ts("type"),NamespaceDeclaration:ts("namespace"),VariableDefinition(e,t){e.matchContext(Rm)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function n0(e,t){let s=r0.get(t);if(s)return s;let n=[],o=!0;function i(t,s){let o=e.sliceString(t.from,t.to);n.push({label:o,type:s})}return t.cursor(b.IncludeAnonymous).iterate(t=>{if(o)o=!1;else if(t.name){{let e=Pm[t.name];if(e&&e(t,i)||i0.has(t.name))return!1}}else if(t.to-t.from>8192){for(let s of n0(e,t.node))n.push(s);return!1}}),r0.set(t,n),n}const e0=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,U4=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Vm(e){let t=g(e.state).resolveInner(e.pos,-1);if(U4.indexOf(t.name)>-1)return null;let s=t.name=="VariableName"||t.to-t.from<20&&e0.test(e.state.sliceDoc(t.from,t.to));if(!s&&!e.explicit)return null;let n=[];for(let s=t;s;s=s.parent)i0.has(s.name)&&(n=n.concat(n0(e.state.doc,s)));return{options:n,from:s?t.from:e.pos,validFor:e0}}const ge=Ee.define({name:"javascript",parser:Fm.configure({props:[Te.add({IfStatement:Tt({except:/^\s*({|else\b)/}),TryStatement:Tt({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:vg,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),s=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:s?1:2)*e.unit},Block:St({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Tt({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Ce.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":On,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),B4={test:e=>/^JSX/.test(e.name),facet:Ha({commentTokens:{block:{open:"{/*",close:"*/}"}}})},P4=ge.configure({dialect:"ts"},"typescript"),R4=ge.configure({dialect:"jsx",props:[Ra.add(e=>e.isTop?[B4]:void 0)]}),N4=ge.configure({dialect:"jsx ts",props:[Ra.add(e=>e.isTop?[B4]:void 0)]},"typescript");let D4=e=>({label:e,type:"keyword"});const z4="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(D4),Xm=z4.concat(["declare","implements","private","protected","public"].map(D4));function T4(e={}){let t=e.jsx?e.typescript?N4:R4:e.typescript?P4:ge,n=e.typescript?zm.concat(Xm):c0.concat(z4);return new We(t,[ge.data.of({autocomplete:h2(U4,ai(n))}),ge.data.of({autocomplete:Vm}),e.jsx?t8:[]])}function Zm(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function F4(e,t,n=e.length){for(let s=t?.firstChild;s;s=s.nextSibling)if(s.name=="JSXIdentifier"||s.name=="JSXBuiltin"||s.name=="JSXNamespacedName"||s.name=="JSXMemberExpression")return e.sliceString(s.from,Math.min(s.to,n));return""}const e8=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),t8=o.inputHandler.of((e,n,s,o,i)=>{if((e8?e.composing:e.compositionStarted)||e.state.readOnly||n!=s||o!=">"&&o!="/"||!ge.isActiveAt(e.state,n,-1))return!1;let r=i(),{state:a}=r,c=a.changeByRange(e=>{var r;let{head:n}=e,s=g(a).resolveInner(n-1,-1),i;if(s.name=="JSXStartTag"&&(s=s.parent),a.doc.sliceString(n-1,n)!=o||s.name=="JSXAttributeValue"&&s.to>n);else if(o==">"&&s.name=="JSXFragmentTag")return{range:e,changes:{from:n,insert:``}};else if(o=="/"&&s.name=="JSXStartCloseTag"){{let o=s.parent,e=o.parent;if(e&&o.from==n-2&&((i=F4(a.doc,e.firstChild,n))||((r=e.firstChild)===null||r===void 0?void 0:r.name)=="JSXFragmentTag")){let e=`${i}>`;return{range:t.cursor(n+e.length,-1),changes:{from:n,insert:e}}}}}else if(o==">"){let t=Zm(s);if(t&&t.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(n,n+2))&&(i=F4(a.doc,t,n)))return{range:e,changes:{from:n,insert:``}}}return{range:e}});return!c.changes.empty&&(e.dispatch([r,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),n8=fe({String:e.string,Number:e.number,"True False":e.bool,PropertyName:e.propertyName,Null:e.null,",":e.separator,"[ ]":e.squareBracket,"{ }":e.brace}),s8=xe.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[n8],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),o8=Ee.define({name:"json",parser:s8.configure({props:[Te.add({Object:Tt({except:/^\s*\}/}),Array:Tt({except:/^\s*\]/})}),Ce.add({"Object Array":On})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[}\]]$/}});function i8(){return new We(o8)}const a8=99,M4=1,c8=100,l8=101,A4=2,k4=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],h8=58,m8=40,x4=95,p8=91,is=45,v8=46,b8=35,j8=37,y8=38,_8=92,w8=10;function ns(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function _4(e){return e>=48&&e<=57}const C8=new C((e,t)=>{for(let s=!1,o=0,i=0;;i++){let{next:n}=e;if(ns(n)||n==is||n==x4||s&&_4(n))!s&&(n!=is||i>0)&&(s=!0),o===i&&n==is&&o++,e.advance();else if(n==_8&&e.peek(1)!=w8)e.advance(),e.next>-1&&e.advance(),s=!0;else{s&&e.acceptToken(n==m8?c8:o==2&&t.canShift(A4)?A4:l8);break}}}),E8=new C(e=>{if(k4.includes(e.peek(-1))){let{next:t}=e;(ns(t)||t==x4||t==b8||t==v8||t==p8||t==h8&&ns(e.peek(1))||t==is||t==y8)&&e.acceptToken(a8)}}),k8=new C(e=>{if(!k4.includes(e.peek(-1))){let{next:t}=e;if(t==j8&&(e.advance(),e.acceptToken(M4)),ns(t)){do e.advance();while(ns(e.next)||_4(e.next))e.acceptToken(M4)}}}),A8=fe({"AtKeyword import charset namespace keyframes media supports":e.definitionKeyword,"from to selector":e.keyword,NamespaceName:e.namespace,KeyframeName:e.labelName,KeyframeRangeName:e.operatorKeyword,TagName:e.tagName,ClassName:e.className,PseudoClassName:e.constant(e.className),IdName:e.labelName,"FeatureName PropertyName":e.propertyName,AttributeName:e.attributeName,NumberLiteral:e.number,KeywordQuery:e.keyword,UnaryQueryOp:e.operatorKeyword,"CallTag ValueName":e.atom,VariableName:e.variableName,Callee:e.operatorKeyword,Unit:e.unit,"UniversalSelector NestingSelector":e.definitionOperator,MatchOp:e.compareOperator,"ChildOp SiblingOp, LogicOp":e.logicOperator,BinOp:e.arithmeticOperator,Important:e.modifier,Comment:e.blockComment,ColorLiteral:e.color,"ParenthesizedContent StringLiteral":e.string,":":e.punctuation,"PseudoOp #":e.derefOperator,"; ,":e.separator,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace}),S8={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},M8={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},F8={__proto__:null,not:132,only:132},T8=xe.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQ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q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[E8,k8,C8,1,2,3,4,new As("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:e=>S8[e]||-1},{term:58,get:e=>M8[e]||-1},{term:101,get:e=>F8[e]||-1}],tokenPrec:1200});let Br=null;function Nr(){if(!Br&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let s in e)s!="cssText"&&s!="cssFloat"&&typeof e[s]=="string"&&(/[A-Z]/.test(s)&&(s=s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(s)||(t.push(s),n.add(s)));Br=t.sort().map(e=>({type:"property",label:e}))}return Br||[]}const m4=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),h4=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),R8=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),Xe=/^(\w[\w-]*|-\w[\w-]*|)$/,H8=/^-(-[\w-]*)?$/;function I8(e,t){var s;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let n=(s=e.parent)===null||s===void 0?void 0:s.firstChild;return n?.name=="Callee"&&t.sliceString(n.from,n.to)=="var"}const u4=new pr,V8=["Declaration"];function $8(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function d4(e,t,n){if(t.to-t.from>4096){let i=u4.get(t);if(i)return i;let s=[],a=new Set,o=t.cursor(b.IncludeAnonymous);if(o.firstChild())do for(let t of d4(e,o.node,n))a.has(t.label)||(a.add(t.label),s.push(t));while(o.nextSibling())return u4.set(t,s),s}let s=[],o=new Set;return t.cursor().iterate(t=>{var i;if(n(t)&&t.matchContext(V8)&&((i=t.node.nextSibling)===null||i===void 0?void 0:i.name)==":"){let n=e.sliceString(t.from,t.to);o.has(n)||(o.add(n),s.push({label:n,type:"variable"}))}}),s}const U8=e=>t=>{let{state:i,pos:s}=t,n=g(i).resolveInner(s,-1),r=n.type.isError&&n.from==n.to-1&&i.doc.sliceString(n.from,n.to)=="-";if(n.name=="PropertyName"||(r||n.name=="TagName")&&/^(Block|Styles)$/.test(n.resolve(n.to).name))return{from:n.from,options:Nr(),validFor:Xe};if(n.name=="ValueName")return{from:n.from,options:h4,validFor:Xe};if(n.name=="PseudoClassName")return{from:n.from,options:m4,validFor:Xe};if(e(n)||(t.explicit||r)&&I8(n,i.doc))return{from:e(n)||r?n.from:s,options:d4(i.doc,$8(n),e),validFor:H8};if(n.name=="TagName"){for(let{parent:e}=n;e;e=e.parent)if(e.name=="Block")return{from:n.from,options:Nr(),validFor:Xe};return{from:n.from,options:R8,validFor:Xe}}if(!t.explicit)return null;let o=n.resolve(s),a=o.childBefore(s);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:s,options:m4,validFor:Xe}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:s,options:h4,validFor:Xe}:o.name=="Block"||o.name=="Styles"?{from:s,options:Nr(),validFor:Xe}:null},K8=U8(e=>e.name=="VariableName"),ms=Ee.define({name:"css",parser:T8.configure({props:[Te.add({Declaration:Tt()}),Ce.add({"Block KeyframeList":On})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function l4(){return new We(ms,ms.data.of({autocomplete:K8}))}const G8=54,X8=1,Q8=55,Z8=2,J8=56,ef=3,c4=4,nf=5,fs=6,n4=7,t4=8,e4=9,J1=10,df=11,uf=12,hf=13,Fr=57,ff=14,U1=58,W1=20,vf=22,$1=23,jf=24,Mr=26,V1=27,wf=28,Of=31,xf=34,Cf=36,Ef=37,kf=0,Af=1,Sf={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Mf={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},L1={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Tf(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function N1(e){return e==9||e==10||e==13||e==32}let D1=null,z1=null,T1=0;function br(e,t){let o=e.pos+t;if(T1==o&&z1==e)return D1;let n=e.peek(t);for(;N1(n);)n=e.peek(++t);let s="";for(;;){if(!Tf(n))break;s+=String.fromCharCode(n),n=e.peek(++t)}return z1=e,T1=o,D1=s?s.toLowerCase():n==Bf||n==Vf?void 0:null}const F1=60,ws=62,Qa=47,Bf=63,Vf=33,$f=45;function M1(e,t){this.name=e,this.parent=t}const Uf=[fs,J1,n4,t4,e4],Kf=new Kn({start:null,shift(e,t,n,s){return Uf.indexOf(t)>-1?new M1(br(s,1)||"",e):e},reduce(e,t){return t==W1&&e?e.parent:e},reuse(e,t,n,s){let o=t.type.id;return o==fs||o==Cf?new M1(br(s,1)||"",e):e},strict:!1}),qf=new C((e,t)=>{if(e.next!=F1){e.next<0&&t.context&&e.acceptToken(Fr);return}e.advance();let o=e.next==Qa;o&&e.advance();let n=br(e,0);if(n===void 0)return;if(!n)return e.acceptToken(o?ff:fs);let s=t.context?t.context.name:null;if(o){if(n==s)return e.acceptToken(df);if(s&&Mf[s])return e.acceptToken(Fr,-2);if(t.dialectEnabled(kf))return e.acceptToken(uf);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(hf)}else{if(n=="script")return e.acceptToken(n4);if(n=="style")return e.acceptToken(t4);if(n=="textarea")return e.acceptToken(e4);if(Sf.hasOwnProperty(n))return e.acceptToken(J1);s&&L1[s]&&L1[s][n]?e.acceptToken(Fr,-1):e.acceptToken(fs)}},{contextual:!0}),Yf=new C(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(U1);break}if(e.next==$f)t++;else if(e.next==ws&&t>=2){n>=3&&e.acceptToken(U1,-2);break}else t=0;e.advance()}});function Gf(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Xf=new C((e,t)=>{if(e.next==Qa&&e.peek(1)==ws){let n=t.dialectEnabled(Af)||Gf(t.context);e.acceptToken(n?nf:c4,2)}else e.next==ws&&e.acceptToken(c4,1)});function Ua(e,t,n){let s=2+e.length;return new C(o=>{for(let i=0,a=0,r=0;;r++){if(o.next<0){r&&o.acceptToken(t);break}if(i==0&&o.next==F1||i==1&&o.next==Qa||i>=2&&ia?o.acceptToken(t,-a):o.acceptToken(n,-(a-2));break}else if((o.next==10||o.next==13)&&r){o.acceptToken(t,1);break}else i=a=0;o.advance()}})}const Zf=Ua("script",G8,X8),Jf=Ua("style",Q8,Z8),e6=Ua("textarea",J8,ef),t6=fe({"Text RawText":e.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":e.angleBracket,TagName:e.tagName,"MismatchedCloseTag/TagName":[e.tagName,e.invalid],AttributeName:e.attributeName,"AttributeValue UnquotedAttributeValue":e.attributeValue,Is:e.definitionOperator,"EntityReference CharacterReference":e.character,Comment:e.blockComment,ProcessingInst:e.processingInstruction,DoctypeDecl:e.documentMeta}),n6=xe.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z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P$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Kf,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[t6],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP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!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let r=e.type.id;if(r==wf)return $a(e,t,o);if(r==Of)return $a(e,t,i);if(r==xf)return $a(e,t,a);if(r==W1&&s.length){let o=e.node,n=o.firstChild,i=n&&y1(n,t),a;if(i)for(let e of s)if(e.tag==i&&(!e.attrs||e.attrs(a||(a=A1(n,t))))){let t=o.lastChild,s=t.type.id==Ef?t.from:o.to;if(s>n.to)return{parser:e.parser,overlay:[{from:n.to,to:s}]}}}if(n&&r==$1){let s=e.node,o;if(o=s.firstChild){let e=n[t.read(o.from,o.to)];if(e)for(let o of e){if(o.tagName&&o.tagName!=y1(s.parent,t))continue;let n=s.lastChild;if(n.type.id==Mr){{let e=n.from+1,t=n.lastChild,s=n.to-(t&&t.isError?0:1);if(s>e)return{parser:o.parser,overlay:[{from:e,to:s}]}}}else if(n.type.id==V1)return{parser:o.parser,overlay:[{from:n.from,to:n.to}]}}}}return null})}const Hn=["_blank","_self","_top","_parent"],Ea=["ascii","utf-8","utf-16","latin1","latin1"],Oa=["get","post","put","delete"],ba=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],ee=["true","false"],r={},m6={a:{attrs:{href:null,ping:null,type:null,media:null,target:Hn,hreflang:null}},abbr:r,address:r,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:r,aside:r,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:r,base:{attrs:{href:null,target:Hn}},bdi:r,bdo:r,blockquote:{attrs:{cite:null}},body:r,br:r,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ba,formmethod:Oa,formnovalidate:["novalidate"],formtarget:Hn,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:r,center:r,cite:r,code:r,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:r,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:r,div:r,dl:r,dt:r,em:r,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:r,figure:r,footer:r,form:{attrs:{action:null,name:null,"accept-charset":Ea,autocomplete:["on","off"],enctype:ba,method:Oa,novalidate:["novalidate"],target:Hn}},h1:r,h2:r,h3:r,h4:r,h5:r,h6:r,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:r,hgroup:r,hr:r,html:{attrs:{manifest:null}},i:r,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ba,formmethod:Oa,formnovalidate:["novalidate"],formtarget:Hn,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:r,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:r,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:r,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Ea,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:r,noscript:r,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:r,param:{attrs:{name:null,value:null}},pre:r,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:r,rt:r,ruby:r,samp:r,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Ea}},section:r,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:r,source:{attrs:{src:null,type:null,media:null}},span:r,strong:r,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:r,summary:r,sup:r,table:r,tbody:r,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:r,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:r,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:r,time:{attrs:{datetime:null}},title:r,tr:r,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:r,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:r},p1={accesskey:null,class:null,contenteditable:ee,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:ee,autocorrect:ee,autocapitalize:ee,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":ee,"aria-autocomplete":["inline","list","both","none"],"aria-busy":ee,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":ee,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":ee,"aria-hidden":ee,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":ee,"aria-multiselectable":ee,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":ee,"aria-relevant":null,"aria-required":ee,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},l1=("beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload").split(" ").map(e=>"on"+e);for(let e of l1)p1[e]=null;class en{constructor(e,t){this.tags=Object.assign(Object.assign({},m6),e),this.globalAttrs=Object.assign(Object.assign({},p1),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}en.default=new en;function Qt(e,t,n=e.length){if(!t)return"";let o=t.firstChild,s=o&&o.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,n)):""}function Zt(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function r1(e,t,n){let s=n.tags[Qt(e,Zt(t))];return s?.children||n.allTags}function Si(e,t){let n=[];for(let s=Zt(t);s&&!s.type.isTop;s=Zt(s.parent)){let o=Qt(e,s);if(o&&s.lastChild.name=="CloseTag")break;o&&n.indexOf(o)<0&&(t.name=="EndTag"||t.from>=s.firstChild.to)&&n.push(o)}return n}const o1=/^[:\-.\w\u00b7-\uffff]*$/;function s1(e,t,n,s,o){let i=/\s*>/.test(e.sliceDoc(o,o+5))?"":">",a=Zt(n,!0);return{from:s,to:o,options:r1(e.doc,a,t).map(e=>({label:e,type:"type"})).concat(Si(e.doc,n).map((e,t)=>({label:"/"+e,apply:"/"+e+i,type:"type",boost:99-t}))),validFor:/^\/?[:\-.\w\u00b7-\uffff]*$/}}function n1(e,t,n,s){let o=/\s*>/.test(e.sliceDoc(s,s+5))?"":">";return{from:n,to:s,options:Si(e.doc,t).map((e,t)=>({label:e,apply:e+o,type:"type",boost:99-t})),validFor:o1}}function x6(e,t,n,s){let o=[],i=0;for(let s of r1(e.doc,n,t))o.push({label:"<"+s,type:"type"});for(let t of Si(e.doc,n))o.push({label:"",type:"type",boost:99-i++});return{from:s,to:s,options:o,validFor:/^<\/?[:\-.\w\u00b7-\uffff]*$/}}function C6(e,t,n,s,o){let r=Zt(n),i=r?t.tags[Qt(e.doc,r)]:null,a=i&&i.attrs?Object.keys(i.attrs):[],c=i&&i.globalAttrs===!1?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames;return{from:s,to:o,options:c.map(e=>({label:e,type:"property"})),validFor:o1}}function E6(e,t,n,s,o){var i;let a=(i=n.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),c=[],r=void 0;if(a){let l=e.sliceDoc(a.from,a.to),i=t.globalAttrs[l];if(!i){let o=Zt(n),s=o?t.tags[Qt(e.doc,o)]:null;i=s?.attrs&&s.attrs[l]}if(i){let t=e.sliceDoc(s,o).toLowerCase(),n='"',a='"';/^['"]/.test(t)?(r=t[0]=='"'?/^[^"]*$/:/^[^']*$/,n="",a=e.sliceDoc(o,o+1)==t[0]?"":t[0],t=t.slice(1),s++):r=/^[^\s<>='"]*$/;for(let e of i)c.push({label:e,apply:n+e+a,type:"constant"})}}return{from:s,to:o,options:c,validFor:r}}function e1(e,t){let{state:o,pos:s}=t,n=g(o).resolveInner(s,-1),i=n.resolve(s);for(let o=s,t;i==n&&(t=n.childBefore(o));){let e=t.lastChild;if(!e||!e.type.isError||e.frome1(s,e)}const M6=ge.parser.configure({top:"SingleExpression"}),Zu=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:P4.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:R4.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:N4.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:M6},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:ge.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:ms.parser}],Qu=[{name:"style",parser:ms.parser.configure({top:"Styles"})}].concat(l1.map(e=>({name:e,parser:ge.parser}))),Gu=Ee.define({name:"html",parser:n6.configure({props:[Te.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),lo=Gu.configure({wrap:j1(Zu,Qu)});function qu(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=j1((e.nestedLanguages||[]).concat(Zu),(e.nestedAttributes||[]).concat(Qu)));let s=n?Gu.configure({wrap:n,dialect:t}):t?lo.configure({dialect:t}):lo;return new We(s,[lo.data.of({autocomplete:S6(e)}),e.autoCloseTags!==!1?R6:[],T4().support,l4().support])}const Uu=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),R6=o.inputHandler.of((e,n,s,o,i)=>{if(e.composing||e.state.readOnly||n!=s||o!=">"&&o!="/"||!lo.isActiveAt(e.state,n,-1))return!1;let r=i(),{state:a}=r,c=a.changeByRange(e=>{var r,c,l;let d=a.doc.sliceString(e.from-1,e.to)==o,{head:n}=e,i=g(a).resolveInner(n,-1),s;if(d&&o==">"&&i.name=="EndTag"){{let t=i.parent;if(((c=(r=t.parent)===null||r===void 0?void 0:r.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(s=Qt(a.doc,t.parent,n))&&!Uu.has(s)){let t=n+(a.doc.sliceString(n,n+1)===">"?1:0),o=``;return{range:e,changes:{from:n,to:t,insert:o}}}}}else if(d&&o=="/"&&i.name=="IncompleteCloseTag"){let e=i.parent;if(i.from==n-2&&((l=e.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(s=Qt(a.doc,e,n))&&!Uu.has(s)){let o=n+(a.doc.sliceString(n,n+1)===">"?1:0),e=`${s}>`;return{range:t.cursor(n+e.length,-1),changes:{from:n,to:o,insert:e}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([r,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class ki{static create(e,t,n,s,o){let i=s+(s<<8)+e+(t<<4)|0;return new ki(e,t,n,i,o,[],[])}constructor(e,t,n,s,o,i,a){this.type=e,this.value=t,this.from=n,this.hash=s,this.end=o,this.children=i,this.positions=a,this.hashProp=[[l.contextHash,s]]}addChild(e,t){e.prop(l.contextHash)!=this.hash&&(e=new p(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new p(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new p(T.none,e,t,n,this.hashProp)})}}(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(n||(n={}));class I6{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class B6{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return dn(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let s=t;s=t.stack[s.depth+1].value+s.baseIndent)return!0;if(s.indent>=s.baseIndent+4)return!1;let o=(e.type==n.OrderedList?ci:ui)(s,t,!1);return o>0&&(e.type!=n.BulletList||bi(s,t,!1)<0)&&s.text.charCodeAt(s.pos+o-1)==e.value}const Lu={[n.Blockquote](e,t,s){return s.next==62&&(s.markers.push(u(n.QuoteMark,t.lineStart+s.pos,t.lineStart+s.pos+1)),s.moveBase(s.pos+(re(s.text.charCodeAt(s.pos+1))?2:1)),e.end=t.lineStart+s.text.length,!0)},[n.ListItem](e,t,n){return!(n.indent-1)&&(n.moveBaseColumn(n.baseIndent+e.value),!0)},[n.OrderedList]:Ru,[n.BulletList]:Ru,[n.Document](){return!0}};function re(e){return e==32||e==9||e==10||e==13}function dn(e,t=0){for(;tn&&re(e.charCodeAt(t-1));)t--;return t}function Fu(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t-1&&e.depth==t.stack.length?-1:s<3?-1:1}function ku(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function ui(e,t,s){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||re(e.text.charCodeAt(e.pos+1)))&&(!s||ku(t,n.BulletList)||e.skipSpace(e.pos+2)=48&&i<=57)o++;else break;if(o==e.text.length)return-1;i=e.text.charCodeAt(o)}return o==e.pos||o>e.pos+9||i!=46&&i!=41||oe.pos+1||e.next!=49)?-1:o+1-e.pos}function xu(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t6?-1:n}function Ou(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t/,vu=/\?>/,Po=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),uo=Gu.configure({wrap:j1(Zu,Qu)});function qu(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=j1((e.nestedLanguages||[]).concat(Zu),(e.nestedAttributes||[]).concat(Qu)));let s=n?Gu.configure({wrap:n,dialect:t}):t?uo.configure({dialect:t}):uo;return new Le(s,[uo.data.of({autocomplete:M6(e)}),e.autoCloseTags!==!1?P6:[],T4().support,l4().support])}const Uu=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),P6=o.inputHandler.of((e,n,s,o,i)=>{if(e.composing||e.state.readOnly||n!=s||o!=">"&&o!="/"||!uo.isActiveAt(e.state,n,-1))return!1;let r=i(),{state:a}=r,c=a.changeByRange(e=>{var r,c,l;let d=a.doc.sliceString(e.from-1,e.to)==o,{head:n}=e,i=g(a).resolveInner(n,-1),s;if(d&&o==">"&&i.name=="EndTag"){{let t=i.parent;if(((c=(r=t.parent)===null||r===void 0?void 0:r.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(s=$t(a.doc,t.parent,n))&&!Uu.has(s)){let t=n+(a.doc.sliceString(n,n+1)===">"?1:0),o=``;return{range:e,changes:{from:n,to:t,insert:o}}}}}else if(d&&o=="/"&&i.name=="IncompleteCloseTag"){let e=i.parent;if(i.from==n-2&&((l=e.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(s=$t(a.doc,e,n))&&!Uu.has(s)){let o=n+(a.doc.sliceString(n,n+1)===">"?1:0),e=`${s}>`;return{range:t.cursor(n+e.length,-1),changes:{from:n,to:o,insert:e}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([r,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class bi{static create(e,t,n,s,o){let i=s+(s<<8)+e+(t<<4)|0;return new bi(e,t,n,i,o,[],[])}constructor(e,t,n,s,o,i,a){this.type=e,this.value=t,this.from=n,this.hash=s,this.end=o,this.children=i,this.positions=a,this.hashProp=[[l.contextHash,s]]}addChild(e,t){e.prop(l.contextHash)!=this.hash&&(e=new p(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new p(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new p(F.none,e,t,n,this.hashProp)})}}(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(n||(n={}));class B6{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class V6{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return on(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let s=t;s=t.stack[s.depth+1].value+s.baseIndent)return!0;if(s.indent>=s.baseIndent+4)return!1;let o=(e.type==n.OrderedList?Vo:ci)(s,t,!1);return o>0&&(e.type!=n.BulletList||hi(s,t,!1)<0)&&s.text.charCodeAt(s.pos+o-1)==e.value}const Ru={[n.Blockquote](e,t,s){return s.next==62&&(s.markers.push(u(n.QuoteMark,t.lineStart+s.pos,t.lineStart+s.pos+1)),s.moveBase(s.pos+(ie(s.text.charCodeAt(s.pos+1))?2:1)),e.end=t.lineStart+s.text.length,!0)},[n.ListItem](e,t,n){return!(n.indent-1)&&(n.moveBaseColumn(n.baseIndent+e.value),!0)},[n.OrderedList]:Wu,[n.BulletList]:Wu,[n.Document](){return!0}};function ie(e){return e==32||e==9||e==10||e==13}function on(e,t=0){for(;tn&&ie(e.charCodeAt(t-1));)t--;return t}function Fu(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t-1&&e.depth==t.stack.length?-1:s<3?-1:1}function ku(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function ci(e,t,s){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||ie(e.text.charCodeAt(e.pos+1)))&&(!s||ku(t,n.BulletList)||e.skipSpace(e.pos+2)=48&&i<=57)o++;else break;if(o==e.text.length)return-1;i=e.text.charCodeAt(o)}return o==e.pos||o>e.pos+9||i!=46&&i!=41||oe.pos+1||e.next!=49)?-1:o+1-e.pos}function xu(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t6?-1:n}function Ou(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t/,vu=/\?>/,Io=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(a)return e.append(u(n.Comment,s,s+1+a[0].length));let r=/^\?[^]*?\?>/.exec(i);if(r)return e.append(u(n.ProcessingInstruction,s,s+1+r[0].length));let c=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return c?e.append(u(n.HTMLTag,s,s+1+c[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let s=n+1;for(;e.char(s)==t;)s++;let a=e.slice(n-1,n),r=e.slice(s,s+1),o=Mn.test(a),i=Mn.test(r),c=/\s|^$/.test(a),l=/\s|^$/.test(r),d=!l&&(!i||c||o),u=!c&&(!o||l||i),h=d&&(t==42||!u||o),m=u&&(t==42||!d||i);return e.append(new oe(t==95?Ud:Wd,n,s,(h?1:0)|(m?2:0)))},HardBreak(e,t,s){if(t==92&&e.char(s+1)==10)return e.append(u(n.HardBreak,s,s+2));if(t==32){let t=s+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=s+2)return e.append(u(n.HardBreak,s,t+1))}return-1},Link(e,t,n){return t==91?e.append(new oe(Nt,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new oe(ti,n,n+2,1)):-1},LinkEnd(e,t,s){if(t!=93)return-1;for(let o=e.parts.length-1;o>=0;o--){let t=e.parts[o];if(t instanceof oe&&(t.type==Nt||t.type==ti)){if(!t.side||e.skipSpace(t.to)==s&&!/[([]/.test(e.slice(s+1,s+2)))return e.parts[o]=null,-1;let i=e.takeContent(o),a=e.parts[o]=Np(e,i,t.type==Nt?n.Link:n.Image,t.from,s+1);if(t.type==Nt)for(let t=0;tt?u(n.URL,t+s,o+s):o==e.length&&null}function Nd(e,t,s){let o=e.charCodeAt(t);if(o!=39&&o!=34&&o!=40)return!1;let i=o==40?41:o;for(let o=t+1,a=!1;o=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,s,o){return this.append(new oe(e,t,n,(s?1:0)|(o?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof oe&&(t.type==Nt||t.type==ti))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let s=e;s=e;o--){let s=this.parts[o];if(s instanceof oe&&s.side&1&&s.type==t.type&&!(r&&(t.side&1||s.side&2)&&(s.to-s.from+l)%3==0&&((s.to-s.from)%3||l%3))){n=s;break}}if(!n)continue;let d=t.type.resolve,c=[],i=n.from,a=t.to;if(r){let e=Math.min(2,n.to-n.from,l);i=n.to-e,a=t.from+e,d=e==1?"Emphasis":"StrongEmphasis"}n.type.mark&&c.push(this.elt(n.type.mark,i,n.to));for(let e=o+1;e=0;t--){let n=this.parts[t];if(n instanceof oe&&n.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return dn(this.text,e-this.offset)+this.offset}elt(e,t,n,s){return typeof e=="string"?u(this.parser.getNodeType(e),t,n,s):new Xd(e,t)}}function ri(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),s=0;for(let e of t){for(;s(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=` -`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=e+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=t;if(!n.childAfter(s))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(l.contextHash)==e}takeNodes(e){let t=this.cursor,s=this.fragment.offset,l=this.fragmentEnd-(this.fragment.openEnd?1:0),a=e.absoluteLineStart,o=a,i=e.block.children.length,r=o,c=i;for(;;){if(t.to-s>l){if(t.type.isAnonymous&&t.firstChild())continue;break}let a=Td(t.from-s,e.ranges);if(t.to-s<=e.ranges[e.rangeI].to)e.addNode(t.tree,a);else{let s=new p(e.parser.nodeSet.types[n.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(s,t.tree),e.addNode(s,a)}if(t.type.is("Block")&&(Bp.indexOf(t.type.id)<0?(o=t.to-s,i=e.block.children.length):(o=r,i=c,r=t.to-s,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>i;)e.block.children.pop(),e.block.positions.pop();return o-a}}function Td(e,t){let n=e;for(let s=1;sos[e]),Object.keys(os).map(e=>hp[e]),Object.keys(os),mp,Lu,Object.keys(oi).map(e=>oi[e]),Object.keys(oi),[]);function Kp(e,t,n){let s=[];for(let o=e.firstChild,i=t;;o=o.nextSibling){let a=o?o.from:n;if(a>i&&s.push({from:i,to:a}),!o)break;i=o.to}return s}function qp(e){let{codeParser:t,htmlParser:s}=e,o=Bc((e,o)=>{let i=e.type.id;if(t&&(i==n.CodeBlock||i==n.FencedCode)){{let s="";if(i==n.FencedCode){let t=e.node.getChild(n.CodeInfo);t&&(s=o.read(t.from,t.to))}let a=t(s);if(a)return{parser:a,overlay:e=>e.type.id==n.CodeText}}}else if(s&&(i==n.HTMLBlock||i==n.HTMLTag))return{parser:s,overlay:Kp(e.node,e.from,e.to)};return null});return{wrap:o}}const Yp={resolve:"Strikethrough",mark:"StrikethroughMark"},Gp={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":e.strikethrough}},{name:"StrikethroughMark",style:e.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let s=e.slice(n-1,n),o=e.slice(n+2,n+3),i=/\s|^$/.test(s),a=/\s|^$/.test(o),r=Mn.test(s),c=Mn.test(o);return e.addDelimiter(Yp,n,n+2,!a&&(!c||i||r),!i&&(!r||a||c))},after:"Emphasis"}]};function rn(e,t,n=0,s,o=0){let c=0,l=!0,i=-1,a=-1,r=!1,d=()=>{s.push(e.elt("TableCell",o+i,o+a,e.parser.parseInline(t.slice(i,a),o+i)))};for(let u=n;u-1)&&c++,l=!1,s&&(i>-1&&d(),s.push(e.elt("TableDelimiter",u+o,u+o+1))),i=a=-1):(r||h!=32&&h!=9)&&(i<0&&(i=u),a=u+1),r=!r&&h==92}return i>-1&&(c++,s&&d()),c}function Sd(e,t){for(let n=t;ne instanceof kd)||!Sd(t.text,t.basePos))return!1;let s=e.scanLine(e.absoluteLineEnd+1).text;return Ad.test(s)&&rn(e,t.text,t.basePos)==rn(e,s,t.basePos)},before:"SetextHeading"}]};class tg{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const ng={defineNodes:[{name:"Task",block:!0,style:e.list},{name:"TaskMarker",style:e.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new tg:null},after:"SetextHeading"}]},wd=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,_d=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,ig=/[\w-]+\.[\w-]+($|\/)/,yd=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,jd=/\/[a-zA-Z\d@.]+/gy;function bd(e,t,n,s){let o=0;for(let i=t;i-1)return-1;let n=t+s[0].length;for(;;){let s=e[n-1],o;if(/[?!.,:*_~]/.test(s)||s==")"&&bd(e,t,n,")")>bd(e,t,n,"("))n--;else if(s==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))n=t+o.index;else break}return n}function gd(e,t){yd.lastIndex=t;let n=yd.exec(e);if(!n)return-1;let s=n[0][n[0].length-1];return s=="_"||s=="-"?-1:t+n[0].length-(s=="."?1:0)}const ug={parseInline:[{name:"Autolink",parse(e,t,n){let i=n-e.offset;wd.lastIndex=i;let o=wd.exec(e.text),s=-1;if(!o)return-1;if(o[1]||o[2]){if(s=lg(e.text,i+o[0].length),s>-1&&e.hasOpenLink){let t=/([^[\]]|\[[^\]]*\])*/.exec(e.text.slice(i,s));s=i+t[0].length}}else o[3]?s=gd(e.text,i):(s=gd(e.text,i+o[0].length),s>-1&&o[0]=="xmpp:"&&(jd.lastIndex=s,o=jd.exec(e.text),o&&(s=o.index+o[0].length)));return s<0?-1:(e.addElement(e.elt("URL",n,s+e.offset)),s+e.offset)}}]},hg=[eg,ng,Gp,ug];function pd(e,t,n){return(s,o,i)=>{if(o!=e||s.char(i+1)==e)return-1;let a=[s.elt(n,i,i+1)];for(let o=i+1;o"}}}),dd=new l,ld=Up.configure({props:[Ce.add(e=>!e.is("Block")||e.is("Document")||mi(e)!=null||_g(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),dd.add(mi),Te.add({Document:()=>null}),Ct.add({Document:md})]});function mi(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function _g(e){return e.name=="OrderedList"||e.name=="BulletList"}function wg(e,t){let n=e;for(;;){let e=n.nextSibling,s;if(!e||(s=mi(e.type))!=null&&s<=t)break;n=e}return n.to}const Og=vd.of((e,t,n)=>{for(let s=g(e).resolveInner(n,-1);s;s=s.parent){if(s.fromn)return{from:n,to:i}}return null});function pi(e){return new te(md,e,[Og],"markdown")}const Cg=pi(ld),Eg=ld.configure([hg,pg,fg,gg,{props:[Ce.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),rd=pi(Eg);function Ag(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?t=e(n):t=Ca.matchLanguageName(e,n,!0),t instanceof Ca)return t.support?t.support.language.parser:Fs.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}let mo=class Context{constructor(e,t,n,s,o,i,a){this.node=e,this.from=t,this.to=n,this.spaceBefore=s,this.spaceAfter=o,this.type=i,this.item=a}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length0;e--)n+=" ";return n+(t?this.spaceAfter:"")}marker(e,t){let n=this.node.name=="OrderedList"?String(+sd(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function id(e,t){let s=[];for(let t=e;t&&t.name!="Document";t=t.parent)(t.name=="ListItem"||t.name=="Blockquote"||t.name=="FencedCode")&&s.push(t);let n=[];for(let r=s.length-1;r>=0;r--){let o=s[r],e,a=t.lineAt(o.from),i=o.from-a.from;if(o.name=="FencedCode")n.push(new mo(o,i,i,"","","",null));else if(o.name=="Blockquote"&&(e=/^ *>( ?)/.exec(a.text.slice(i))))n.push(new mo(o,i,i+e[0].length,"",e[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(e=/^( *)\d+([.)])( *)/.exec(a.text.slice(i)))){let t=e[3],s=e[0].length;t.length>=4&&(t=t.slice(0,t.length-4),s-=4),n.push(new mo(o.parent,i,i+s,e[1],t,e[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(e=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(i)))){let t=e[4],s=e[0].length;t.length>4&&(t=t.slice(0,t.length-4),s-=4);let a=e[2];e[3]&&(a+=e[3].replace(/[xX]/," ")),n.push(new mo(o.parent,i,i+s,e[1],t,a,o))}}return n}function sd(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function _i(e,t,n,s=0){for(let i=-1,o=e;;){if(o.name=="ListItem"){let e=sd(o,t),a=+e[2];if(i>=0){if(a!=i+1)return;n.push({from:o.from+e[1].length,to:o.from+e[0].length,insert:String(i+2+s)})}i=a}let a=o.nextSibling;if(!a)break;o=a}}function wi(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(Fn)!=" ")return e;let o=me(e,4,n),s="";for(let e=o;e>0;)e>=4?(s+=" ",e-=4):(s+=" ",e--);return s+e.slice(n)}const Dg=({state:e,dispatch:n})=>{let i=g(e),{doc:s}=e,o=null,a=e.changeByRange(n=>{if(!n.empty||!rd.isActiveAt(e,n.from))return o={range:n};let l=n.from,a=s.lineAt(l),c=id(i.resolveInner(l,-1),s);for(;c.length&&c[c.length-1].from>l-a.from;)c.pop();if(!c.length)return o={range:n};let r=c[c.length-1];if(r.to-r.spaceAfter.length>l-a.from)return o={range:n};let m=l>=r.to-r.spaceAfter.length&&!/\S/.test(a.text.slice(r.to));if(r.item&&m){let i=r.node.firstChild,n=r.node.getChild("ListItem","ListItem");if(i.to>=l||n&&n.to0&&!/[^\s>]/.test(s.lineAt(a.from-1).text)){let e=c.length>1?c[c.length-2]:null,n,o="";e&&e.item?(n=a.from+e.from,o=e.marker(s,1)):n=a.from+(e?e.to:0);let i=[{from:n,to:l,insert:o}];return r.node.name=="OrderedList"&&_i(r.item,s,i,-2),e&&e.node.name=="OrderedList"&&_i(e.item,s,i),{range:t.cursor(n+o.length),changes:i}}let o=ed(c,e,a);return{range:t.cursor(l+o.length+1),changes:{from:a.from,insert:o+e.lineBreak}}}if(r.node.name=="Blockquote"&&m&&a.from){let t=s.lineAt(a.from-1),o=/>\s*$/.exec(t.text);if(o&&o.index==r.from){let s=e.changes([{from:t.from+o.index,to:t.to},{from:a.from+r.from,to:a.to}]);return{range:n.map(s),changes:s}}}let h=[];r.node.name=="OrderedList"&&_i(r.item,s,h);let f=r.item&&r.item.from]*/.exec(a.text)[0].length>=r.to)for(let e=0,t=c.length-1;e<=t;e++)d+=e==t&&!f?c[e].marker(s,1):c[e].blank(ea.from&&/\s/.test(a.text.charAt(u-a.from-1));)u--;return d=wi(d,e),Lg(r.node,e.doc)&&(d=ed(c,e,a)+e.lineBreak+d),h.push({from:u,to:l,insert:e.lineBreak+d}),{range:t.cursor(u+d.length+1),changes:h}});return!o&&(n(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)};function td(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Lg(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let o=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let s=t.lineAt(o.to),i=t.lineAt(n.from),a=/^[\s>]*$/.test(s.text);return s.number+(a?0:1){let o=g(e),s=null,i=e.changeByRange(n=>{let i=n.from,{doc:a}=e;if(n.empty&&rd.isActiveAt(e,n.from)){let n=a.lineAt(i),s=id(Pg(o,i),a);if(s.length){let o=s[s.length-1],a=o.to-o.spaceAfter.length+(o.spaceAfter?1:0);if(i-n.from>a&&!/\S/.test(n.text.slice(a,i-n.from)))return{range:t.cursor(n.from+a),changes:{from:n.from+a,to:i}};if(i-n.from==a&&(!o.item||n.from<=o.item.from||!/\S/.test(n.text.slice(0,o.to)))){let s=n.from+o.from;if(o.item&&o.node.from=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const l7=new C((e,t)=>{let n;if(e.next<0)e.acceptToken(Zg);else if(t.context.flags&Is)ua(e.next)&&e.acceptToken(Qg,1);else if(((n=e.peek(-1))<0||ua(n))&&t.canShift(Ul)){let t=0;for(;e.next==Xi||e.next==qs;)e.advance(),t++;(e.next==xt||e.next==Xn||e.next==la)&&e.acceptToken(Ul,-t)}else ua(e.next)&&e.acceptToken(Gg,1)},{contextual:!0}),d7=new C((e,t)=>{let n=t.context;if(n.flags)return;let s=e.peek(-1);if(s==xt||s==Xn){let t=0,s=0;for(;;){if(e.next==Xi)t++;else if(e.next==qs)t+=8-t%8;else break;e.advance(),s++}t!=n.indent&&e.next!=xt&&e.next!=Xn&&e.next!=la&&(t[e,t|Cl])),_7=new Kn({start:b7,reduce(e,t){return e.flags&Is&&a7.has(t)||(t==v5||t==Hl)&&e.flags&Cl?e.parent:e},shift(e,t,n,s){return t==Yl?new Ds(e,j7(s.read(s.pos,n.pos)),0):t==Kl?e.parent:t==s5||t==r5||t==d5||t==$l?new Ds(e,0,Is):Ol.has(t)?new Ds(e,0,Ol.get(t)|e.flags&Is):e},hash(e){return e.hash}}),w7=new C(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(/\w/.test(String.fromCharCode(e.next)))return;for(let n=0;;n++){let t=e.peek(n);if(t==Xi||t==qs)continue;t!=Y5&&t!=G5&&t!=xt&&t!=Xn&&t!=la&&e.acceptToken(Kg);return}}),O7=new C((e,t)=>{let{flags:s}=t.context,o=s&Be?kl:Al,i=(s&Ke)>0,a=!(s&Se),r=(s&qe)>0,n=e.pos;for(;;){if(e.next<0)break;if(r&&e.next==da)if(e.peek(1)==da)e.advance(2);else{if(e.pos==n){e.acceptToken($l,1);return}break}else if(a&&e.next==e7){if(e.pos==n){e.advance();let t=e.next;t>=0&&(e.advance(),x7(e,t)),e.acceptToken(e5);return}break}else if(e.next==o&&(!i||e.peek(1)==o&&e.peek(2)==o)){if(e.pos==n){e.acceptToken(Il,i?3:1);return}break}else if(e.next==xt){if(i)e.advance();else if(e.pos==n){e.acceptToken(Il);return}break}else e.advance()}e.pos>n&&e.acceptToken(Jg)});function x7(e,t){if(t==t7)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==n7)for(let t=0;t<2&&ga(e.next);t++)e.advance();else if(t==o7)for(let t=0;t<4&&ga(e.next);t++)e.advance();else if(t==i7)for(let t=0;t<8&&ga(e.next);t++)e.advance();else if(t==s7&&e.next==da){for(e.advance();e.next>=0&&e.next!=Fl&&e.next!=Al&&e.next!=kl&&e.next!=xt;)e.advance();e.next==Fl&&e.advance()}}const C7=fe({'async "*" "**" FormatConversion FormatSpec':e.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":e.controlKeyword,"in not and or is del":e.operatorKeyword,"from def class global nonlocal lambda":e.definitionKeyword,import:e.moduleKeyword,"with as print":e.keyword,Boolean:e.bool,None:e.null,VariableName:e.variableName,"CallExpression/VariableName":e.function(e.variableName),"FunctionDefinition/VariableName":e.function(e.definition(e.variableName)),"ClassDefinition/VariableName":e.definition(e.className),PropertyName:e.propertyName,"CallExpression/MemberExpression/PropertyName":e.function(e.propertyName),Comment:e.lineComment,Number:e.number,String:e.string,FormatString:e.special(e.string),Escape:e.escape,UpdateOp:e.updateOperator,"ArithOp!":e.arithmeticOperator,BitOp:e.bitwiseOperator,CompareOp:e.compareOperator,AssignOp:e.definitionOperator,Ellipsis:e.punctuation,At:e.meta,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace,".":e.derefOperator,", ;":e.separator}),E7={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},k7=xe.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOO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ers:[w7,d7,l7,O7,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>E7[e]||-1}],tokenPrec:7652}),wl=new pr,_l=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function Ts(e){return(t,n,s)=>{if(s)return!1;let o=t.node.getChild("VariableName");return o&&n(o,e),!0}}const F7={FunctionDefinition:Ts("function"),ClassDefinition:Ts("class"),ForStatement(e,t,n){if(n)for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name=="in")break},ImportStatement(e,t){var n,s;let{node:o}=e,i=((n=o.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let e=o.getChild("import");e;e=e.nextSibling)e.name=="VariableName"&&((s=e.nextSibling)===null||s===void 0?void 0:s.name)!="as"&&t(e,i?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(e,t){for(let s=null,n=e.node.firstChild;n;n=n.nextSibling)n.name=="VariableName"&&(!s||!/\*|AssignOp/.test(s.name))&&t(n,"variable"),s=n},CapturePattern:Ts("variable"),AsPattern:Ts("variable"),__proto__:null};function vl(e,t){let o=wl.get(t);if(o)return o;let n=[],s=!0;function i(t,s){let o=e.sliceString(t.from,t.to);n.push({label:o,type:s})}return t.cursor(b.IncludeAnonymous).iterate(t=>{if(t.name){let e=F7[t.name];if(e&&e(t,i,s)||!s&&_l.has(t.name))return!1;s=!1}else if(t.to-t.from>8192){for(let s of vl(e,t.node))n.push(s);return!1}}),wl.set(t,n),n}const pl=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,fl=["String","FormatString","Comment","PropertyName"];function N7(e){let t=g(e.state).resolveInner(e.pos,-1);if(fl.indexOf(t.name)>-1)return null;let s=t.name=="VariableName"||t.to-t.from<20&&pl.test(e.state.sliceDoc(t.from,t.to));if(!s&&!e.explicit)return null;let n=[];for(let s=t;s;s=s.parent)_l.has(s.name)&&(n=n.concat(vl(e.state.doc,s)));return{options:n,from:s?t.from:e.pos,validFor:pl}}const L7=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),R7=[x("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),x("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),x("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),x("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),x(`if \${}: +`);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=bi.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new p(this.parser.nodeSet.types[e],St,St,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(li(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let t=this.stack.pop(),e=this.stack[this.stack.length-1];e.addChild(t.toTree(this.parser.nodeSet),t.from-e.from),this.block=e}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?ru(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=li(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(n.Paragraph,e.content.length),e.start)}elt(e,t,n,s){return typeof e=="string"?u(this.parser.getNodeType(e),t,n,s):new Xd(e,t)}get buffer(){return new Jd(this.parser.nodeSet)}}function ru(e,t,n,s,o){let i=e[t].to,r=[],c=[],l=n.from+s;function a(n,o){for(;o?n>=i:n>i;){let o=e[t+1].from-i;s+=o,n+=o,t++,i=e[t].to}}for(let d=n.firstChild;d;d=d.nextSibling){a(d.from+s,!0);let m=d.from+s,u,h=o.get(d.tree);h?u=h:d.to+s>i?(u=ru(e,t,d,s,o),a(d.to+s,!1)):u=d.toTree(),r.push(u),c.push(m-l)}return a(n.to+s,!1),new p(n.type,r,c,n.to+s-l,n.tree?n.tree.propValues:void 0)}class Xo extends ur{constructor(e,t,n,s,o,i,a,r,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=o,this.skipContextMarkup=i,this.inlineParsers=a,this.inlineNames=r,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let s=new gp(this,e,t,n);for(let o of this.wrappers)s=o(s,e,t,n);return s}configure(e){let t=ei(e);if(!t)return this;let{nodeSet:s,skipContextMarkup:a}=this,r=this.blockParsers.slice(),c=this.leafBlockParsers.slice(),o=this.blockNames.slice(),d=this.inlineParsers.slice(),i=this.inlineNames.slice(),h=this.endLeafBlock.slice(),u=this.wrappers;if(en(t.defineNodes)){a=Object.assign({},a);let o=s.types.slice(),e;for(let i of t.defineNodes){let{name:r,block:h,composite:c,style:s}=typeof i=="string"?{name:i}:i;if(o.some(e=>e.name==r))continue;c&&(a[o.length]=(e,t,n)=>c(t,n,e.value));let d=o.length,u=c?["Block","BlockContext"]:h?d>=n.ATXHeading1&&d<=n.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;o.push(F.define({id:d,name:r,props:u&&[[l.group,u]]})),s&&(e||(e={}),Array.isArray(s)||s instanceof be?e[r]=s:Object.assign(e,s))}s=new ls(o),e&&(s=s.extend(de(e)))}if(en(t.props)&&(s=s.extend(...t.props)),en(t.remove))for(let n of t.remove){let e=this.blockNames.indexOf(n),s=this.inlineNames.indexOf(n);e>-1&&(r[e]=c[e]=void 0),s>-1&&(d[s]=void 0)}if(en(t.parseBlock))for(let e of t.parseBlock){let n=o.indexOf(e.name);if(n>-1)r[n]=e.parse,c[n]=e.leaf;else{let t=e.before?Oo(o,e.before):e.after?Oo(o,e.after)+1:o.length-1;r.splice(t,0,e.parse),c.splice(t,0,e.leaf),o.splice(t,0,e.name)}e.endLeaf&&h.push(e.endLeaf)}if(en(t.parseInline))for(let e of t.parseInline){let n=i.indexOf(e.name);if(n>-1)d[n]=e.parse;else{let t=e.before?Oo(i,e.before):e.after?Oo(i,e.after)+1:i.length-1;d.splice(t,0,e.parse),i.splice(t,0,e.name)}}return t.wrap&&(u=u.concat(t.wrap)),new Xo(s,r,c,o,h,a,d,i,u)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new Ip(this,e,t);outer:for(let e=t;e=0){e=o;continue outer}}e++}return n.resolveMarkers(0)}}function en(e){return e!=null&&e.length>0}function ei(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=ei(e[0]);if(e.length==1)return t;let n=ei(e.slice(1));if(!n||!t)return t||n;let s=(e,t)=>(e||St).concat(t||St),o=t.wrap,i=n.wrap;return{props:s(t.props,n.props),defineNodes:s(t.defineNodes,n.defineNodes),parseBlock:s(t.parseBlock,n.parseBlock),parseInline:s(t.parseInline,n.parseInline),remove:s(t.remove,n.remove),wrap:o?i?(e,t,n,s)=>o(i(e,t,n,s),t,n,s):o:i}}function Oo(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}let eu=[F.none];for(let e=1,t;t=n[e];e++)eu[e]=F.define({id:e,name:t,props:e>=n.Escape?[]:[[l.group,e in Ru?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});const St=[];class Jd{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,s=0){return this.content.push(e,t,n,4+s*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return p.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let tn=class Element{constructor(e,t,n,s=St){this.type=e,this.from=t,this.to=n,this.children=s}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new Jd(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class Xd{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return St}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function u(e,t,n,s){return new tn(e,t,n,s)}const Ud={resolve:"Emphasis",mark:"EmphasisMark"},Wd={resolve:"Emphasis",mark:"EmphasisMark"},zt={},oi={};class oe{constructor(e,t,n,s){this.type=e,this.from=t,this.to=n,this.side=s}}const $d="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Mn=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Mn=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const ri={Escape(e,t,s){if(t!=92||s==e.end-1)return-1;let o=e.char(s+1);for(let t=0;t<$d.length;t++)if($d.charCodeAt(t)==o)return e.append(u(n.Escape,s,s+2));return-1},Entity(e,t,s){if(t!=38)return-1;let o=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(s+1,s+31));return o?e.append(u(n.Entity,s,s+1+o[0].length)):-1},InlineCode(e,t,s){if(t!=96||s&&e.char(s-1)==96)return-1;let o=s+1;for(;o]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(o)return e.append(u(n.Autolink,s,s+1+o[0].length,[u(n.LinkMark,s,s+1),u(n.URL,s+1,s+o[0].length),u(n.LinkMark,s+o[0].length,s+1+o[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(a)return e.append(u(n.Comment,s,s+1+a[0].length));let r=/^\?[^]*?\?>/.exec(i);if(r)return e.append(u(n.ProcessingInstruction,s,s+1+r[0].length));let c=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return c?e.append(u(n.HTMLTag,s,s+1+c[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let s=n+1;for(;e.char(s)==t;)s++;let a=e.slice(n-1,n),r=e.slice(s,s+1),o=Mn.test(a),i=Mn.test(r),c=/\s|^$/.test(a),l=/\s|^$/.test(r),d=!l&&(!i||c||o),u=!c&&(!o||l||i),h=d&&(t==42||!u||o),m=u&&(t==42||!d||i);return e.append(new oe(t==95?Ud:Wd,n,s,(h?1:0)|(m?2:0)))},HardBreak(e,t,s){if(t==92&&e.char(s+1)==10)return e.append(u(n.HardBreak,s,s+2));if(t==32){let t=s+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=s+2)return e.append(u(n.HardBreak,s,t+1))}return-1},Link(e,t,n){return t==91?e.append(new oe(zt,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new oe(oi,n,n+2,1)):-1},LinkEnd(e,t,s){if(t!=93)return-1;for(let o=e.parts.length-1;o>=0;o--){let t=e.parts[o];if(t instanceof oe&&(t.type==zt||t.type==oi)){if(!t.side||e.skipSpace(t.to)==s&&!/[([]/.test(e.slice(s+1,s+2)))return e.parts[o]=null,-1;let i=e.takeContent(o),a=e.parts[o]=Lp(e,i,t.type==zt?n.Link:n.Image,t.from,s+1);if(t.type==zt)for(let t=0;tt?u(n.URL,t+s,o+s):o==e.length&&null}function Ld(e,t,s){let o=e.charCodeAt(t);if(o!=39&&o!=34&&o!=40)return!1;let i=o==40?41:o;for(let o=t+1,a=!1;o=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,s,o){return this.append(new oe(e,t,n,(s?1:0)|(o?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof oe&&(t.type==zt||t.type==oi))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let s=e;s=e;o--){let s=this.parts[o];if(s instanceof oe&&s.side&1&&s.type==t.type&&!(r&&(t.side&1||s.side&2)&&(s.to-s.from+l)%3==0&&((s.to-s.from)%3||l%3))){n=s;break}}if(!n)continue;let d=t.type.resolve,c=[],i=n.from,a=t.to;if(r){let e=Math.min(2,n.to-n.from,l);i=n.to-e,a=t.from+e,d=e==1?"Emphasis":"StrongEmphasis"}n.type.mark&&c.push(this.elt(n.type.mark,i,n.to));for(let e=o+1;e=0;t--){let n=this.parts[t];if(n instanceof oe&&n.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return on(this.text,e-this.offset)+this.offset}elt(e,t,n,s){return typeof e=="string"?u(this.parser.getNodeType(e),t,n,s):new Xd(e,t)}}function li(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),s=0;for(let e of t){for(;s(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=` +`;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=e+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=t;if(!n.childAfter(s))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(l.contextHash)==e}takeNodes(e){let t=this.cursor,s=this.fragment.offset,l=this.fragmentEnd-(this.fragment.openEnd?1:0),a=e.absoluteLineStart,o=a,i=e.block.children.length,r=o,c=i;for(;;){if(t.to-s>l){if(t.type.isAnonymous&&t.firstChild())continue;break}let a=Td(t.from-s,e.ranges);if(t.to-s<=e.ranges[e.rangeI].to)e.addNode(t.tree,a);else{let s=new p(e.parser.nodeSet.types[n.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(s,t.tree),e.addNode(s,a)}if(t.type.is("Block")&&(Vp.indexOf(t.type.id)<0?(o=t.to-s,i=e.block.children.length):(o=r,i=c,r=t.to-s,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>i;)e.block.children.pop(),e.block.positions.pop();return o-a}}function Td(e,t){let n=e;for(let s=1;sTo[e]),Object.keys(To).map(e=>mp[e]),Object.keys(To),fp,Ru,Object.keys(ri).map(e=>ri[e]),Object.keys(ri),[]);function qp(e,t,n){let s=[];for(let o=e.firstChild,i=t;;o=o.nextSibling){let a=o?o.from:n;if(a>i&&s.push({from:i,to:a}),!o)break;i=o.to}return s}function Yp(e){let{codeParser:t,htmlParser:s}=e,o=Bc((e,o)=>{let i=e.type.id;if(t&&(i==n.CodeBlock||i==n.FencedCode)){{let s="";if(i==n.FencedCode){let t=e.node.getChild(n.CodeInfo);t&&(s=o.read(t.from,t.to))}let a=t(s);if(a)return{parser:a,overlay:e=>e.type.id==n.CodeText}}}else if(s&&(i==n.HTMLBlock||i==n.HTMLTag))return{parser:s,overlay:qp(e.node,e.from,e.to)};return null});return{wrap:o}}const Gp={resolve:"Strikethrough",mark:"StrikethroughMark"},Xp={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":e.strikethrough}},{name:"StrikethroughMark",style:e.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let s=e.slice(n-1,n),o=e.slice(n+2,n+3),i=/\s|^$/.test(s),a=/\s|^$/.test(o),r=Mn.test(s),c=Mn.test(o);return e.addDelimiter(Gp,n,n+2,!a&&(!c||i||r),!i&&(!r||a||c))},after:"Emphasis"}]};function Zn(e,t,n=0,s,o=0){let c=0,l=!0,i=-1,a=-1,r=!1,d=()=>{s.push(e.elt("TableCell",o+i,o+a,e.parser.parseInline(t.slice(i,a),o+i)))};for(let u=n;u-1)&&c++,l=!1,s&&(i>-1&&d(),s.push(e.elt("TableDelimiter",u+o,u+o+1))),i=a=-1):(r||h!=32&&h!=9)&&(i<0&&(i=u),a=u+1),r=!r&&h==92}return i>-1&&(c++,s&&d()),c}function Fd(e,t){for(let n=t;ne instanceof Ad)||!Fd(t.text,t.basePos))return!1;let s=e.scanLine(e.absoluteLineEnd+1).text;return Sd.test(s)&&Zn(e,t.text,t.basePos)==Zn(e,s,t.basePos)},before:"SetextHeading"}]};class ng{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const sg={defineNodes:[{name:"Task",block:!0,style:e.list},{name:"TaskMarker",style:e.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new ng:null},after:"SetextHeading"}]},kd=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,wd=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,ag=/[\w-]+\.[\w-]+($|\/)/,_d=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,yd=/\/[a-zA-Z\d@.]+/gy;function jd(e,t,n,s){let o=0;for(let i=t;i-1)return-1;let n=t+s[0].length;for(;;){let s=e[n-1],o;if(/[?!.,:*_~]/.test(s)||s==")"&&jd(e,t,n,")")>jd(e,t,n,"("))n--;else if(s==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))n=t+o.index;else break}return n}function bd(e,t){_d.lastIndex=t;let n=_d.exec(e);if(!n)return-1;let s=n[0][n[0].length-1];return s=="_"||s=="-"?-1:t+n[0].length-(s=="."?1:0)}const hg={parseInline:[{name:"Autolink",parse(e,t,n){let i=n-e.offset;kd.lastIndex=i;let o=kd.exec(e.text),s=-1;if(!o)return-1;if(o[1]||o[2]){if(s=dg(e.text,i+o[0].length),s>-1&&e.hasOpenLink){let t=/([^[\]]|\[[^\]]*\])*/.exec(e.text.slice(i,s));s=i+t[0].length}}else o[3]?s=bd(e.text,i):(s=bd(e.text,i+o[0].length),s>-1&&o[0]=="xmpp:"&&(yd.lastIndex=s,o=yd.exec(e.text),o&&(s=o.index+o[0].length)));return s<0?-1:(e.addElement(e.elt("URL",n,s+e.offset)),s+e.offset)}}]},mg=[tg,sg,Xp,hg];function gd(e,t,n){return(s,o,i)=>{if(o!=e||s.char(i+1)==e)return-1;let a=[s.elt(n,i,i+1)];for(let o=i+1;o"}}}),md=new l,dd=Kp.configure({props:[Ce.add(e=>!e.is("Block")||e.is("Document")||pi(e)!=null||wg(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),md.add(pi),Te.add({Document:()=>null}),yt.add({Document:pd})]});function pi(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function wg(e){return e.name=="OrderedList"||e.name=="BulletList"}function Og(e,t){let n=e;for(;;){let e=n.nextSibling,s;if(!e||(s=pi(e.type))!=null&&s<=t)break;n=e}return n.to}const xg=vd.of((e,t,n)=>{for(let s=g(e).resolveInner(n,-1);s;s=s.parent){if(s.fromn)return{from:n,to:i}}return null});function ji(e){return new te(pd,e,[xg],"markdown")}const Eg=ji(dd),kg=dd.configure([mg,gg,pg,vg,{props:[Ce.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),rd=ji(kg);function Sg(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?t=e(n):t=Ca.matchLanguageName(e,n,!0),t instanceof Ca)return t.support?t.support.language.parser:Fs.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}let ho=class Context{constructor(e,t,n,s,o,i,a){this.node=e,this.from=t,this.to=n,this.spaceBefore=s,this.spaceAfter=o,this.type=i,this.item=a}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length0;e--)n+=" ";return n+(t?this.spaceAfter:"")}marker(e,t){let n=this.node.name=="OrderedList"?String(+sd(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function id(e,t){let s=[];for(let t=e;t;t=t.parent)(t.name=="ListItem"||t.name=="Blockquote"||t.name=="FencedCode")&&s.push(t);let n=[];for(let r=s.length-1;r>=0;r--){let o=s[r],e,a=t.lineAt(o.from),i=o.from-a.from;if(o.name=="FencedCode")n.push(new ho(o,i,i,"","","",null));else if(o.name=="Blockquote"&&(e=/^ *>( ?)/.exec(a.text.slice(i))))n.push(new ho(o,i,i+e[0].length,"",e[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(e=/^( *)\d+([.)])( *)/.exec(a.text.slice(i)))){let t=e[3],s=e[0].length;t.length>=4&&(t=t.slice(0,t.length-4),s-=4),n.push(new ho(o.parent,i,i+s,e[1],t,e[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(e=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(i)))){let t=e[4],s=e[0].length;t.length>4&&(t=t.slice(0,t.length-4),s-=4);let a=e[2];e[3]&&(a+=e[3].replace(/[xX]/," ")),n.push(new ho(o.parent,i,i+s,e[1],t,a,o))}}return n}function sd(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function wi(e,t,n,s=0){for(let i=-1,o=e;;){if(o.name=="ListItem"){let e=sd(o,t),a=+e[2];if(i>=0){if(a!=i+1)return;n.push({from:o.from+e[1].length,to:o.from+e[0].length,insert:String(i+2+s)})}i=a}let a=o.nextSibling;if(!a)break;o=a}}function Oi(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(bn)!=" ")return e;let o=he(e,4,n),s="";for(let e=o;e>0;)e>=4?(s+=" ",e-=4):(s+=" ",e--);return s+e.slice(n)}const Ng=({state:e,dispatch:n})=>{let i=g(e),{doc:s}=e,o=null,a=e.changeByRange(n=>{if(!n.empty||!rd.isActiveAt(e,n.from,0))return o={range:n};let l=n.from,a=s.lineAt(l),c=id(i.resolveInner(l,-1),s);for(;c.length&&c[c.length-1].from>l-a.from;)c.pop();if(!c.length)return o={range:n};let r=c[c.length-1];if(r.to-r.spaceAfter.length>l-a.from)return o={range:n};let m=l>=r.to-r.spaceAfter.length&&!/\S/.test(a.text.slice(r.to));if(r.item&&m){let i=r.node.firstChild,n=r.node.getChild("ListItem","ListItem");if(i.to>=l||n&&n.to0&&!/[^\s>]/.test(s.lineAt(a.from-1).text)){let e=c.length>1?c[c.length-2]:null,n,o="";e&&e.item?(n=a.from+e.from,o=e.marker(s,1)):n=a.from+(e?e.to:0);let i=[{from:n,to:l,insert:o}];return r.node.name=="OrderedList"&&wi(r.item,s,i,-2),e&&e.node.name=="OrderedList"&&wi(e.item,s,i),{range:t.cursor(n+o.length),changes:i}}let o=ed(c,e,a);return{range:t.cursor(l+o.length+1),changes:{from:a.from,insert:o+e.lineBreak}}}if(r.node.name=="Blockquote"&&m&&a.from){let t=s.lineAt(a.from-1),o=/>\s*$/.exec(t.text);if(o&&o.index==r.from){let s=e.changes([{from:t.from+o.index,to:t.to},{from:a.from+r.from,to:a.to}]);return{range:n.map(s),changes:s}}}let h=[];r.node.name=="OrderedList"&&wi(r.item,s,h);let f=r.item&&r.item.from]*/.exec(a.text)[0].length>=r.to)for(let e=0,t=c.length-1;e<=t;e++)d+=e==t&&!f?c[e].marker(s,1):c[e].blank(ea.from&&/\s/.test(a.text.charAt(u-a.from-1));)u--;return d=Oi(d,e),Rg(r.node,e.doc)&&(d=ed(c,e,a)+e.lineBreak+d),h.push({from:u,to:l,insert:e.lineBreak+d}),{range:t.cursor(u+d.length+1),changes:h}});return!o&&(n(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)};function td(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Rg(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let o=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let s=t.lineAt(o.to),i=t.lineAt(n.from),a=/^[\s>]*$/.test(s.text);return s.number+(a?0:1){let o=g(e),s=null,i=e.changeByRange(n=>{let i=n.from,{doc:a}=e;if(n.empty&&rd.isActiveAt(e,n.from)){let n=a.lineAt(i),s=id(Hg(o,i),a);if(s.length){let o=s[s.length-1],a=o.to-o.spaceAfter.length+(o.spaceAfter?1:0);if(i-n.from>a&&!/\S/.test(n.text.slice(a,i-n.from)))return{range:t.cursor(n.from+a),changes:{from:n.from+a,to:i}};if(i-n.from==a&&(!o.item||n.from<=o.item.from||!/\S/.test(n.text.slice(0,o.to)))){let s=n.from+o.from;if(o.item&&o.node.from=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const d7=new C((e,t)=>{let n;if(e.next<0)e.acceptToken(Jg);else if(t.context.flags&Is)ua(e.next)&&e.acceptToken(Zg,1);else if(((n=e.peek(-1))<0||ua(n))&&t.canShift(Ul)){let t=0;for(;e.next==Xi||e.next==qs;)e.advance(),t++;(e.next==Ct||e.next==nn||e.next==la)&&e.acceptToken(Ul,-t)}else ua(e.next)&&e.acceptToken(Xg,1)},{contextual:!0}),u7=new C((e,t)=>{let n=t.context;if(n.flags)return;let s=e.peek(-1);if(s==Ct||s==nn){let t=0,s=0;for(;;){if(e.next==Xi)t++;else if(e.next==qs)t+=8-t%8;else break;e.advance(),s++}t!=n.indent&&e.next!=Ct&&e.next!=nn&&e.next!=la&&(t[e,t|Cl])),w7=new Yn({start:j7,reduce(e,t){return e.flags&Is&&r7.has(t)||(t==b5||t==Hl)&&e.flags&Cl?e.parent:e},shift(e,t,n,s){return t==Yl?new Ds(e,y7(s.read(s.pos,n.pos)),0):t==Kl?e.parent:t==o5||t==c5||t==u5||t==$l?new Ds(e,0,Is):Ol.has(t)?new Ds(e,0,Ol.get(t)|e.flags&Is):e},hash(e){return e.hash}}),O7=new C(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(/\w/.test(String.fromCharCode(e.next)))return;for(let n=0;;n++){let t=e.peek(n);if(t==Xi||t==qs)continue;t!=G5&&t!=X5&&t!=Ct&&t!=nn&&t!=la&&e.acceptToken(qg);return}}),x7=new C((e,t)=>{let{flags:s}=t.context,o=s&Be?kl:Al,i=(s&Ke)>0,a=!(s&Ye),r=(s&He)>0,n=e.pos;for(;;){if(e.next<0)break;if(r&&e.next==da)if(e.peek(1)==da)e.advance(2);else{if(e.pos==n){e.acceptToken($l,1);return}break}else if(a&&e.next==t7){if(e.pos==n){e.advance();let t=e.next;t>=0&&(e.advance(),C7(e,t)),e.acceptToken(t5);return}break}else if(e.next==o&&(!i||e.peek(1)==o&&e.peek(2)==o)){if(e.pos==n){e.acceptToken(Il,i?3:1);return}break}else if(e.next==Ct){if(i)e.advance();else if(e.pos==n){e.acceptToken(Il);return}break}else e.advance()}e.pos>n&&e.acceptToken(e5)});function C7(e,t){if(t==n7)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==s7)for(let t=0;t<2&&ga(e.next);t++)e.advance();else if(t==i7)for(let t=0;t<4&&ga(e.next);t++)e.advance();else if(t==a7)for(let t=0;t<8&&ga(e.next);t++)e.advance();else if(t==o7&&e.next==da){for(e.advance();e.next>=0&&e.next!=Fl&&e.next!=Al&&e.next!=kl&&e.next!=Ct;)e.advance();e.next==Fl&&e.advance()}}const E7=de({'async "*" "**" FormatConversion FormatSpec':e.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":e.controlKeyword,"in not and or is del":e.operatorKeyword,"from def class global nonlocal lambda":e.definitionKeyword,import:e.moduleKeyword,"with as print":e.keyword,Boolean:e.bool,None:e.null,VariableName:e.variableName,"CallExpression/VariableName":e.function(e.variableName),"FunctionDefinition/VariableName":e.function(e.definition(e.variableName)),"ClassDefinition/VariableName":e.definition(e.className),PropertyName:e.propertyName,"CallExpression/MemberExpression/PropertyName":e.function(e.propertyName),Comment:e.lineComment,Number:e.number,String:e.string,FormatString:e.special(e.string),Escape:e.escape,UpdateOp:e.updateOperator,"ArithOp!":e.arithmeticOperator,BitOp:e.bitwiseOperator,CompareOp:e.compareOperator,AssignOp:e.definitionOperator,Ellipsis:e.punctuation,At:e.meta,"( )":e.paren,"[ ]":e.squareBracket,"{ }":e.brace,".":e.derefOperator,", ;":e.separator}),k7={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},A7=ke.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQd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#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[O7,u7,d7,x7,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>k7[e]||-1}],tokenPrec:7652}),wl=new pr,_l=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function zs(e){return(t,n,s)=>{if(s)return!1;let o=t.node.getChild("VariableName");return o&&n(o,e),!0}}const T7={FunctionDefinition:zs("function"),ClassDefinition:zs("class"),ForStatement(e,t,n){if(n)for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name=="in")break},ImportStatement(e,t){var n,s;let{node:o}=e,i=((n=o.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let e=o.getChild("import");e;e=e.nextSibling)e.name=="VariableName"&&((s=e.nextSibling)===null||s===void 0?void 0:s.name)!="as"&&t(e,i?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(e,t){for(let s=null,n=e.node.firstChild;n;n=n.nextSibling)n.name=="VariableName"&&(!s||!/\*|AssignOp/.test(s.name))&&t(n,"variable"),s=n},CapturePattern:zs("variable"),AsPattern:zs("variable"),__proto__:null};function vl(e,t){let o=wl.get(t);if(o)return o;let n=[],s=!0;function i(t,s){let o=e.sliceString(t.from,t.to);n.push({label:o,type:s})}return t.cursor(v.IncludeAnonymous).iterate(t=>{if(t.name){let e=T7[t.name];if(e&&e(t,i,s)||!s&&_l.has(t.name))return!1;s=!1}else if(t.to-t.from>8192){for(let s of vl(e,t.node))n.push(s);return!1}}),wl.set(t,n),n}const pl=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,fl=["String","FormatString","Comment","PropertyName"];function L7(e){let t=g(e.state).resolveInner(e.pos,-1);if(fl.indexOf(t.name)>-1)return null;let s=t.name=="VariableName"||t.to-t.from<20&&pl.test(e.state.sliceDoc(t.from,t.to));if(!s&&!e.explicit)return null;let n=[];for(let s=t;s;s=s.parent)_l.has(s.name)&&(n=n.concat(vl(e.state.doc,s)));return{options:n,from:s?t.from:e.pos,validFor:pl}}const R7=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),P7=[x("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),x("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),x("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),x("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),x(`if \${}: -`,{label:"if",detail:"block",type:"keyword"}),x("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),x("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),x("import ${module}",{label:"import",detail:"statement",type:"keyword"}),x("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],P7=h2(fl,ai(L7.concat(R7)));function ml(e){let{node:t,pos:n}=e,o=e.lineIndent(n,-1),s=null;for(;;){let i=t.childBefore(n);if(!i)break;if(i.name=="Comment")n=i.from;else if(i.name=="Body")e.baseIndentFor(i)+e.unit<=o&&(s=i),t=i;else if(i.type.is("Statement"))t=i;else break}return s}function hl(e,t){let n=e.baseIndentFor(t),s=e.lineAt(e.pos,-1),o=s.from+s.text.length;return/^\s*($|#)/.test(s.text)&&e.node.ton?null:n+e.unit}const ka=Ee.define({name:"python",parser:k7.configure({props:[Te.add({Body:e=>{var t;let n=ml(e);return(t=hl(e,n||e.node))!==null&&t!==void 0?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":St({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":St({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":St({closing:"]"}),"String FormatString":()=>null,Script:e=>{var t;let n=ml(e);return(t=n&&hl(e,n))!==null&&t!==void 0?t:e.continue()}}),Ce.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":On,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([}\])]|else:|elif |except |finally:)$/}});function V7(){return new We(ka,[ka.data.of({autocomplete:N7}),ka.data.of({autocomplete:P7})])}const Yt=63,ul=64,U7=1,K7=2,ll=3,Y7=4,rl=5,X7=6,Q7=7,al=65,J7=66,ev=8,tv=9,nv=10,sv=11,Ma=12,il=13,av=19,rv=20,cv=29,lv=33,dv=34,uv=47,hv=0,Ta=1,za=2,An=3,Da=4;class wt{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}}wt.top=new wt(null,-1,hv);function Ln(e,t){for(let n=0,s=t-e.pos-1;;s--,n++){let o=e.peek(s);if(Pe(o)||o==-1)return n}}function Ia(e){return e==32||e==9}function Pe(e){return e==10||e==13}function qc(e){return Ia(e)||Pe(e)}function lt(e){return e<0||qc(e)}const Ov=new Kn({start:wt.top,reduce(e,t){return e.type==An&&(t==rv||t==dv)?e.parent:e},shift(e,t,n,s){if(t==ll)return new wt(e,Ln(s,s.pos),Ta);if(t==al||t==rl)return new wt(e,Ln(s,s.pos),za);if(t==Yt)return e.parent;if(t==av||t==lv)return new wt(e,0,An);if(t==il&&e.type==Da)return e.parent;if(t==uv){let t=/[1-9]/.exec(s.read(s.pos,n.pos));if(t)return new wt(e,e.depth+ +t[0],Da)}return e},hash(e){return e.hash}});function Jt(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&<(e.peek(n+3))}const Cv=new C((e,t)=>{if(e.next==-1&&t.canShift(ul))return e.acceptToken(ul);let n=e.peek(-1);if((Pe(n)||n<0)&&t.context.type!=An){if(Jt(e,45))if(t.canShift(Yt))e.acceptToken(Yt);else return e.acceptToken(U7,3);if(Jt(e,46))if(t.canShift(Yt))e.acceptToken(Yt);else return e.acceptToken(K7,3);let n=0;for(;e.next==32;)n++,e.advance();(n{if(t.context.type==An){e.next==63&&(e.advance(),lt(e.next)&&e.acceptToken(Q7));return}if(e.next==45)e.advance(),lt(e.next)&&e.acceptToken(t.context.type==Ta&&t.context.depth==Ln(e,e.pos-1)?Y7:ll);else if(e.next==63)e.advance(),lt(e.next)&&e.acceptToken(t.context.type==za&&t.context.depth==Ln(e,e.pos-1)?X7:rl);else{let n=e.pos;for(;;)if(Ia(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)Hc(e);else if(e.next==38)Xa(e);else if(e.next==42){Xa(e);break}else if(e.next==39||e.next==34){if(or(e,!0))break;return}else if(e.next==91||e.next==123){if(!zv(e))return;break}else{Tc(e,!0,!1,0);break}for(;Ia(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(cv))return;let s=e.peek(1);lt(s)&&e.acceptTokenTo(t.context.type==za&&t.context.depth==Ln(e,n)?J7:al,n)}}},{contextual:!0});function kv(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Wc(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Ic(e,t){return e.next==37?(e.advance(),Wc(e.next)&&e.advance(),Wc(e.next)&&e.advance(),!0):!!(kv(e.next)||t&&e.next==44)&&(e.advance(),!0)}function Hc(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Ic(e,!0)){e.next==62&&e.advance();break}}else for(;Ic(e,!1););}function Xa(e){for(e.advance();!lt(e.next)&&_s(e.tag)!="f";)e.advance()}function or(e,t){let n=e.next,s=!1,o=e.pos;for(e.advance();;){let i=e.next;if(i<0)break;if(e.advance(),i==n)if(i==39)if(e.next==39)e.advance();else break;else break;else if(i==92&&n==34)e.next>=0&&e.advance();else if(Pe(i)){if(t)return!1;s=!0}else if(t&&e.pos>=o+1024)return!1}return!s}function zv(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!or(e,!0))return!1}else if(e.next==93||e.next==125){{if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}}else if(e.next<0||e.pos>n||Pe(e.next))return!1;else e.advance()}const Dv="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function _s(e){return e<33?"u":e>125?"s":Dv[e-33]}function Er(e,t){let n=_s(e);return n!="u"&&!(t&&n=="f")}function Tc(e,t,n,s){if(_s(e.next)=="s"||(e.next==63||e.next==58||e.next==45)&&Er(e.peek(1),n))e.advance();else return!1;let o=e.pos;for(;;){let i=e.next,a=0,r=s+1;for(;qc(i);){if(Pe(i)){if(t)return!1;r=0}else r++;i=e.peek(++a)}let c=i>=0&&(i==58?Er(e.peek(a+1),n):i==35?e.peek(a-1)!=32:Er(i,n));if(!c||!n&&r<=s||r==0&&!n&&(Jt(e,45,a)||Jt(e,46,a)))break;if(t&&_s(i)=="f")return!1;for(let t=a;t>=0;t--)e.advance();if(t&&e.pos>o+1024)return!1}return!0}const Pv=new C((e,t)=>{if(e.next==33)Hc(e),e.acceptToken(Ma);else if(e.next==38||e.next==42){let t=e.next==38?nv:sv;Xa(e),e.acceptToken(t)}else e.next==39||e.next==34?(or(e,!1),e.acceptToken(tv)):Tc(e,!1,t.context.type==An,t.context.depth)&&e.acceptToken(ev)}),Hv=new C((e,t)=>{let n=t.context.type==Da?t.context.depth:-1,s=e.pos;scan:for(;;){let o=0,i=e.next;for(;i==32;)i=e.peek(++o);if(!o&&(Jt(e,45,o)||Jt(e,46,o)))break;if(!Pe(i)&&(n<0&&(n=Math.max(t.context.depth+1,o)),oYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]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d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent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'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Cv,Ev,Pv,Hv,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),Vv=xe.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),$v=Ee.define({name:"yaml",parser:Bv.configure({props:[Te.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name=="BlockLiteralContent"&&t.frome.pos)return null}}return null},FlowMapping:St({closing:"}"}),FlowSequence:St({closing:"]"})}),Ce.add({"FlowMapping FlowSequence":On,"BlockSequence Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]}]$/}});function Wv(){return new We($v)}Ee.define({name:"yaml-frontmatter",parser:Vv.configure({props:[fe({DashLine:e.meta})]})});const kr=1,Kv=2,qv=3,Yv=4,Gv=5,Xv=35,Qv=36,Zv=37,Jv=11,e9=13;function t9(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function n9(e){return e==9||e==10||e==13||e==32}let Mc=null,Sc=null,kc=0;function Ar(e,t){let n=e.pos+t;if(Sc==e&&kc==n)return Mc;for(;n9(e.peek(t));)t++;let s="";for(;;){let n=e.peek(t);if(!t9(n))break;s+=String.fromCharCode(n),t++}return Sc=e,kc=n,Mc=s||null}function Ec(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t{if(e.next!=60)return;if(e.advance(),e.next==47){e.advance();let n=Ar(e,0);if(!n)return e.acceptToken(Gv);if(t.context&&n==t.context.name)return e.acceptToken(Kv);for(let s=t.context;s;s=s.parent)if(s.name==n)return e.acceptToken(qv,-2);e.acceptToken(Yv)}else if(e.next!=33&&e.next!=63)return e.acceptToken(kr)},{contextual:!0});function Sr(e,t){return new C(n=>{let s=0,o=t.charCodeAt(0);scan:for(;;n.advance(),s++){if(n.next<0)break;if(n.next==o){for(let e=1;e"),h9=Sr(Qv,"?>"),m9=Sr(Zv,"]]>"),f9=fe({Text:e.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":e.angleBracket,TagName:e.tagName,"MismatchedCloseTag/TagName":[e.tagName,e.invalid],AttributeName:e.attributeName,AttributeValue:e.attributeValue,Is:e.definitionOperator,"EntityReference CharacterReference":e.character,Comment:e.blockComment,ProcessingInst:e.processingInstruction,DoctypeDecl:e.documentMeta,Cdata:e.special(e.string)}),p9=xe.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOO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;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",tokenizers:[l9,u9,h9,m9,0,1,2,3],topRules:{Document:[0,6]},tokenPrec:0});function gs(e,t){let n=t&&t.getChild("TagName");return n?e.sliceString(n.from,n.to):""}function Tr(e,t){let n=t&&t.firstChild;return!n||n.name!="OpenTag"?"":gs(e,n)}function b9(e,t,n){let o=t&&t.getChildren("Attribute").find(e=>e.from<=n&&e.to>=n),s=o&&o.getChild("AttributeName");return s?e.sliceString(s.from,s.to):""}function zr(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function y9(e,t){let n=g(e).resolveInner(t,-1),s=null;for(let e=n;!s&&e.parent;e=e.parent)(e.name=="OpenTag"||e.name=="CloseTag"||e.name=="SelfClosingTag"||e.name=="MismatchedCloseTag")&&(s=e);if(s&&(s.to>t||s.lastChild.type.isError)){let o=s.parent;if(n.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:n.from,context:o}:{type:"openTag",from:n.from,context:zr(o)};if(n.name=="AttributeName")return{type:"attrName",from:n.from,context:s};if(n.name=="AttributeValue")return{type:"attrValue",from:n.from,context:s};let e=n==s||n.name=="Attribute"?n.childBefore(t):n;return e?.name=="StartTag"?{type:"openTag",from:t,context:zr(o)}:e?.name=="StartCloseTag"&&e.to<=t?{type:"closeTag",from:t,context:o}:e?.name=="Is"?{type:"attrValue",from:t,context:s}:e?{type:"attrName",from:t,context:s}:null}if(n.name=="StartCloseTag")return{type:"closeTag",from:t,context:n.parent};for(var o;n.parent&&n.to==t&&!((o=n.lastChild)===null||o===void 0?void 0:o.type.isError);)n=n.parent;return n.name=="Element"||n.name=="Text"||n.name=="Document"?{type:"tag",from:t,context:n.name=="Element"?n:zr(n)}:null}class _9{constructor(e,t,n){this.attrs=t,this.attrValues=n,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:"text"})):[]}}const Dr=/^[:\-.\w\u00b7-\uffff]*$/;function mc(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function hc(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function C9(e,t){let r=[],a=[],i=Object.create(null);for(let e of t){let n=mc(e);r.push(n),e.global&&a.push(n),e.values&&(i[e.name]=e.values.map(hc))}let s=[],o=[],n=Object.create(null);for(let c of e){let d=a,t=i;c.attributes&&(d=d.concat(c.attributes.map(e=>typeof e=="string"?r.find(t=>t.label==e)||{label:e,type:"property"}:(e.values&&(t==i&&(t=Object.create(t)),t[e.name]=e.values.map(hc)),mc(e)))));let l=new _9(c,d,t);n[l.name]=l,s.push(l),c.top&&o.push(l)}o.length||(o=s);for(let t=0;t{var d;let{doc:r}=e.state,u=y9(e.state,e.pos);if(!u||u.type=="tag"&&!e.explicit)return null;let{type:l,from:c,context:t}=u;if(l=="openTag"){let e=o,i=Tr(r,t);if(i){let t=n[i];e=t?.children||s}return{from:c,options:e.map(e=>e.completion),validFor:Dr}}if(l=="closeTag"){let s=Tr(r,t);return s?{from:c,to:e.pos+(r.sliceString(e.pos,e.pos+1)==">"?1:0),options:[((d=n[s])===null||d===void 0?void 0:d.closeNameCompletion)||{label:s+">",type:"type"}],validFor:Dr}:null}if(l=="attrName"){let e=n[gs(r,t)];return{from:c,options:e?.attrs||a,validFor:Dr}}if(l=="attrValue"){let a=b9(r,t,c);if(!a)return null;let s=n[gs(r,t)],o=(s?.attrValues||i)[a];return!o||!o.length?null:{from:c,to:e.pos+(r.sliceString(e.pos,e.pos+1)=='"'?1:0),options:o,validFor:/^"[^"]*"?$/}}if(l=="tag"){let a=Tr(r,t),i=n[a],u=[],l=t&&t.lastChild;a&&(!l||l.name!="CloseTag"||gs(r,l)!=a)&&u.push(i?i.closeCompletion:{label:"",type:"type",boost:2});let d=u.concat((i?.children||(t?s:o)).map(e=>e.openCompletion));if(t&&i?.text.length){let n=t.firstChild;n.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(n.to,e.pos))&&(d=d.concat(i.text))}return{from:c,options:d,validFor:/^<\/?[:\-.\w\u00b7-\uffff]*$/}}return null}}const Pr=Ee.define({name:"xml",parser:p9.configure({props:[Te.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Ce.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),Gi.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function k9(e={}){let t=[Pr.data.of({autocomplete:C9(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(S9),new We(Pr,t)}function cc(e,t,n=e.length){if(!t)return"";let o=t.firstChild,s=o&&o.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,n)):""}const S9=o.inputHandler.of((e,n,s,o,i)=>{if(e.composing||e.state.readOnly||n!=s||o!=">"&&o!="/"||!Pr.isActiveAt(e.state,n,-1))return!1;let r=i(),{state:a}=r,c=a.changeByRange(e=>{var r,c,l;let{head:n}=e,d=a.doc.sliceString(n-1,n)==o,s=g(a).resolveInner(n,-1),i;if(d&&o==">"&&s.name=="EndTag"){{let t=s.parent;if(((c=(r=t.parent)===null||r===void 0?void 0:r.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(i=cc(a.doc,t.parent,n))){let t=n+(a.doc.sliceString(n,n+1)===">"?1:0),s=``;return{range:e,changes:{from:n,to:t,insert:s}}}}}else if(d&&o=="/"&&s.name=="StartCloseTag"){let e=s.parent;if(s.from==n-2&&((l=e.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(i=cc(a.doc,e,n))){let s=n+(a.doc.sliceString(n,n+1)===">"?1:0),e=`${i}>`;return{range:t.cursor(n+e.length,-1),changes:{from:n,to:s,insert:e}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([r,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),M9="#e5c07b",rc="#e06c75",T9="#56b6c2",z9="#ffffff",cs="#abb2bf",Ir="#7d8799",L9="#61afef",R9="#98c379",sc="#d19a66",H9="#c678dd",I9="#21252b",ec="#2c313a",Zr="#282c34",Vr="#353a42",W9="#3E4451",Xr="#528bff",K9=o.theme({"&":{color:cs,backgroundColor:Zr},".cm-content":{caretColor:Xr},".cm-cursor, .cm-dropCursor":{borderLeftColor:Xr},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:W9},".cm-panels":{backgroundColor:I9,color:cs},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Zr,color:Ir,border:"none"},".cm-activeLineGutter":{backgroundColor:ec},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Vr},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Vr,borderBottomColor:Vr},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ec,color:cs}}},{dark:!0}),q9=Zs.define([{tag:e.keyword,color:H9},{tag:[e.name,e.deleted,e.character,e.propertyName,e.macroName],color:rc},{tag:[e.function(e.variableName),e.labelName],color:L9},{tag:[e.color,e.constant(e.name),e.standard(e.name)],color:sc},{tag:[e.definition(e.name),e.separator],color:cs},{tag:[e.typeName,e.className,e.number,e.changed,e.annotation,e.modifier,e.self,e.namespace],color:M9},{tag:[e.operator,e.operatorKeyword,e.url,e.escape,e.regexp,e.link,e.special(e.string)],color:T9},{tag:[e.meta,e.comment],color:Ir},{tag:e.strong,fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.link,color:Ir,textDecoration:"underline"},{tag:e.heading,fontWeight:"bold",color:rc},{tag:[e.atom,e.bool,e.special(e.variableName)],color:sc},{tag:[e.processingInstruction,e.string,e.inserted],color:R9},{tag:e.invalid,color:z9}]),Y9=[K9,Qd(q9)];function G9(){return yt.of([{key:"F11",run(){return $(".cm-editor").parent().toggleClass("cm-full-screen"),!0}}])}function Gr(e,t){let n=L0(e.state);if(n.search==t)Wt(e);else{$(".cm-textfield").val(""),$(".cm-textfield").trigger("change");var s=new Uo({search:t,caseSensitive:!0,regexp:!1,wholeWord:!1});e.dispatch({effects:Ht.of(s)}),L0(e.state),Wt(e)}e.focus()}function Yr(e,t,n,s,i){let a=[xh];i&&a.push(o.lineWrapping);function c(e){let t=e.matchBefore(/\w*/);return t.from==t.to&&!e.explicit?null:{from:t.from,options:typeof window!="undefined"?window.daAutoComp:global.daAutoComp}}switch(a.push(t2({override:[c],activateOnTyping:!1})),window.matchMedia("(prefers-color-scheme: dark)").matches&&a.push(Y9),n){case"tsx":case"ts":case"node":case"jsonld":case"ecmascript":case"js":a.push(T4());break;case"json":a.push(i8());break;case"html":a.push(qu());break;case"md":a.push(Vg());break;case"scss":case"less":case"gss":case"css":a.push(l4());break;case"pxd":case"pxi":case"pyx":case"py":a.push(V7());break;case"yaml":case"yml":a.push(Wv());break;case"xsd":case"xsl":case"xml":a.push(k9());break}a=[...a,Iu(),h.tabSize.of(2),Hh(),tc(),du(),Ml({specialChars:/[\u00a0\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g}),G9()];var r=[...W4];switch(s){case"emacs":r=[...r,...V4]}return r=[...r,...i1,...e2,Bm],a.push(yt.of(r)),new o({doc:t,extensions:a,parent:e,lineWrapping:i})}typeof window!="undefined"?(window.daNewEditor=Yr,window.daStartNewSearch=Gr):typeof global!="undefined"&&(global.daNewEditor=Yr,global.daStartNewSearch=Gr)})() \ No newline at end of file +`,{label:"if",detail:"block",type:"keyword"}),x("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),x("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),x("import ${module}",{label:"import",detail:"statement",type:"keyword"}),x("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],H7=h2(fl,ai(R7.concat(P7)));function ml(e){let{node:t,pos:n}=e,o=e.lineIndent(n,-1),s=null;for(;;){let i=t.childBefore(n);if(!i)break;if(i.name=="Comment")n=i.from;else if(i.name=="Body")e.baseIndentFor(i)+e.unit<=o&&(s=i),t=i;else if(i.type.is("Statement"))t=i;else break}return s}function hl(e,t){let n=e.baseIndentFor(t),s=e.lineAt(e.pos,-1),o=s.from+s.text.length;return/^\s*($|#)/.test(s.text)&&e.node.ton?null:n+e.unit}const ka=xe.define({name:"python",parser:A7.configure({props:[Te.add({Body:e=>{var t;let n=ml(e);return(t=hl(e,n||e.node))!==null&&t!==void 0?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":Jt({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":Jt({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":Jt({closing:"]"}),"String FormatString":()=>null,Script:e=>{var t;let n=ml(e);return(t=n&&hl(e,n))!==null&&t!==void 0?t:e.continue()}}),Ce.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":Gn,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([}\])]|else:|elif |except |finally:)$/}});function $7(){return new Le(ka,[ka.data.of({autocomplete:L7}),ka.data.of({autocomplete:H7})])}const Ht=63,ul=64,K7=1,q7=2,ll=3,G7=4,rl=5,Q7=6,Z7=7,al=65,ev=66,tv=8,nv=9,sv=10,ov=11,Ma=12,il=13,rv=19,cv=20,lv=29,dv=33,uv=34,hv=47,mv=0,Ta=1,za=2,Tn=3,Da=4;class _t{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}}_t.top=new _t(null,-1,mv);function Sn(e,t){for(let n=0,s=t-e.pos-1;;s--,n++){let o=e.peek(s);if($e(o)||o==-1)return n}}function Ia(e){return e==32||e==9}function $e(e){return e==10||e==13}function qc(e){return Ia(e)||$e(e)}function ht(e){return e<0||qc(e)}const xv=new Yn({start:_t.top,reduce(e,t){return e.type==Tn&&(t==cv||t==uv)?e.parent:e},shift(e,t,n,s){if(t==ll)return new _t(e,Sn(s,s.pos),Ta);if(t==al||t==rl)return new _t(e,Sn(s,s.pos),za);if(t==Ht)return e.parent;if(t==rv||t==dv)return new _t(e,0,Tn);if(t==il&&e.type==Da)return e.parent;if(t==hv){let t=/[1-9]/.exec(s.read(s.pos,n.pos));if(t)return new _t(e,e.depth+ +t[0],Da)}return e},hash(e){return e.hash}});function Zt(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&ht(e.peek(n+3))}const Ev=new C((e,t)=>{if(e.next==-1&&t.canShift(ul))return e.acceptToken(ul);let n=e.peek(-1);if(($e(n)||n<0)&&t.context.type!=Tn){if(Zt(e,45))if(t.canShift(Ht))e.acceptToken(Ht);else return e.acceptToken(K7,3);if(Zt(e,46))if(t.canShift(Ht))e.acceptToken(Ht);else return e.acceptToken(q7,3);let n=0;for(;e.next==32;)n++,e.advance();(n{if(t.context.type==Tn){e.next==63&&(e.advance(),ht(e.next)&&e.acceptToken(Z7));return}if(e.next==45)e.advance(),ht(e.next)&&e.acceptToken(t.context.type==Ta&&t.context.depth==Sn(e,e.pos-1)?G7:ll);else if(e.next==63)e.advance(),ht(e.next)&&e.acceptToken(t.context.type==za&&t.context.depth==Sn(e,e.pos-1)?Q7:rl);else{let n=e.pos;for(;;)if(Ia(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)Hc(e);else if(e.next==38)Xa(e);else if(e.next==42){Xa(e);break}else if(e.next==39||e.next==34){if(or(e,!0))break;return}else if(e.next==91||e.next==123){if(!Dv(e))return;break}else{Tc(e,!0,!1,0);break}for(;Ia(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(lv))return;let s=e.peek(1);ht(s)&&e.acceptTokenTo(t.context.type==za&&t.context.depth==Sn(e,n)?ev:al,n)}}},{contextual:!0});function Av(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Wc(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Ic(e,t){return e.next==37?(e.advance(),Wc(e.next)&&e.advance(),Wc(e.next)&&e.advance(),!0):!!(Av(e.next)||t&&e.next==44)&&(e.advance(),!0)}function Hc(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Ic(e,!0)){e.next==62&&e.advance();break}}else for(;Ic(e,!1););}function Xa(e){for(e.advance();!ht(e.next)&&_s(e.tag)!="f";)e.advance()}function or(e,t){let n=e.next,s=!1,o=e.pos;for(e.advance();;){let i=e.next;if(i<0)break;if(e.advance(),i==n)if(i==39)if(e.next==39)e.advance();else break;else break;else if(i==92&&n==34)e.next>=0&&e.advance();else if($e(i)){if(t)return!1;s=!0}else if(t&&e.pos>=o+1024)return!1}return!s}function Dv(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!or(e,!0))return!1}else if(e.next==93||e.next==125){{if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}}else if(e.next<0||e.pos>n||$e(e.next))return!1;else e.advance()}const Nv="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function _s(e){return e<33?"u":e>125?"s":Nv[e-33]}function Er(e,t){let n=_s(e);return n!="u"&&!(t&&n=="f")}function Tc(e,t,n,s){if(_s(e.next)=="s"||(e.next==63||e.next==58||e.next==45)&&Er(e.peek(1),n))e.advance();else return!1;let o=e.pos;for(;;){let i=e.next,a=0,r=s+1;for(;qc(i);){if($e(i)){if(t)return!1;r=0}else r++;i=e.peek(++a)}let c=i>=0&&(i==58?Er(e.peek(a+1),n):i==35?e.peek(a-1)!=32:Er(i,n));if(!c||!n&&r<=s||r==0&&!n&&(Zt(e,45,a)||Zt(e,46,a)))break;if(t&&_s(i)=="f")return!1;for(let t=a;t>=0;t--)e.advance();if(t&&e.pos>o+1024)return!1}return!0}const Hv=new C((e,t)=>{if(e.next==33)Hc(e),e.acceptToken(Ma);else if(e.next==38||e.next==42){let t=e.next==38?sv:ov;Xa(e),e.acceptToken(t)}else e.next==39||e.next==34?(or(e,!1),e.acceptToken(nv)):Tc(e,!1,t.context.type==Tn,t.context.depth)&&e.acceptToken(tv)}),Iv=new C((e,t)=>{let n=t.context.type==Da?t.context.depth:-1,s=e.pos;scan:for(;;){let o=0,i=e.next;for(;i==32;)i=e.peek(++o);if(!o&&(Zt(e,45,o)||Zt(e,46,o)))break;if(!$e(i)&&(n<0&&(n=Math.max(t.context.depth+1,o)),oYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX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air Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:xv,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[Bv],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Ev,kv,Hv,Iv,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),$v=ke.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),Wv=xe.define({name:"yaml",parser:Vv.configure({props:[Te.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name=="BlockLiteralContent"&&t.frome.pos)return null}}return null},FlowMapping:Jt({closing:"}"}),FlowSequence:Jt({closing:"]"})}),Ce.add({"FlowMapping FlowSequence":Gn,"BlockSequence Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]}]$/}});function Uv(){return new Le(Wv)}xe.define({name:"yaml-frontmatter",parser:$v.configure({props:[de({DashLine:e.meta})]})});const kr=1,qv=2,Yv=3,Gv=4,Xv=5,Qv=35,Zv=36,Jv=37,e9=11,t9=13;function n9(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function s9(e){return e==9||e==10||e==13||e==32}let Mc=null,Sc=null,kc=0;function Ar(e,t){let n=e.pos+t;if(Sc==e&&kc==n)return Mc;for(;s9(e.peek(t));)t++;let s="";for(;;){let n=e.peek(t);if(!n9(n))break;s+=String.fromCharCode(n),t++}return Sc=e,kc=n,Mc=s||null}function Ec(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t{if(e.next!=60)return;if(e.advance(),e.next==47){e.advance();let n=Ar(e,0);if(!n)return e.acceptToken(Xv);if(t.context&&n==t.context.name)return e.acceptToken(qv);for(let s=t.context;s;s=s.parent)if(s.name==n)return e.acceptToken(Yv,-2);e.acceptToken(Gv)}else if(e.next!=33&&e.next!=63)return e.acceptToken(kr)},{contextual:!0});function Sr(e,t){return new C(n=>{let s=0,o=t.charCodeAt(0);scan:for(;;n.advance(),s++){if(n.next<0)break;if(n.next==o){for(let e=1;e"),m9=Sr(Zv,"?>"),f9=Sr(Jv,"]]>"),p9=de({Text:e.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":e.angleBracket,TagName:e.tagName,"MismatchedCloseTag/TagName":[e.tagName,e.invalid],AttributeName:e.attributeName,AttributeValue:e.attributeValue,Is:e.definitionOperator,"EntityReference CharacterReference":e.character,Comment:e.blockComment,ProcessingInst:e.processingInstruction,DoctypeDecl:e.documentMeta,Cdata:e.special(e.string)}),g9=ke.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!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<%lO%yXB}V{WOr%ysv%yw#h%y#h#iCd#i;'S%y;'S;=`&_<%lO%yXCiV{WOr%ysv%yw#m%y#m#nDO#n;'S%y;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",tokenizers:[d9,h9,m9,f9,0,1,2,3],topRules:{Document:[0,6]},tokenPrec:0});function gs(e,t){let n=t&&t.getChild("TagName");return n?e.sliceString(n.from,n.to):""}function Tr(e,t){let n=t&&t.firstChild;return!n||n.name!="OpenTag"?"":gs(e,n)}function j9(e,t,n){let o=t&&t.getChildren("Attribute").find(e=>e.from<=n&&e.to>=n),s=o&&o.getChild("AttributeName");return s?e.sliceString(s.from,s.to):""}function zr(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}function _9(e,t){let n=g(e).resolveInner(t,-1),s=null;for(let e=n;!s&&e.parent;e=e.parent)(e.name=="OpenTag"||e.name=="CloseTag"||e.name=="SelfClosingTag"||e.name=="MismatchedCloseTag")&&(s=e);if(s&&(s.to>t||s.lastChild.type.isError)){let o=s.parent;if(n.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:n.from,context:o}:{type:"openTag",from:n.from,context:zr(o)};if(n.name=="AttributeName")return{type:"attrName",from:n.from,context:s};if(n.name=="AttributeValue")return{type:"attrValue",from:n.from,context:s};let e=n==s||n.name=="Attribute"?n.childBefore(t):n;return e?.name=="StartTag"?{type:"openTag",from:t,context:zr(o)}:e?.name=="StartCloseTag"&&e.to<=t?{type:"closeTag",from:t,context:o}:e?.name=="Is"?{type:"attrValue",from:t,context:s}:e?{type:"attrName",from:t,context:s}:null}if(n.name=="StartCloseTag")return{type:"closeTag",from:t,context:n.parent};for(var o;n.parent&&n.to==t&&!((o=n.lastChild)===null||o===void 0?void 0:o.type.isError);)n=n.parent;return n.name=="Element"||n.name=="Text"||n.name=="Document"?{type:"tag",from:t,context:n.name=="Element"?n:zr(n)}:null}class w9{constructor(e,t,n){this.attrs=t,this.attrValues=n,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:"text"})):[]}}const Dr=/^[:\-.\w\u00b7-\uffff]*$/;function mc(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function hc(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function E9(e,t){let r=[],a=[],i=Object.create(null);for(let e of t){let n=mc(e);r.push(n),e.global&&a.push(n),e.values&&(i[e.name]=e.values.map(hc))}let s=[],o=[],n=Object.create(null);for(let c of e){let d=a,t=i;c.attributes&&(d=d.concat(c.attributes.map(e=>typeof e=="string"?r.find(t=>t.label==e)||{label:e,type:"property"}:(e.values&&(t==i&&(t=Object.create(t)),t[e.name]=e.values.map(hc)),mc(e)))));let l=new w9(c,d,t);n[l.name]=l,s.push(l),c.top&&o.push(l)}o.length||(o=s);for(let t=0;t{var d;let{doc:r}=e.state,u=_9(e.state,e.pos);if(!u||u.type=="tag"&&!e.explicit)return null;let{type:l,from:c,context:t}=u;if(l=="openTag"){let e=o,i=Tr(r,t);if(i){let t=n[i];e=t?.children||s}return{from:c,options:e.map(e=>e.completion),validFor:Dr}}if(l=="closeTag"){let s=Tr(r,t);return s?{from:c,to:e.pos+(r.sliceString(e.pos,e.pos+1)==">"?1:0),options:[((d=n[s])===null||d===void 0?void 0:d.closeNameCompletion)||{label:s+">",type:"type"}],validFor:Dr}:null}if(l=="attrName"){let e=n[gs(r,t)];return{from:c,options:e?.attrs||a,validFor:Dr}}if(l=="attrValue"){let a=j9(r,t,c);if(!a)return null;let s=n[gs(r,t)],o=(s?.attrValues||i)[a];return!o||!o.length?null:{from:c,to:e.pos+(r.sliceString(e.pos,e.pos+1)=='"'?1:0),options:o,validFor:/^"[^"]*"?$/}}if(l=="tag"){let a=Tr(r,t),i=n[a],u=[],l=t&&t.lastChild;a&&(!l||l.name!="CloseTag"||gs(r,l)!=a)&&u.push(i?i.closeCompletion:{label:"",type:"type",boost:2});let d=u.concat((i?.children||(t?s:o)).map(e=>e.openCompletion));if(t&&i?.text.length){let n=t.firstChild;n.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(n.to,e.pos))&&(d=d.concat(i.text))}return{from:c,options:d,validFor:/^<\/?[:\-.\w\u00b7-\uffff]*$/}}return null}}const Pr=xe.define({name:"xml",parser:g9.configure({props:[Te.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Ce.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),Gi.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function A9(e={}){let t=[Pr.data.of({autocomplete:E9(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(M9),new Le(Pr,t)}function cc(e,t,n=e.length){if(!t)return"";let o=t.firstChild,s=o&&o.getChild("TagName");return s?e.sliceString(s.from,Math.min(s.to,n)):""}const M9=o.inputHandler.of((e,n,s,o,i)=>{if(e.composing||e.state.readOnly||n!=s||o!=">"&&o!="/"||!Pr.isActiveAt(e.state,n,-1))return!1;let r=i(),{state:a}=r,c=a.changeByRange(e=>{var r,c,l;let{head:n}=e,d=a.doc.sliceString(n-1,n)==o,s=g(a).resolveInner(n,-1),i;if(d&&o==">"&&s.name=="EndTag"){{let t=s.parent;if(((c=(r=t.parent)===null||r===void 0?void 0:r.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(i=cc(a.doc,t.parent,n))){let t=n+(a.doc.sliceString(n,n+1)===">"?1:0),s=``;return{range:e,changes:{from:n,to:t,insert:s}}}}}else if(d&&o=="/"&&s.name=="StartCloseTag"){let e=s.parent;if(s.from==n-2&&((l=e.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(i=cc(a.doc,e,n))){let s=n+(a.doc.sliceString(n,n+1)===">"?1:0),e=`${i}>`;return{range:t.cursor(n+e.length,-1),changes:{from:n,to:s,insert:e}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([r,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),F9="#e5c07b",rc="#e06c75",z9="#56b6c2",D9="#ffffff",cs="#abb2bf",Ir="#7d8799",R9="#61afef",P9="#98c379",sc="#d19a66",I9="#c678dd",B9="#21252b",ec="#2c313a",Zr="#282c34",Vr="#353a42",U9="#3E4451",Xr="#528bff",q9=o.theme({"&":{color:cs,backgroundColor:Zr},".cm-content":{caretColor:Xr},".cm-cursor, .cm-dropCursor":{borderLeftColor:Xr},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:U9},".cm-panels":{backgroundColor:B9,color:cs},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Zr,color:Ir,border:"none"},".cm-activeLineGutter":{backgroundColor:ec},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Vr},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Vr,borderBottomColor:Vr},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ec,color:cs}}},{dark:!0}),Y9=Qs.define([{tag:e.keyword,color:I9},{tag:[e.name,e.deleted,e.character,e.propertyName,e.macroName],color:rc},{tag:[e.function(e.variableName),e.labelName],color:R9},{tag:[e.color,e.constant(e.name),e.standard(e.name)],color:sc},{tag:[e.definition(e.name),e.separator],color:cs},{tag:[e.typeName,e.className,e.number,e.changed,e.annotation,e.modifier,e.self,e.namespace],color:F9},{tag:[e.operator,e.operatorKeyword,e.url,e.escape,e.regexp,e.link,e.special(e.string)],color:z9},{tag:[e.meta,e.comment],color:Ir},{tag:e.strong,fontWeight:"bold"},{tag:e.emphasis,fontStyle:"italic"},{tag:e.strikethrough,textDecoration:"line-through"},{tag:e.link,color:Ir,textDecoration:"underline"},{tag:e.heading,fontWeight:"bold",color:rc},{tag:[e.atom,e.bool,e.special(e.variableName)],color:sc},{tag:[e.processingInstruction,e.string,e.inserted],color:P9},{tag:e.invalid,color:D9}]),G9=[q9,Qd(Y9)];function X9(){return xt.of([{key:"F11",run(){return $(".cm-editor").parent().toggleClass("cm-full-screen"),!0}}])}function Gr(e,t){let n=L0(e.state);if(n.search==t)Wt(e);else{$(".cm-textfield").val(""),$(".cm-textfield").trigger("change");var s=new Uo({search:t,caseSensitive:!0,regexp:!1,wholeWord:!1});e.dispatch({effects:It.of(s)}),L0(e.state),Wt(e)}e.focus()}function Yr(e,t,n,s,i){let a=[xh];i&&a.push(o.lineWrapping);function c(e){let t=e.matchBefore(/\w*/);return t.from==t.to&&!e.explicit?null:{from:t.from,options:typeof window!="undefined"?window.daAutoComp:global.daAutoComp}}switch(a.push(n2({override:[c],activateOnTyping:!1})),window.matchMedia("(prefers-color-scheme: dark)").matches&&a.push(G9),n){case"tsx":case"ts":case"node":case"jsonld":case"ecmascript":case"js":a.push(T4());break;case"json":a.push(i8());break;case"html":a.push(qu());break;case"md":a.push($g());break;case"scss":case"less":case"gss":case"css":a.push(l4());break;case"pxd":case"pxi":case"pyx":case"py":a.push($7());break;case"yaml":case"yml":a.push(Uv());break;case"xsd":case"xsl":case"xml":a.push(A9());break}a=[...a,Iu(),h.tabSize.of(2),Hh(),tc(),du(),Ml({specialChars:/[\u00a0\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g}),X9()];var r=[...W4];switch(s){case"emacs":r=[...r,...V4]}return r=[...r,...i1,...e2,Bm],a.push(xt.of(r)),new o({doc:t,extensions:a,parent:e,lineWrapping:i})}typeof window!="undefined"?(window.daNewEditor=Yr,window.daStartNewSearch=Gr):typeof global!="undefined"&&(global.daNewEditor=Yr,global.daStartNewSearch=Gr)})() \ No newline at end of file diff --git a/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js b/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js index 2c00fca6a..c72110d7f 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js +++ b/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js @@ -1,7 +1,7 @@ /*! - * Socket.IO v4.5.4 - * (c) 2014-2022 Guillermo Rauch + * Socket.IO v4.8.1 + * (c) 2014-2024 Guillermo Rauch * Released under the MIT License. */ -!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).io=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var m=Object.create(null);m.open="0",m.close="1",m.ping="2",m.pong="3",m.message="4",m.upgrade="5",m.noop="6";var b=Object.create(null);Object.keys(m).forEach((function(t){b[m[t]]=t}));for(var k={type:"error",data:"parser error"},w="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),_="function"==typeof ArrayBuffer,E=function(t,e,n){var r,i=t.type,o=t.data;return w&&o instanceof Blob?e?n(o):O(o,n):_&&(o instanceof ArrayBuffer||(r=o,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer))?e?n(o):O(new Blob([o]),n):n(m[i]+(o||""))},O=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+t)},n.readAsDataURL(t)},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"==typeof Uint8Array?[]:new Uint8Array(256),T=0;T1?{type:b[n],data:t.substring(1)}:{type:b[n]}:k},S=function(t,e){if(C){var n=function(t){var e,n,r,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e>4,h[c++]=(15&r)<<4|i>>2,h[c++]=(3&i)<<6|63&o;return u}(t);return N(n,e)}return{base64:!0,data:t}},N=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},x=String.fromCharCode(30);function L(t){if(t)return function(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}(t)}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},L.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i1?e-1:0),r=1;r0);return e}function W(){var t=z(+new Date);return t!==F?(K=0,F=t):t+"."+z(K++)}for(;Y<64;Y++)H[V[Y]]=Y;function $(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function J(t){for(var e={},n=t.split("&"),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd,xs:this.xs},this.opts),new nt(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),s}(U),nt=function(t){o(i,t);var n=p(i);function i(t,r){var o;return e(this,i),D(f(o=n.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return r(i,[{key:"create",value:function(){var t=this,e=j(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var n=this.xhr=new Q(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var r in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=function(){4===n.readyState&&(200===n.status||1223===n.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof n.status?n.status:0)}),0))},n.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Z,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(L);if(nt.requestsCount=0,nt.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",rt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in P?"pagehide":"unload",rt,!1)}function rt(){for(var t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var it="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},ot=P.WebSocket||P.MozWebSocket,st="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),at=function(t){o(i,t);var n=p(i);function i(t){var r;return e(this,i),(r=n.call(this,t)).supportsBinary=!t.forceBase64,r}return r(i,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=st?{}:j(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=st?new ot(t,e,n):e?new ot(t,e):new ot(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(n){var r=t[n],i=n===t.length-1;E(r,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}i&&it((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),r=s.call(this),n&&"object"===t(n)&&(o=n,n=null),n?(n=ft(n),o.hostname=n.host,o.secure="https"===n.protocol||"wss"===n.protocol,o.port=n.port,n.query&&(o.query=n.query)):o.host&&(o.hostname=ft(o.host).host),D(f(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket"],r.readyState="",r.writeBuffer=[],r.prevBufferLen=0,r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),r.opts.path=r.opts.path.replace(/\/$/,"")+"/","string"==typeof r.opts.query&&(r.opts.query=J(r.opts.query)),r.id=null,r.upgrades=null,r.pingInterval=null,r.pingTimeout=null,r.pingTimeoutTimer=null,"function"==typeof addEventListener&&(r.opts.closeOnBeforeunload&&(r.beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r.beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r.offlineEventListener=function(){r.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",r.offlineEventListener,!1))),r.open(),r}return r(a,[{key:"createTransport",value:function(t){var e=i({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var n=i({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ct[t](n)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,n=this.createTransport(t),r=!1;a.priorWebsocketSuccess=!1;var i=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",n),!n)return;a.priorWebsocketSuccess="websocket"===n.name,e.transport.pause((function(){r||"closed"!==e.readyState&&(f(),e.setTransport(n),n.send([{type:"upgrade"}]),e.emitReserved("upgrade",n),n=null,e.upgrading=!1,e.flush())}))}else{var i=new Error("probe error");i.transport=n.name,e.emitReserved("upgradeError",i)}})))};function o(){r||(r=!0,f(),n.close(),n=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=n.name,o(),e.emitReserved("upgradeError",r)};function c(){s("transport closed")}function u(){s("socket closed")}function h(t){n&&t.name!==n.name&&o()}var f=function(){n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",c),e.off("close",u),e.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",c),this.once("close",u),this.once("upgrading",h),n.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t1))return this.writeBuffer;for(var t,e=1,n=0;n=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n=0&&e.num0;case Et.ACK:case Et.BINARY_ACK:return Array.isArray(n)}}}]),a}(L),Rt=function(){function t(n){e(this,t),this.packet=n,this.buffers=[],this.reconPack=n}return r(t,[{key:"takeBinaryData",value:function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=wt(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}]),t}(),Tt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return Et},Encoder:Ot,Decoder:At});function Ct(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var Bt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),St=function(t){o(i,t);var n=p(i);function i(t,r,o){var s;return e(this,i),(s=n.call(this)).connected=!1,s.receiveBuffer=[],s.sendBuffer=[],s.ids=0,s.acks={},s.flags={},s.io=t,s.nsp=r,o&&o.auth&&(s.auth=o.auth),s.io._autoConnect&&s.open(),s}return r(i,[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var t=this.io;this.subs=[Ct(t,"open",this.onopen.bind(this)),Ct(t,"packet",this.onpacket.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},Nt.prototype.reset=function(){this.attempts=0},Nt.prototype.setMin=function(t){this.ms=t},Nt.prototype.setMax=function(t){this.max=t},Nt.prototype.setJitter=function(t){this.jitter=t};var xt=function(n){o(s,n);var i=p(s);function s(n,r){var o,a;e(this,s),(o=i.call(this)).nsps={},o.subs=[],n&&"object"===t(n)&&(r=n,n=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,D(f(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(a=r.randomizationFactor)&&void 0!==a?a:.5),o.backoff=new Nt({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=n;var c=r.parser||Tt;return o.encoder=new c.Encoder,o.decoder=new c.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return r(s,[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new lt(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=Ct(n,"open",(function(){r.onopen(),t&&t()})),o=Ct(n,"error",(function(n){r.cleanup(),r._readyState="closed",e.emitReserved("error",n),t?t(n):r.maybeReconnectOnOpen()}));if(!1!==this._timeout){var s=this._timeout;0===s&&i();var a=this.setTimeoutFn((function(){i(),n.close(),n.emit("error",new Error("timeout"))}),s);this.opts.autoUnref&&a.unref(),this.subs.push((function(){clearTimeout(a)}))}return this.subs.push(i),this.subs.push(o),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(Ct(t,"ping",this.onping.bind(this)),Ct(t,"data",this.ondata.bind(this)),Ct(t,"error",this.onerror.bind(this)),Ct(t,"close",this.onclose.bind(this)),Ct(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(t){var e=this;it((function(){e.emitReserved("packet",t)}),this.setTimeoutFn)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n||(n=new St(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){clearTimeout(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}]),s}(L),Lt={};function Pt(e,n){"object"===t(e)&&(n=e,e=void 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i.path,c=Lt[s]&&a in Lt[s].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||c?r=new xt(o,n):(Lt[s]||(Lt[s]=new xt(o,n)),r=Lt[s]),i.query&&!n.query&&(n.query=i.queryKey),r.socket(i.path,n)}return i(Pt,{Manager:xt,Socket:St,io:Pt,connect:Pt}),Pt})); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).io=n()}(this,(function(){"use strict";function t(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,u=!0,h=!1;return{s:function(){r=r.call(n)},n:function(){var t=r.next();return u=t.done,t},e:function(t){h=!0,s=t},f:function(){try{u||null==r.return||r.return()}finally{if(h)throw s}}}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var n=1;n1?{type:l[i],data:t.substring(1)}:{type:l[i]}:d},N=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var f=new ArrayBuffer(s),c=new Uint8Array(f);for(n=0;n>4,c[h++]=(15&r)<<4|e>>2,c[h++]=(3&e)<<6|63&o;return f}(t);return C(i,n)}return{base64:!0,data:t}},C=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function U(){return new TransformStream({transform:function(t,n){!function(t,n){y&&t.data instanceof Blob?t.data.arrayBuffer().then(k).then(n):b&&(t.data instanceof ArrayBuffer||w(t.data))?n(k(t.data)):g(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(I),X=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}s(n,t);var r=n.prototype;return r.doOpen=function(){this.v()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.v=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e(t,{xd:this.xd},this.opts),new Y(tt,this.uri(),t)},n}(K);function tt(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||z))return new XMLHttpRequest}catch(t){}if(!n)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),it=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=nt?{}:_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.C.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;g(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;rMath.pow(2,21)-1){u.enqueue(d);break}e=v*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)t){u.enqueue(d);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=U();e.readable.pipeTo(n.writable),t.U=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.U.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.U.write(i).then((function(){e&&R((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ut.exec(t||""),u={},h=14;h--;)u[ht[h]]=s[h]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ct="function"==typeof addEventListener&&"function"==typeof removeEventListener,at=[];ct&&addEventListener("offline",(function(){at.forEach((function(t){return t()}))}),!1);var vt=function(t){function n(n,i){var r;if((r=t.call(this)||this).binaryType="arraybuffer",r.writeBuffer=[],r.M=0,r.I=-1,r.R=-1,r.L=-1,r._=1/0,n&&"object"===c(n)&&(i=n,n=null),n){var o=ft(n);i.hostname=o.host,i.secure="https"===o.protocol||"wss"===o.protocol,i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=ft(i.host).host);return $(r,i),r.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=r.secure?"443":"80"),r.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=i.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r.D={},i.transports.forEach((function(t){var n=t.prototype.name;r.transports.push(n),r.D[n]=t})),r.opts=e({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r1))return this.writeBuffer;for(var t,n=1,i=0;i=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.L)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},i.W=function(){var t=this;if(!this._)return!0;var n=Date.now()>this._;return n&&(this._=0,R((function(){t.F("ping timeout")}),this.setTimeoutFn)),n},i.write=function(t,n,i){return this.J("message",t,n,i),this},i.send=function(t,n,i){return this.J("message",t,n,i),this},i.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},i.close=function(){var t=this,n=function(){t.F("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},i.B=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.F("transport error",t)},i.F=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Y),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ct&&(this.P&&removeEventListener("beforeunload",this.P,!1),this.$)){var i=at.indexOf(this.$);-1!==i&&at.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.M=0}},n}(I);vt.protocol=4;var lt=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Z=[],n}s(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r="object"===c(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return st[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return s(n,t),n}(lt);pt.protocol;var dt="function"==typeof ArrayBuffer,yt=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer},bt=Object.prototype.toString,wt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===bt.call(Blob),gt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===bt.call(File);function mt(t){return dt&&(t instanceof ArrayBuffer||yt(t))||wt&&t instanceof Blob||gt&&t instanceof File}function kt(t,n){if(!t||"object"!==c(t))return!1;if(Array.isArray(t)){for(var i=0,r=t.length;i=0&&t.num1?e-1:0),s=1;s1?i-1:0),e=1;ei.l.retries&&(i.it.shift(),n&&n(t));else if(i.it.shift(),n){for(var e=arguments.length,o=new Array(e>1?e-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this.it.length){var n=this.it[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}},o.packet=function(t){t.nsp=this.nsp,this.io.ct(t)},o.onopen=function(){var t=this;"function"==typeof this.auth?this.auth((function(n){t.vt(n)})):this.vt(this.auth)},o.vt=function(t){this.packet({type:Bt.CONNECT,data:this.lt?e({pid:this.lt,offset:this.dt},t):t})},o.onerror=function(t){this.connected||this.emitReserved("connect_error",t)},o.onclose=function(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this.yt()},o.yt=function(){var t=this;Object.keys(this.acks).forEach((function(n){if(!t.sendBuffer.some((function(t){return String(t.id)===n}))){var i=t.acks[n];delete t.acks[n],i.withError&&i.call(t,new Error("socket has been disconnected"))}}))},o.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n)}},o.onevent=function(t){var n=t.data||[];null!=t.id&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))},o.emitEvent=function(n){if(this.bt&&this.bt.length){var i,e=r(this.bt.slice());try{for(e.s();!(i=e.n()).done;){i.value.apply(this,n)}}catch(t){e.e(t)}finally{e.f()}}t.prototype.emit.apply(this,n),this.lt&&n.length&&"string"==typeof n[n.length-1]&&(this.dt=n[n.length-1])},o.ack=function(t){var n=this,i=!1;return function(){if(!i){i=!0;for(var r=arguments.length,e=new Array(r),o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}_t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),i=Math.floor(n*this.jitter*t);t=1&Math.floor(10*n)?t+i:t-i}return 0|Math.min(t,this.max)},_t.prototype.reset=function(){this.attempts=0},_t.prototype.setMin=function(t){this.ms=t},_t.prototype.setMax=function(t){this.max=t},_t.prototype.setJitter=function(t){this.jitter=t};var Dt=function(t){function n(n,i){var r,e;(r=t.call(this)||this).nsps={},r.subs=[],n&&"object"===c(n)&&(i=n,n=void 0),(i=i||{}).path=i.path||"/socket.io",r.opts=i,$(r,i),r.reconnection(!1!==i.reconnection),r.reconnectionAttempts(i.reconnectionAttempts||1/0),r.reconnectionDelay(i.reconnectionDelay||1e3),r.reconnectionDelayMax(i.reconnectionDelayMax||5e3),r.randomizationFactor(null!==(e=i.randomizationFactor)&&void 0!==e?e:.5),r.backoff=new _t({min:r.reconnectionDelay(),max:r.reconnectionDelayMax(),jitter:r.randomizationFactor()}),r.timeout(null==i.timeout?2e4:i.timeout),r.st="closed",r.uri=n;var o=i.parser||xt;return r.encoder=new o.Encoder,r.decoder=new o.Decoder,r.et=!1!==i.autoConnect,r.et&&r.open(),r}s(n,t);var i=n.prototype;return i.reconnection=function(t){return arguments.length?(this.kt=!!t,t||(this.skipReconnect=!0),this):this.kt},i.reconnectionAttempts=function(t){return void 0===t?this.At:(this.At=t,this)},i.reconnectionDelay=function(t){var n;return void 0===t?this.jt:(this.jt=t,null===(n=this.backoff)||void 0===n||n.setMin(t),this)},i.randomizationFactor=function(t){var n;return void 0===t?this.Et:(this.Et=t,null===(n=this.backoff)||void 0===n||n.setJitter(t),this)},i.reconnectionDelayMax=function(t){var n;return void 0===t?this.Ot:(this.Ot=t,null===(n=this.backoff)||void 0===n||n.setMax(t),this)},i.timeout=function(t){return arguments.length?(this.Bt=t,this):this.Bt},i.maybeReconnectOnOpen=function(){!this.ot&&this.kt&&0===this.backoff.attempts&&this.reconnect()},i.open=function(t){var n=this;if(~this.st.indexOf("open"))return this;this.engine=new pt(this.uri,this.opts);var i=this.engine,r=this;this.st="opening",this.skipReconnect=!1;var e=It(i,"open",(function(){r.onopen(),t&&t()})),o=function(i){n.cleanup(),n.st="closed",n.emitReserved("error",i),t?t(i):n.maybeReconnectOnOpen()},s=It(i,"error",o);if(!1!==this.Bt){var u=this.Bt,h=this.setTimeoutFn((function(){e(),o(new Error("timeout")),i.close()}),u);this.opts.autoUnref&&h.unref(),this.subs.push((function(){n.clearTimeoutFn(h)}))}return this.subs.push(e),this.subs.push(s),this},i.connect=function(t){return this.open(t)},i.onopen=function(){this.cleanup(),this.st="open",this.emitReserved("open");var t=this.engine;this.subs.push(It(t,"ping",this.onping.bind(this)),It(t,"data",this.ondata.bind(this)),It(t,"error",this.onerror.bind(this)),It(t,"close",this.onclose.bind(this)),It(this.decoder,"decoded",this.ondecoded.bind(this)))},i.onping=function(){this.emitReserved("ping")},i.ondata=function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}},i.ondecoded=function(t){var n=this;R((function(){n.emitReserved("packet",t)}),this.setTimeoutFn)},i.onerror=function(t){this.emitReserved("error",t)},i.socket=function(t,n){var i=this.nsps[t];return i?this.et&&!i.active&&i.connect():(i=new Lt(this,t,n),this.nsps[t]=i),i},i.wt=function(t){for(var n=0,i=Object.keys(this.nsps);n=this.At)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{var i=this.backoff.duration();this.ot=!0;var r=this.setTimeoutFn((function(){n.skipReconnect||(t.emitReserved("reconnect_attempt",n.backoff.attempts),n.skipReconnect||n.open((function(i){i?(n.ot=!1,n.reconnect(),t.emitReserved("reconnect_error",i)):n.onreconnect()})))}),i);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}},i.onreconnect=function(){var t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)},n}(I),Pt={};function $t(t,n){"object"===c(t)&&(n=t,t=void 0);var i,r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=t;i=i||"undefined"!=typeof location&&location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==i?i.protocol+"//"+t:"https://"+t),r=ft(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var e=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+e+":"+r.port+n,r.href=r.protocol+"://"+e+(i&&i.port===r.port?"":":"+r.port),r}(t,(n=n||{}).path||"/socket.io"),e=r.source,o=r.id,s=r.path,u=Pt[o]&&s in Pt[o].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?i=new Dt(e,n):(Pt[o]||(Pt[o]=new Dt(e,n)),i=Pt[o]),r.query&&!n.query&&(n.query=r.queryKey),i.socket(r.path,n)}return e($t,{Manager:Dt,Socket:Lt,io:$t,connect:$t}),$t})); //# sourceMappingURL=socket.io.min.js.map diff --git a/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js.map b/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js.map index 5dda36bcf..469c880da 100644 --- a/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js.map +++ b/docassemble_webapp/docassemble/webapp/static/app/socket.io.min.js.map @@ -1 +1 @@ -{"version":3,"file":"socket.io.min.js","sources":["../node_modules/engine.io-parser/build/esm/commons.js","../node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js","../node_modules/engine.io-parser/build/esm/encodePacket.browser.js","../node_modules/engine.io-parser/build/esm/decodePacket.browser.js","../node_modules/engine.io-parser/build/esm/index.js","../node_modules/@socket.io/component-emitter/index.mjs","../node_modules/engine.io-client/build/esm/globalThis.browser.js","../node_modules/engine.io-client/build/esm/util.js","../node_modules/engine.io-client/build/esm/contrib/yeast.js","../node_modules/engine.io-client/build/esm/transport.js","../node_modules/engine.io-client/build/esm/contrib/parseqs.js","../node_modules/engine.io-client/build/esm/contrib/has-cors.js","../node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js","../node_modules/engine.io-client/build/esm/transports/polling.js","../node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js","../node_modules/engine.io-client/build/esm/transports/websocket.js","../node_modules/engine.io-client/build/esm/transports/index.js","../node_modules/engine.io-client/build/esm/contrib/parseuri.js","../node_modules/engine.io-client/build/esm/socket.js","../node_modules/engine.io-client/build/esm/index.js","../node_modules/socket.io-parser/build/esm/is-binary.js","../node_modules/socket.io-parser/build/esm/binary.js","../node_modules/socket.io-parser/build/esm/index.js","../build/esm/on.js","../build/esm/socket.js","../build/esm/contrib/backo2.js","../build/esm/manager.js","../build/esm/index.js","../build/esm/url.js"],"sourcesContent":["const PACKET_TYPES = Object.create(null); // no Map = no polyfill\nPACKET_TYPES[\"open\"] = \"0\";\nPACKET_TYPES[\"close\"] = \"1\";\nPACKET_TYPES[\"ping\"] = \"2\";\nPACKET_TYPES[\"pong\"] = \"3\";\nPACKET_TYPES[\"message\"] = \"4\";\nPACKET_TYPES[\"upgrade\"] = \"5\";\nPACKET_TYPES[\"noop\"] = \"6\";\nconst PACKET_TYPES_REVERSE = Object.create(null);\nObject.keys(PACKET_TYPES).forEach(key => {\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\n});\nconst ERROR_PACKET = { type: \"error\", data: \"parser error\" };\nexport { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };\n","const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nexport const encode = (arraybuffer) => {\n let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nexport const decode = (base64) => {\n let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n","import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = obj => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + content);\n };\n return fileReader.readAsDataURL(data);\n};\nexport default encodePacket;\n","import { ERROR_PACKET, PACKET_TYPES_REVERSE } from \"./commons.js\";\nimport { decode } from \"./contrib/base64-arraybuffer.js\";\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst decodePacket = (encodedPacket, binaryType) => {\n if (typeof encodedPacket !== \"string\") {\n return {\n type: \"message\",\n data: mapBinary(encodedPacket, binaryType)\n };\n }\n const type = encodedPacket.charAt(0);\n if (type === \"b\") {\n return {\n type: \"message\",\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType)\n };\n }\n const packetType = PACKET_TYPES_REVERSE[type];\n if (!packetType) {\n return ERROR_PACKET;\n }\n return encodedPacket.length > 1\n ? {\n type: PACKET_TYPES_REVERSE[type],\n data: encodedPacket.substring(1)\n }\n : {\n type: PACKET_TYPES_REVERSE[type]\n };\n};\nconst decodeBase64Packet = (data, binaryType) => {\n if (withNativeArrayBuffer) {\n const decoded = decode(data);\n return mapBinary(decoded, binaryType);\n }\n else {\n return { base64: true, data }; // fallback for old browsers\n }\n};\nconst mapBinary = (data, binaryType) => {\n switch (binaryType) {\n case \"blob\":\n return data instanceof ArrayBuffer ? new Blob([data]) : data;\n case \"arraybuffer\":\n default:\n return data; // assuming the data is already an ArrayBuffer\n }\n};\nexport default decodePacket;\n","import encodePacket from \"./encodePacket.js\";\nimport decodePacket from \"./decodePacket.js\";\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\nconst encodePayload = (packets, callback) => {\n // some packets may be added to the array while encoding, so the initial length must be saved\n const length = packets.length;\n const encodedPackets = new Array(length);\n let count = 0;\n packets.forEach((packet, i) => {\n // force base64 encoding for binary packets\n encodePacket(packet, false, encodedPacket => {\n encodedPackets[i] = encodedPacket;\n if (++count === length) {\n callback(encodedPackets.join(SEPARATOR));\n }\n });\n });\n};\nconst decodePayload = (encodedPayload, binaryType) => {\n const encodedPackets = encodedPayload.split(SEPARATOR);\n const packets = [];\n for (let i = 0; i < encodedPackets.length; i++) {\n const decodedPacket = decodePacket(encodedPackets[i], binaryType);\n packets.push(decodedPacket);\n if (decodedPacket.type === \"error\") {\n break;\n }\n }\n return packets;\n};\nexport const protocol = 4;\nexport { encodePacket, encodePayload, decodePacket, decodePayload };\n","/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nexport function Emitter(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n\n var args = new Array(arguments.length - 1)\n , callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n// alias used for reserved events (protected method)\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n","export const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n","import { globalThisShim as globalThis } from \"./globalThis.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = setTimeout.bind(globalThis);\n obj.clearTimeoutFn = clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n","// imported from https://github.com/unshiftio/yeast\n'use strict';\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nexport function encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nexport function decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nexport function yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n","import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nclass TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.readyState = \"\";\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @api protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n *\n * @api public\n */\n open() {\n if (\"closed\" === this.readyState || \"\" === this.readyState) {\n this.readyState = \"opening\";\n this.doOpen();\n }\n return this;\n }\n /**\n * Closes the transport.\n *\n * @api public\n */\n close() {\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api public\n */\n send(packets) {\n if (\"open\" === this.readyState) {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @api protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @api protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @api protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @api protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n}\n","// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n","// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n","// browser shim for xmlhttprequest module\nimport { hasCORS } from \"../contrib/has-cors.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nexport function XHR(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n","import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nimport { XHR as XMLHttpRequest } from \"./xmlhttprequest.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new XMLHttpRequest({\n xdomain: false\n });\n return null != xhr.responseType;\n})();\nexport class Polling extends Transport {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n /**\n * Transport name.\n */\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @api public\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @api private\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, data => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\";\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"https\" === schema && Number(this.opts.port) !== 443) ||\n (\"http\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = pick(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n try {\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n","import { globalThisShim as globalThis } from \"../globalThis.js\";\nexport const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return cb => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;\nexport const usingBrowserWebSocket = true;\nexport const defaultBinaryType = \"arraybuffer\";\n","import { Transport } from \"../transport.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { pick } from \"../util.js\";\nimport { defaultBinaryType, nextTick, usingBrowserWebSocket, WebSocket } from \"./websocket-constructor.js\";\nimport { encodePacket } from \"engine.io-parser\";\n// detect ReactNative environment\nconst isReactNative = typeof navigator !== \"undefined\" &&\n typeof navigator.product === \"string\" &&\n navigator.product.toLowerCase() === \"reactnative\";\nexport class WS extends Transport {\n /**\n * WebSocket transport constructor.\n *\n * @api {Object} connection options\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Transport name.\n *\n * @api public\n */\n get name() {\n return \"websocket\";\n }\n /**\n * Opens socket.\n *\n * @api private\n */\n doOpen() {\n if (!this.check()) {\n // let probe timeout\n return;\n }\n const uri = this.uri();\n const protocols = this.opts.protocols;\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\n const opts = isReactNative\n ? {}\n : pick(this.opts, \"agent\", \"perMessageDeflate\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"localAddress\", \"protocolVersion\", \"origin\", \"maxPayload\", \"family\", \"checkServerIdentity\");\n if (this.opts.extraHeaders) {\n opts.headers = this.opts.extraHeaders;\n }\n try {\n this.ws =\n usingBrowserWebSocket && !isReactNative\n ? protocols\n ? new WebSocket(uri, protocols)\n : new WebSocket(uri)\n : new WebSocket(uri, protocols, opts);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this.ws.binaryType = this.socket.binaryType || defaultBinaryType;\n this.addEventListeners();\n }\n /**\n * Adds event listeners to the socket\n *\n * @api private\n */\n addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = closeEvent => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent\n });\n this.ws.onmessage = ev => this.onData(ev.data);\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }\n /**\n * Writes data to socket.\n *\n * @param {Array} array of packets.\n * @api private\n */\n write(packets) {\n this.writable = false;\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n encodePacket(packet, this.supportsBinary, data => {\n // always create a new object (GH-437)\n const opts = {};\n if (!usingBrowserWebSocket) {\n if (packet.options) {\n opts.compress = packet.options.compress;\n }\n if (this.opts.perMessageDeflate) {\n const len = \n // @ts-ignore\n \"string\" === typeof data ? Buffer.byteLength(data) : data.length;\n if (len < this.opts.perMessageDeflate.threshold) {\n opts.compress = false;\n }\n }\n }\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n if (usingBrowserWebSocket) {\n // TypeError is thrown when passing the second argument on Safari\n this.ws.send(data);\n }\n else {\n this.ws.send(data, opts);\n }\n }\n catch (e) {\n }\n if (lastPacket) {\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n /**\n * Closes socket.\n *\n * @api private\n */\n doClose() {\n if (typeof this.ws !== \"undefined\") {\n this.ws.close();\n this.ws = null;\n }\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"wss\" : \"ws\";\n let port = \"\";\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"wss\" === schema && Number(this.opts.port) !== 443) ||\n (\"ws\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n // append timestamp to URI\n if (this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @api public\n */\n check() {\n return !!WebSocket;\n }\n}\n","import { Polling } from \"./polling.js\";\nimport { WS } from \"./websocket.js\";\nexport const transports = {\n websocket: WS,\n polling: Polling\n};\n","// imported from https://github.com/galkn/parseuri\n/**\n * Parses an URI\n *\n * @author Steven Levithan (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n","import { transports } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nexport class Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} opts - options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = parse(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n }, opts);\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\"\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n });\n return new transports[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", reason => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n transport.open();\n }\n /**\n * Called when connection is deemed open.\n *\n * @api private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n *\n * @api public\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = protocol;\n","import { Socket } from \"./socket.js\";\nexport { Socket };\nexport const protocol = Socket.protocol;\nexport { Transport } from \"./transport.js\";\nexport { transports } from \"./transports/index.js\";\nexport { installTimerFunctions } from \"./util.js\";\nexport { parse } from \"./contrib/parseuri.js\";\nexport { nextTick } from \"./transports/websocket-constructor.js\";\n","const withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj.buffer instanceof ArrayBuffer;\n};\nconst toString = Object.prototype.toString;\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeFile = typeof File === \"function\" ||\n (typeof File !== \"undefined\" &&\n toString.call(File) === \"[object FileConstructor]\");\n/**\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\n *\n * @private\n */\nexport function isBinary(obj) {\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File));\n}\nexport function hasBinary(obj, toJSON) {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n if (Array.isArray(obj)) {\n for (let i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n if (isBinary(obj)) {\n return true;\n }\n if (obj.toJSON &&\n typeof obj.toJSON === \"function\" &&\n arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n return false;\n}\n","import { isBinary } from \"./is-binary.js\";\n/**\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @public\n */\nexport function deconstructPacket(packet) {\n const buffers = [];\n const packetData = packet.data;\n const pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return { packet: pack, buffers: buffers };\n}\nfunction _deconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (isBinary(data)) {\n const placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n }\n else if (Array.isArray(data)) {\n const newData = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n }\n else if (typeof data === \"object\" && !(data instanceof Date)) {\n const newData = {};\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n }\n return newData;\n }\n return data;\n}\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @public\n */\nexport function reconstructPacket(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n packet.attachments = undefined; // no longer useful\n return packet;\n}\nfunction _reconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (data && data._placeholder === true) {\n const isIndexValid = typeof data.num === \"number\" &&\n data.num >= 0 &&\n data.num < buffers.length;\n if (isIndexValid) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n }\n else {\n throw new Error(\"illegal attachments\");\n }\n }\n else if (Array.isArray(data)) {\n for (let i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n }\n else if (typeof data === \"object\") {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n }\n return data;\n}\n","import { Emitter } from \"@socket.io/component-emitter\";\nimport { deconstructPacket, reconstructPacket } from \"./binary.js\";\nimport { isBinary, hasBinary } from \"./is-binary.js\";\n/**\n * Protocol version.\n *\n * @public\n */\nexport const protocol = 5;\nexport var PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType || (PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nexport class Encoder {\n /**\n * Encoder constructor\n *\n * @param {function} replacer - custom replacer to pass down to JSON.parse\n */\n constructor(replacer) {\n this.replacer = replacer;\n }\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (hasBinary(obj)) {\n obj.type =\n obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK;\n return this.encodeAsBinary(obj);\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nexport class Decoder extends Emitter {\n /**\n * Decoder constructor\n *\n * @param {function} reviver - custom reviver to pass down to JSON.stringify\n */\n constructor(reviver) {\n super();\n this.reviver = reviver;\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n if (this.reconstructor) {\n throw new Error(\"got plaintext data when reconstructing a packet\");\n }\n packet = this.decodeString(obj);\n if (packet.type === PacketType.BINARY_EVENT ||\n packet.type === PacketType.BINARY_ACK) {\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emitReserved(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emitReserved(\"decoded\", packet);\n }\n }\n else if (isBinary(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emitReserved(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = this.tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n return p;\n }\n tryParse(str) {\n try {\n return JSON.parse(str, this.reviver);\n }\n catch (e) {\n return false;\n }\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return typeof payload === \"object\";\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || typeof payload === \"object\";\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return Array.isArray(payload) && payload.length > 0;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n }\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\n","export function on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\n","import { PacketType } from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\n/**\n * A Socket is the fundamental class for interacting with the server.\n *\n * A Socket belongs to a certain Namespace (by default /) and uses an underlying {@link Manager} to communicate.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(\"connected\");\n * });\n *\n * // send an event to the server\n * socket.emit(\"foo\", \"bar\");\n *\n * socket.on(\"foobar\", () => {\n * // an event was received from the server\n * });\n *\n * // upon disconnection\n * socket.on(\"disconnect\", (reason) => {\n * console.log(`disconnected due to ${reason}`);\n * });\n */\nexport class Socket extends Emitter {\n /**\n * `Socket` constructor.\n */\n constructor(io, nsp, opts) {\n super();\n /**\n * Whether the socket is currently connected to the server.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.connected); // true\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.connected); // false\n * });\n */\n this.connected = false;\n /**\n * Buffer for packets received before the CONNECT packet\n */\n this.receiveBuffer = [];\n /**\n * Buffer for packets that will be sent once the socket is connected\n */\n this.sendBuffer = [];\n this.ids = 0;\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Whether the socket is currently disconnected\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.disconnected); // false\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.disconnected); // true\n * });\n */\n get disconnected() {\n return !this.connected;\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects.\n *\n * @example\n * const socket = io();\n *\n * console.log(socket.active); // true\n *\n * socket.on(\"disconnect\", (reason) => {\n * if (reason === \"io server disconnect\") {\n * // the disconnection was initiated by the server, you need to manually reconnect\n * console.log(socket.active); // false\n * }\n * // else the socket will automatically try to reconnect\n * console.log(socket.active); // true\n * });\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @example\n * const socket = io({\n * autoConnect: false\n * });\n *\n * socket.connect();\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for {@link connect()}.\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * This method mimics the WebSocket.send() method.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send\n *\n * @example\n * socket.send(\"hello\");\n *\n * // this is equivalent to\n * socket.emit(\"message\", \"hello\");\n *\n * @return self\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @example\n * socket.emit(\"hello\", \"world\");\n *\n * // all serializable datastructures are supported (no need to call JSON.stringify)\n * socket.emit(\"hello\", 1, \"2\", { 3: [\"4\"], 5: Uint8Array.from([6]) });\n *\n * // with an acknowledgement from the server\n * socket.emit(\"hello\", \"world\", (val) => {\n * // ...\n * });\n *\n * @return self\n */\n emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev.toString() + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n }\n else if (this.connected) {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * @private\n */\n _registerAckCallback(id, ack) {\n const timeout = this.flags.timeout;\n if (timeout === undefined) {\n this.acks[id] = ack;\n return;\n }\n // @ts-ignore\n const timer = this.io.setTimeoutFn(() => {\n delete this.acks[id];\n for (let i = 0; i < this.sendBuffer.length; i++) {\n if (this.sendBuffer[i].id === id) {\n this.sendBuffer.splice(i, 1);\n }\n }\n ack.call(this, new Error(\"operation has timed out\"));\n }, timeout);\n this.acks[id] = (...args) => {\n // @ts-ignore\n this.io.clearTimeoutFn(timer);\n ack.apply(this, [null, ...args]);\n };\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this.packet({ type: PacketType.CONNECT, data });\n });\n }\n else {\n this.packet({ type: PacketType.CONNECT, data: this.auth });\n }\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @param description\n * @private\n */\n onclose(reason, description) {\n this.connected = false;\n delete this.id;\n this.emitReserved(\"disconnect\", reason, description);\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case PacketType.CONNECT:\n if (packet.data && packet.data.sid) {\n const id = packet.data.sid;\n this.onconnect(id);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n this.onevent(packet);\n break;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n this.onack(packet);\n break;\n case PacketType.DISCONNECT:\n this.ondisconnect();\n break;\n case PacketType.CONNECT_ERROR:\n this.destroy();\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n if (null != packet.id) {\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n self.packet({\n type: PacketType.ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowlegement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (\"function\" === typeof ack) {\n ack.apply(this, packet.data);\n delete this.acks[packet.id];\n }\n else {\n }\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id) {\n this.id = id;\n this.connected = true;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually. In that case, the socket will not try to reconnect.\n *\n * If this is the last active Socket instance of the {@link Manager}, the low-level connection will be closed.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"disconnect\", (reason) => {\n * // console.log(reason); prints \"io client disconnect\"\n * });\n *\n * socket.disconnect();\n *\n * @return self\n */\n disconnect() {\n if (this.connected) {\n this.packet({ type: PacketType.DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for {@link disconnect()}.\n *\n * @return self\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @example\n * socket.compress(false).emit(\"hello\");\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @example\n * socket.volatile.emit(\"hello\"); // the server may or may not receive it\n *\n * @returns self\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\n * given number of milliseconds have elapsed without an acknowledgement from the server:\n *\n * @example\n * socket.timeout(5000).emit(\"my-event\", (err) => {\n * if (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n * });\n *\n * @returns self\n */\n timeout(timeout) {\n this.flags.timeout = timeout;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @example\n * socket.onAny((event, ...args) => {\n * console.log(`got ${event}`);\n * });\n *\n * @param listener\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @example\n * socket.prependAny((event, ...args) => {\n * console.log(`got event ${event}`);\n * });\n *\n * @param listener\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`got event ${event}`);\n * }\n *\n * socket.onAny(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAny(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAny();\n *\n * @param listener\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.onAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n onAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.prependAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n prependAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`sent event ${event}`);\n * }\n *\n * socket.onAnyOutgoing(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAnyOutgoing(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAnyOutgoing();\n *\n * @param [listener] - the catch-all listener (optional)\n */\n offAnyOutgoing(listener) {\n if (!this._anyOutgoingListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyOutgoingListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyOutgoingListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAnyOutgoing() {\n return this._anyOutgoingListeners || [];\n }\n /**\n * Notify the listeners for each packet sent\n *\n * @param packet\n *\n * @private\n */\n notifyOutgoingListeners(packet) {\n if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {\n const listeners = this._anyOutgoingListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, packet.data);\n }\n }\n }\n}\n","/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\nexport function Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\nBackoff.prototype.duration = function () {\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\nBackoff.prototype.reset = function () {\n this.attempts = 0;\n};\n/**\n * Set the minimum duration\n *\n * @api public\n */\nBackoff.prototype.setMin = function (min) {\n this.ms = min;\n};\n/**\n * Set the maximum duration\n *\n * @api public\n */\nBackoff.prototype.setMax = function (max) {\n this.max = max;\n};\n/**\n * Set the jitter\n *\n * @api public\n */\nBackoff.prototype.setJitter = function (jitter) {\n this.jitter = jitter;\n};\n","import { Socket as Engine, installTimerFunctions, nextTick, } from \"engine.io-client\";\nimport { Socket } from \"./socket.js\";\nimport * as parser from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Backoff } from \"./contrib/backo2.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\nexport class Manager extends Emitter {\n constructor(uri, opts) {\n var _a;\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n installTimerFunctions(this, opts);\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n if (~this._readyState.indexOf(\"open\"))\n return this;\n this.engine = new Engine(this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = on(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n // emit `error`\n const errorSub = on(socket, \"error\", (err) => {\n self.cleanup();\n self._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n self.maybeReconnectOnOpen();\n }\n });\n if (false !== this._timeout) {\n const timeout = this._timeout;\n if (timeout === 0) {\n openSubDestroy(); // prevents a race condition with the 'open' event\n }\n // set timer\n const timer = this.setTimeoutFn(() => {\n openSubDestroy();\n socket.close();\n // @ts-ignore\n socket.emit(\"error\", new Error(\"timeout\"));\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on(socket, \"ping\", this.onping.bind(this)), on(socket, \"data\", this.ondata.bind(this)), on(socket, \"error\", this.onerror.bind(this)), on(socket, \"close\", this.onclose.bind(this)), on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n try {\n this.decoder.add(data);\n }\n catch (e) {\n this.onclose(\"parse error\", e);\n }\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n // the nextTick call prevents an exception in a user-provided event listener from triggering a disconnection due to a \"parse error\"\n nextTick(() => {\n this.emitReserved(\"packet\", packet);\n }, this.setTimeoutFn);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n this.skipReconnect = true;\n this._reconnecting = false;\n this.onclose(\"forced close\");\n if (this.engine)\n this.engine.close();\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called upon engine close.\n *\n * @private\n */\n onclose(reason, description) {\n this.cleanup();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason, description);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n this._reconnecting = true;\n const timer = this.setTimeoutFn(() => {\n if (self.skipReconnect)\n return;\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\n","import { url } from \"./url.js\";\nimport { Manager } from \"./manager.js\";\nimport { Socket } from \"./socket.js\";\n/**\n * Managers cache.\n */\nconst cache = {};\nfunction lookup(uri, opts) {\n if (typeof uri === \"object\") {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n const parsed = url(uri, opts.path || \"/socket.io\");\n const source = parsed.source;\n const id = parsed.id;\n const path = parsed.path;\n const sameNamespace = cache[id] && path in cache[id][\"nsps\"];\n const newConnection = opts.forceNew ||\n opts[\"force new connection\"] ||\n false === opts.multiplex ||\n sameNamespace;\n let io;\n if (newConnection) {\n io = new Manager(source, opts);\n }\n else {\n if (!cache[id]) {\n cache[id] = new Manager(source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.queryKey;\n }\n return io.socket(parsed.path, opts);\n}\n// so that \"lookup\" can be used both as a function (e.g. `io(...)`) and as a\n// namespace (e.g. `io.connect(...)`), for backward compatibility\nObject.assign(lookup, {\n Manager,\n Socket,\n io: lookup,\n connect: lookup,\n});\n/**\n * Protocol version.\n *\n * @public\n */\nexport { protocol } from \"socket.io-parser\";\n/**\n * Expose constructors for standalone build.\n *\n * @public\n */\nexport { Manager, Socket, lookup as io, lookup as connect, lookup as default, };\n","import { parse } from \"engine.io-client\";\n/**\n * URL parser.\n *\n * @param uri - url\n * @param path - the request path of the connection\n * @param loc - An object meant to mimic window.location.\n * Defaults to window.location.\n * @public\n */\nexport function url(uri, path = \"\", loc) {\n let obj = uri;\n // default to window.location\n loc = loc || (typeof location !== \"undefined\" && location);\n if (null == uri)\n uri = loc.protocol + \"//\" + loc.host;\n // relative path support\n if (typeof uri === \"string\") {\n if (\"/\" === uri.charAt(0)) {\n if (\"/\" === uri.charAt(1)) {\n uri = loc.protocol + uri;\n }\n else {\n uri = loc.host + uri;\n }\n }\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n if (\"undefined\" !== typeof loc) {\n uri = loc.protocol + \"//\" + uri;\n }\n else {\n uri = \"https://\" + uri;\n }\n }\n // parse\n obj = parse(uri);\n }\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = \"80\";\n }\n else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = \"443\";\n }\n }\n obj.path = obj.path || \"/\";\n const ipv6 = obj.host.indexOf(\":\") !== -1;\n const host = ipv6 ? \"[\" + obj.host + \"]\" : obj.host;\n // define unique id\n obj.id = obj.protocol + \"://\" + host + \":\" + obj.port + path;\n // define href\n obj.href =\n obj.protocol +\n \"://\" +\n host +\n (loc && loc.port === obj.port ? \"\" : \":\" + obj.port);\n return obj;\n}\n"],"names":["PACKET_TYPES","Object","create","PACKET_TYPES_REVERSE","keys","forEach","key","ERROR_PACKET","type","data","withNativeBlob","Blob","prototype","toString","call","withNativeArrayBuffer","ArrayBuffer","encodePacket","supportsBinary","callback","obj","encodeBlobAsBase64","isView","buffer","fileReader","FileReader","onload","content","result","split","readAsDataURL","chars","lookup","Uint8Array","i","length","charCodeAt","decodePacket","encodedPacket","binaryType","mapBinary","charAt","decodeBase64Packet","substring","decoded","base64","encoded1","encoded2","encoded3","encoded4","bufferLength","len","p","arraybuffer","bytes","decode","SEPARATOR","String","fromCharCode","Emitter","mixin","on","addEventListener","event","fn","this","_callbacks","push","once","off","apply","arguments","removeListener","removeAllListeners","removeEventListener","cb","callbacks","splice","emit","args","Array","slice","emitReserved","listeners","hasListeners","globalThisShim","self","window","Function","pick","_len","attr","_key","reduce","acc","k","hasOwnProperty","NATIVE_SET_TIMEOUT","setTimeout","NATIVE_CLEAR_TIMEOUT","clearTimeout","installTimerFunctions","opts","useNativeTimers","setTimeoutFn","bind","globalThis","clearTimeoutFn","prev","TransportError","reason","description","context","_this","_classCallCheck","_super","Error","Transport","_Emitter","_inherits","_super2","_createSuper","_this2","writable","_assertThisInitialized","query","readyState","socket","_createClass","value","_get","_getPrototypeOf","doOpen","doClose","onClose","packets","write","packet","onPacket","details","alphabet","map","seed","encode","num","encoded","Math","floor","yeast","now","Date","str","encodeURIComponent","qs","qry","pairs","l","pair","decodeURIComponent","XMLHttpRequest","err","hasCORS","XHR","xdomain","e","concat","join","empty","hasXHR2","responseType","Polling","_Transport","polling","location","isSSL","protocol","port","xd","hostname","xs","secure","forceBase64","get","poll","onPause","pause","total","doPoll","_this3","encodedPayload","encodedPackets","decodedPacket","decodePayload","onOpen","_this4","close","_this5","count","encodePayload","doWrite","schema","timestampRequests","timestampParam","sid","b64","Number","encodedQuery","indexOf","path","_extends","Request","uri","_this6","req","request","method","xhrStatus","onError","_this7","onData","pollXhr","_this8","async","undefined","_this9","xscheme","xhr","open","extraHeaders","setDisableHeaderCheck","setRequestHeader","withCredentials","requestTimeout","timeout","onreadystatechange","status","onLoad","send","document","index","requestsCount","requests","cleanup","fromError","abort","responseText","attachEvent","unloadHandler","nextTick","Promise","resolve","then","WebSocket","MozWebSocket","isReactNative","navigator","product","toLowerCase","WS","check","protocols","headers","ws","addEventListeners","onopen","autoUnref","_socket","unref","onclose","closeEvent","onmessage","ev","onerror","_loop","lastPacket","transports","websocket","re","parts","parse","src","b","replace","m","exec","source","host","authority","ipv6uri","pathNames","regx","names","queryKey","$0","$1","$2","Socket","writeBuffer","prevBufferLen","agent","upgrade","rememberUpgrade","rejectUnauthorized","perMessageDeflate","threshold","transportOptions","closeOnBeforeunload","id","upgrades","pingInterval","pingTimeout","pingTimeoutTimer","beforeunloadEventListener","transport","offlineEventListener","name","EIO","priorWebsocketSuccess","createTransport","shift","setTransport","onDrain","failed","onTransportOpen","msg","upgrading","flush","freezeTransport","error","onTransportClose","onupgrade","to","probe","onHandshake","JSON","resetPingTimeout","sendPacket","code","filterUpgrades","maxPayload","getWritablePackets","payloadSize","c","utf8Length","ceil","byteLength","size","options","compress","cleanupAndClose","waitForUpgrade","filteredUpgrades","j","Socket$1","withNativeFile","File","isBinary","hasBinary","toJSON","_typeof","isArray","deconstructPacket","buffers","packetData","pack","_deconstructPacket","attachments","placeholder","_placeholder","newData","reconstructPacket","_reconstructPacket","PacketType","Encoder","replacer","EVENT","ACK","encodeAsString","BINARY_EVENT","BINARY_ACK","encodeAsBinary","nsp","stringify","deconstruction","unshift","Decoder","reviver","reconstructor","decodeString","BinaryReconstructor","takeBinaryData","start","buf","next","payload","tryParse","substr","isPayloadValid","finishedReconstruction","CONNECT","DISCONNECT","CONNECT_ERROR","reconPack","binData","RESERVED_EVENTS","freeze","connect","connect_error","disconnect","disconnecting","newListener","io","connected","receiveBuffer","sendBuffer","ids","acks","flags","auth","_autoConnect","subs","onpacket","subEvents","_readyState","_len2","_key2","ack","pop","_registerAckCallback","isTransportWritable","engine","discardPacket","notifyOutgoingListeners","timer","_len3","_key3","_packet","onconnect","onevent","onack","ondisconnect","destroy","message","emitEvent","_anyListeners","_step","_iterator","_createForOfIteratorHelper","s","n","done","f","sent","_len4","_key4","emitBuffered","subDestroy","listener","_anyOutgoingListeners","_step2","_iterator2","Backoff","ms","min","max","factor","jitter","attempts","duration","pow","rand","random","deviation","reset","setMin","setMax","setJitter","Manager","_a","nsps","reconnection","reconnectionAttempts","Infinity","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","_parser","parser","encoder","decoder","autoConnect","v","_reconnection","_reconnectionAttempts","_reconnectionDelay","_randomizationFactor","_reconnectionDelayMax","_timeout","_reconnecting","reconnect","Engine","skipReconnect","openSubDestroy","errorSub","maybeReconnectOnOpen","onping","ondata","ondecoded","add","_i","_nsps","active","_close","delay","onreconnect","attempt","cache","parsed","loc","test","href","url","sameNamespace","forceNew","multiplex"],"mappings":";;;;;0xIAAA,IAAMA,EAAeC,OAAOC,OAAO,MACnCF,EAAY,KAAW,IACvBA,EAAY,MAAY,IACxBA,EAAY,KAAW,IACvBA,EAAY,KAAW,IACvBA,EAAY,QAAc,IAC1BA,EAAY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J,SACA,MACA+G,GACCyO,GAAOA,EAAIvV,OAAS5J,EAAI4J,KAAO,GAAK,IAAM5J,EAAI4J,MAChD5J,CACV,CD7CkBsf,CAAIvT,GADnB7G,EAAOA,GAAQ,IACc0G,MAAQ,cAC/B6E,EAASyO,EAAOzO,OAChBsB,EAAKmN,EAAOnN,GACZnG,EAAOsT,EAAOtT,KACd2T,EAAgBN,GAAMlN,IAAOnG,KAAQqT,GAAMlN,GAAN,KAkB3C,OAjBsB7M,EAAKsa,UACvBta,EAAK,0BACL,IAAUA,EAAKua,WACfF,EAGAhH,EAAK,IAAIkE,GAAQhM,EAAQvL,IAGpB+Z,GAAMlN,KACPkN,GAAMlN,GAAM,IAAI0K,GAAQhM,EAAQvL,IAEpCqT,EAAK0G,GAAMlN,IAEXmN,EAAOzY,QAAUvB,EAAKuB,QACtBvB,EAAKuB,MAAQyY,EAAOlO,UAEjBuH,EAAG5R,OAAOuY,EAAOtT,KAAM1G,EACjC,QAGD2G,EAAcjL,GAAQ,CAClB6b,QAAAA,GACArL,OAAAA,GACAmH,GAAI3X,GACJsX,QAAStX"} \ No newline at end of file +{"version":3,"file":"socket.io.min.js","sources":["../../engine.io-parser/build/esm/commons.js","../../engine.io-parser/build/esm/encodePacket.browser.js","../../engine.io-parser/build/esm/contrib/base64-arraybuffer.js","../../engine.io-parser/build/esm/index.js","../../engine.io-parser/build/esm/decodePacket.browser.js","../../socket.io-component-emitter/lib/esm/index.js","../../engine.io-client/build/esm/globals.js","../../engine.io-client/build/esm/util.js","../../engine.io-client/build/esm/transport.js","../../engine.io-client/build/esm/contrib/parseqs.js","../../engine.io-client/build/esm/transports/polling.js","../../engine.io-client/build/esm/contrib/has-cors.js","../../engine.io-client/build/esm/transports/polling-xhr.js","../../engine.io-client/build/esm/transports/websocket.js","../../engine.io-client/build/esm/transports/webtransport.js","../../engine.io-client/build/esm/transports/index.js","../../engine.io-client/build/esm/contrib/parseuri.js","../../engine.io-client/build/esm/socket.js","../../engine.io-client/build/esm/index.js","../../socket.io-parser/build/esm/is-binary.js","../../socket.io-parser/build/esm/binary.js","../../socket.io-parser/build/esm/index.js","../build/esm/on.js","../build/esm/socket.js","../build/esm/contrib/backo2.js","../build/esm/manager.js","../build/esm/index.js","../build/esm/url.js"],"sourcesContent":["const PACKET_TYPES = Object.create(null); // no Map = no polyfill\nPACKET_TYPES[\"open\"] = \"0\";\nPACKET_TYPES[\"close\"] = \"1\";\nPACKET_TYPES[\"ping\"] = \"2\";\nPACKET_TYPES[\"pong\"] = \"3\";\nPACKET_TYPES[\"message\"] = \"4\";\nPACKET_TYPES[\"upgrade\"] = \"5\";\nPACKET_TYPES[\"noop\"] = \"6\";\nconst PACKET_TYPES_REVERSE = Object.create(null);\nObject.keys(PACKET_TYPES).forEach((key) => {\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\n});\nconst ERROR_PACKET = { type: \"error\", data: \"parser error\" };\nexport { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };\n","import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + (content || \"\"));\n };\n return fileReader.readAsDataURL(data);\n};\nfunction toArray(data) {\n if (data instanceof Uint8Array) {\n return data;\n }\n else if (data instanceof ArrayBuffer) {\n return new Uint8Array(data);\n }\n else {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n }\n}\nlet TEXT_ENCODER;\nexport function encodePacketToBinary(packet, callback) {\n if (withNativeBlob && packet.data instanceof Blob) {\n return packet.data.arrayBuffer().then(toArray).then(callback);\n }\n else if (withNativeArrayBuffer &&\n (packet.data instanceof ArrayBuffer || isView(packet.data))) {\n return callback(toArray(packet.data));\n }\n encodePacket(packet, false, (encoded) => {\n if (!TEXT_ENCODER) {\n TEXT_ENCODER = new TextEncoder();\n }\n callback(TEXT_ENCODER.encode(encoded));\n });\n}\nexport { encodePacket };\n","// imported from https://github.com/socketio/base64-arraybuffer\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nexport const encode = (arraybuffer) => {\n let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nexport const decode = (base64) => {\n let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n","import { encodePacket, encodePacketToBinary } from \"./encodePacket.js\";\nimport { decodePacket } from \"./decodePacket.js\";\nimport { ERROR_PACKET, } from \"./commons.js\";\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\nconst encodePayload = (packets, callback) => {\n // some packets may be added to the array while encoding, so the initial length must be saved\n const length = packets.length;\n const encodedPackets = new Array(length);\n let count = 0;\n packets.forEach((packet, i) => {\n // force base64 encoding for binary packets\n encodePacket(packet, false, (encodedPacket) => {\n encodedPackets[i] = encodedPacket;\n if (++count === length) {\n callback(encodedPackets.join(SEPARATOR));\n }\n });\n });\n};\nconst decodePayload = (encodedPayload, binaryType) => {\n const encodedPackets = encodedPayload.split(SEPARATOR);\n const packets = [];\n for (let i = 0; i < encodedPackets.length; i++) {\n const decodedPacket = decodePacket(encodedPackets[i], binaryType);\n packets.push(decodedPacket);\n if (decodedPacket.type === \"error\") {\n break;\n }\n }\n return packets;\n};\nexport function createPacketEncoderStream() {\n return new TransformStream({\n transform(packet, controller) {\n encodePacketToBinary(packet, (encodedPacket) => {\n const payloadLength = encodedPacket.length;\n let header;\n // inspired by the WebSocket format: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#decoding_payload_length\n if (payloadLength < 126) {\n header = new Uint8Array(1);\n new DataView(header.buffer).setUint8(0, payloadLength);\n }\n else if (payloadLength < 65536) {\n header = new Uint8Array(3);\n const view = new DataView(header.buffer);\n view.setUint8(0, 126);\n view.setUint16(1, payloadLength);\n }\n else {\n header = new Uint8Array(9);\n const view = new DataView(header.buffer);\n view.setUint8(0, 127);\n view.setBigUint64(1, BigInt(payloadLength));\n }\n // first bit indicates whether the payload is plain text (0) or binary (1)\n if (packet.data && typeof packet.data !== \"string\") {\n header[0] |= 0x80;\n }\n controller.enqueue(header);\n controller.enqueue(encodedPacket);\n });\n },\n });\n}\nlet TEXT_DECODER;\nfunction totalLength(chunks) {\n return chunks.reduce((acc, chunk) => acc + chunk.length, 0);\n}\nfunction concatChunks(chunks, size) {\n if (chunks[0].length === size) {\n return chunks.shift();\n }\n const buffer = new Uint8Array(size);\n let j = 0;\n for (let i = 0; i < size; i++) {\n buffer[i] = chunks[0][j++];\n if (j === chunks[0].length) {\n chunks.shift();\n j = 0;\n }\n }\n if (chunks.length && j < chunks[0].length) {\n chunks[0] = chunks[0].slice(j);\n }\n return buffer;\n}\nexport function createPacketDecoderStream(maxPayload, binaryType) {\n if (!TEXT_DECODER) {\n TEXT_DECODER = new TextDecoder();\n }\n const chunks = [];\n let state = 0 /* State.READ_HEADER */;\n let expectedLength = -1;\n let isBinary = false;\n return new TransformStream({\n transform(chunk, controller) {\n chunks.push(chunk);\n while (true) {\n if (state === 0 /* State.READ_HEADER */) {\n if (totalLength(chunks) < 1) {\n break;\n }\n const header = concatChunks(chunks, 1);\n isBinary = (header[0] & 0x80) === 0x80;\n expectedLength = header[0] & 0x7f;\n if (expectedLength < 126) {\n state = 3 /* State.READ_PAYLOAD */;\n }\n else if (expectedLength === 126) {\n state = 1 /* State.READ_EXTENDED_LENGTH_16 */;\n }\n else {\n state = 2 /* State.READ_EXTENDED_LENGTH_64 */;\n }\n }\n else if (state === 1 /* State.READ_EXTENDED_LENGTH_16 */) {\n if (totalLength(chunks) < 2) {\n break;\n }\n const headerArray = concatChunks(chunks, 2);\n expectedLength = new DataView(headerArray.buffer, headerArray.byteOffset, headerArray.length).getUint16(0);\n state = 3 /* State.READ_PAYLOAD */;\n }\n else if (state === 2 /* State.READ_EXTENDED_LENGTH_64 */) {\n if (totalLength(chunks) < 8) {\n break;\n }\n const headerArray = concatChunks(chunks, 8);\n const view = new DataView(headerArray.buffer, headerArray.byteOffset, headerArray.length);\n const n = view.getUint32(0);\n if (n > Math.pow(2, 53 - 32) - 1) {\n // the maximum safe integer in JavaScript is 2^53 - 1\n controller.enqueue(ERROR_PACKET);\n break;\n }\n expectedLength = n * Math.pow(2, 32) + view.getUint32(4);\n state = 3 /* State.READ_PAYLOAD */;\n }\n else {\n if (totalLength(chunks) < expectedLength) {\n break;\n }\n const data = concatChunks(chunks, expectedLength);\n controller.enqueue(decodePacket(isBinary ? data : TEXT_DECODER.decode(data), binaryType));\n state = 0 /* State.READ_HEADER */;\n }\n if (expectedLength === 0 || expectedLength > maxPayload) {\n controller.enqueue(ERROR_PACKET);\n break;\n }\n }\n },\n });\n}\nexport const protocol = 4;\nexport { encodePacket, encodePayload, decodePacket, decodePayload, };\n","import { ERROR_PACKET, PACKET_TYPES_REVERSE, } from \"./commons.js\";\nimport { decode } from \"./contrib/base64-arraybuffer.js\";\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nexport const decodePacket = (encodedPacket, binaryType) => {\n if (typeof encodedPacket !== \"string\") {\n return {\n type: \"message\",\n data: mapBinary(encodedPacket, binaryType),\n };\n }\n const type = encodedPacket.charAt(0);\n if (type === \"b\") {\n return {\n type: \"message\",\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType),\n };\n }\n const packetType = PACKET_TYPES_REVERSE[type];\n if (!packetType) {\n return ERROR_PACKET;\n }\n return encodedPacket.length > 1\n ? {\n type: PACKET_TYPES_REVERSE[type],\n data: encodedPacket.substring(1),\n }\n : {\n type: PACKET_TYPES_REVERSE[type],\n };\n};\nconst decodeBase64Packet = (data, binaryType) => {\n if (withNativeArrayBuffer) {\n const decoded = decode(data);\n return mapBinary(decoded, binaryType);\n }\n else {\n return { base64: true, data }; // fallback for old browsers\n }\n};\nconst mapBinary = (data, binaryType) => {\n switch (binaryType) {\n case \"blob\":\n if (data instanceof Blob) {\n // from WebSocket + binaryType \"blob\"\n return data;\n }\n else {\n // from HTTP long-polling or WebTransport\n return new Blob([data]);\n }\n case \"arraybuffer\":\n default:\n if (data instanceof ArrayBuffer) {\n // from HTTP long-polling (base64) or WebSocket + binaryType \"arraybuffer\"\n return data;\n }\n else {\n // from WebTransport (Uint8Array)\n return data.buffer;\n }\n }\n};\n","/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nexport function Emitter(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n\n var args = new Array(arguments.length - 1)\n , callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n// alias used for reserved events (protected method)\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n","export const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return (cb) => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\nexport const defaultBinaryType = \"arraybuffer\";\nexport function createCookieJar() { }\n","import { globalThisShim as globalThis } from \"./globals.node.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = globalThis.setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = globalThis.clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = globalThis.setTimeout.bind(globalThis);\n obj.clearTimeoutFn = globalThis.clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n/**\n * Generates a random 8-characters string.\n */\nexport function randomString() {\n return (Date.now().toString(36).substring(3) +\n Math.random().toString(36).substring(2, 5));\n}\n","import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nimport { encode } from \"./contrib/parseqs.js\";\nexport class TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} opts - options\n * @protected\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.socket = opts.socket;\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n */\n open() {\n this.readyState = \"opening\";\n this.doOpen();\n return this;\n }\n /**\n * Closes the transport.\n */\n close() {\n if (this.readyState === \"opening\" || this.readyState === \"open\") {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n */\n send(packets) {\n if (this.readyState === \"open\") {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n /**\n * Pauses the transport, in order not to lose packets during an upgrade.\n *\n * @param onPause\n */\n pause(onPause) { }\n createUri(schema, query = {}) {\n return (schema +\n \"://\" +\n this._hostname() +\n this._port() +\n this.opts.path +\n this._query(query));\n }\n _hostname() {\n const hostname = this.opts.hostname;\n return hostname.indexOf(\":\") === -1 ? hostname : \"[\" + hostname + \"]\";\n }\n _port() {\n if (this.opts.port &&\n ((this.opts.secure && Number(this.opts.port !== 443)) ||\n (!this.opts.secure && Number(this.opts.port) !== 80))) {\n return \":\" + this.opts.port;\n }\n else {\n return \"\";\n }\n }\n _query(query) {\n const encodedQuery = encode(query);\n return encodedQuery.length ? \"?\" + encodedQuery : \"\";\n }\n}\n","// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n","import { Transport } from \"../transport.js\";\nimport { randomString } from \"../util.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nexport class Polling extends Transport {\n constructor() {\n super(...arguments);\n this._polling = false;\n }\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @protected\n */\n doOpen() {\n this._poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} onPause - callback upon buffers are flushed and transport is paused\n * @package\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this._polling || !this.writable) {\n let total = 0;\n if (this._polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @private\n */\n _poll() {\n this._polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @protected\n */\n onData(data) {\n const callback = (packet) => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this._polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this._poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @protected\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} packets - data packets\n * @protected\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, (data) => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @private\n */\n uri() {\n const schema = this.opts.secure ? \"https\" : \"http\";\n const query = this.query || {};\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = randomString();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n return this.createUri(schema, query);\n }\n}\n","// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n","import { Polling } from \"./polling.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globals.node.js\";\nimport { hasCORS } from \"../contrib/has-cors.js\";\nfunction empty() { }\nexport class BaseXHR extends Polling {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @package\n */\n constructor(opts) {\n super(opts);\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n }\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data,\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @package\n */\n constructor(createRequest, uri, opts) {\n super();\n this.createRequest = createRequest;\n installTimerFunctions(this, opts);\n this._opts = opts;\n this._method = opts.method || \"GET\";\n this._uri = uri;\n this._data = undefined !== opts.data ? opts.data : null;\n this._create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @private\n */\n _create() {\n var _a;\n const opts = pick(this._opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this._opts.xd;\n const xhr = (this._xhr = this.createRequest(opts));\n try {\n xhr.open(this._method, this._uri, true);\n try {\n if (this._opts.extraHeaders) {\n // @ts-ignore\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this._opts.extraHeaders) {\n if (this._opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this._opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this._method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this._opts.withCredentials;\n }\n if (this._opts.requestTimeout) {\n xhr.timeout = this._opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n var _a;\n if (xhr.readyState === 3) {\n (_a = this._opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(\n // @ts-ignore\n xhr.getResponseHeader(\"set-cookie\"));\n }\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this._onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this._onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this._data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this._onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this._index = Request.requestsCount++;\n Request.requests[this._index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @private\n */\n _onError(err) {\n this.emitReserved(\"error\", err, this._xhr);\n this._cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @private\n */\n _cleanup(fromError) {\n if (\"undefined\" === typeof this._xhr || null === this._xhr) {\n return;\n }\n this._xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this._xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this._index];\n }\n this._xhr = null;\n }\n /**\n * Called upon load.\n *\n * @private\n */\n _onLoad() {\n const data = this._xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this._cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @package\n */\n abort() {\n this._cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\nconst hasXHR2 = (function () {\n const xhr = newRequest({\n xdomain: false,\n });\n return xhr && xhr.responseType !== null;\n})();\n/**\n * HTTP long-polling based on the built-in `XMLHttpRequest` object.\n *\n * Usage: browser\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest\n */\nexport class XHR extends BaseXHR {\n constructor(opts) {\n super(opts);\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd }, this.opts);\n return new Request(newRequest, this.uri(), opts);\n }\n}\nfunction newRequest(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n","import { Transport } from \"../transport.js\";\nimport { pick, randomString } from \"../util.js\";\nimport { encodePacket } from \"engine.io-parser\";\nimport { globalThisShim as globalThis, nextTick } from \"../globals.node.js\";\n// detect ReactNative environment\nconst isReactNative = typeof navigator !== \"undefined\" &&\n typeof navigator.product === \"string\" &&\n navigator.product.toLowerCase() === \"reactnative\";\nexport class BaseWS extends Transport {\n get name() {\n return \"websocket\";\n }\n doOpen() {\n const uri = this.uri();\n const protocols = this.opts.protocols;\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\n const opts = isReactNative\n ? {}\n : pick(this.opts, \"agent\", \"perMessageDeflate\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"localAddress\", \"protocolVersion\", \"origin\", \"maxPayload\", \"family\", \"checkServerIdentity\");\n if (this.opts.extraHeaders) {\n opts.headers = this.opts.extraHeaders;\n }\n try {\n this.ws = this.createSocket(uri, protocols, opts);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this.ws.binaryType = this.socket.binaryType;\n this.addEventListeners();\n }\n /**\n * Adds event listeners to the socket\n *\n * @private\n */\n addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = (closeEvent) => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent,\n });\n this.ws.onmessage = (ev) => this.onData(ev.data);\n this.ws.onerror = (e) => this.onError(\"websocket error\", e);\n }\n write(packets) {\n this.writable = false;\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n encodePacket(packet, this.supportsBinary, (data) => {\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n this.doWrite(packet, data);\n }\n catch (e) {\n }\n if (lastPacket) {\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n if (typeof this.ws !== \"undefined\") {\n this.ws.onerror = () => { };\n this.ws.close();\n this.ws = null;\n }\n }\n /**\n * Generates uri for connection.\n *\n * @private\n */\n uri() {\n const schema = this.opts.secure ? \"wss\" : \"ws\";\n const query = this.query || {};\n // append timestamp to URI\n if (this.opts.timestampRequests) {\n query[this.opts.timestampParam] = randomString();\n }\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n return this.createUri(schema, query);\n }\n}\nconst WebSocketCtor = globalThis.WebSocket || globalThis.MozWebSocket;\n/**\n * WebSocket transport based on the built-in `WebSocket` object.\n *\n * Usage: browser, Node.js (since v21), Deno, Bun\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @see https://caniuse.com/mdn-api_websocket\n * @see https://nodejs.org/api/globals.html#websocket\n */\nexport class WS extends BaseWS {\n createSocket(uri, protocols, opts) {\n return !isReactNative\n ? protocols\n ? new WebSocketCtor(uri, protocols)\n : new WebSocketCtor(uri)\n : new WebSocketCtor(uri, protocols, opts);\n }\n doWrite(_packet, data) {\n this.ws.send(data);\n }\n}\n","import { Transport } from \"../transport.js\";\nimport { nextTick } from \"../globals.node.js\";\nimport { createPacketDecoderStream, createPacketEncoderStream, } from \"engine.io-parser\";\n/**\n * WebTransport transport based on the built-in `WebTransport` object.\n *\n * Usage: browser, Node.js (with the `@fails-components/webtransport` package)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebTransport\n * @see https://caniuse.com/webtransport\n */\nexport class WT extends Transport {\n get name() {\n return \"webtransport\";\n }\n doOpen() {\n try {\n // @ts-ignore\n this._transport = new WebTransport(this.createUri(\"https\"), this.opts.transportOptions[this.name]);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this._transport.closed\n .then(() => {\n this.onClose();\n })\n .catch((err) => {\n this.onError(\"webtransport error\", err);\n });\n // note: we could have used async/await, but that would require some additional polyfills\n this._transport.ready.then(() => {\n this._transport.createBidirectionalStream().then((stream) => {\n const decoderStream = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, this.socket.binaryType);\n const reader = stream.readable.pipeThrough(decoderStream).getReader();\n const encoderStream = createPacketEncoderStream();\n encoderStream.readable.pipeTo(stream.writable);\n this._writer = encoderStream.writable.getWriter();\n const read = () => {\n reader\n .read()\n .then(({ done, value }) => {\n if (done) {\n return;\n }\n this.onPacket(value);\n read();\n })\n .catch((err) => {\n });\n };\n read();\n const packet = { type: \"open\" };\n if (this.query.sid) {\n packet.data = `{\"sid\":\"${this.query.sid}\"}`;\n }\n this._writer.write(packet).then(() => this.onOpen());\n });\n });\n }\n write(packets) {\n this.writable = false;\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n this._writer.write(packet).then(() => {\n if (lastPacket) {\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n var _a;\n (_a = this._transport) === null || _a === void 0 ? void 0 : _a.close();\n }\n}\n","import { XHR } from \"./polling-xhr.node.js\";\nimport { WS } from \"./websocket.node.js\";\nimport { WT } from \"./webtransport.js\";\nexport const transports = {\n websocket: WS,\n webtransport: WT,\n polling: XHR,\n};\n","// imported from https://github.com/galkn/parseuri\n/**\n * Parses a URI\n *\n * Note: we could also have used the built-in URL object, but it isn't supported on all platforms.\n *\n * See:\n * - https://developer.mozilla.org/en-US/docs/Web/API/URL\n * - https://caniuse.com/url\n * - https://www.rfc-editor.org/rfc/rfc3986#appendix-B\n *\n * History of the parse() method:\n * - first commit: https://github.com/socketio/socket.io-client/commit/4ee1d5d94b3906a9c052b459f1a818b15f38f91c\n * - export into its own module: https://github.com/socketio/engine.io-client/commit/de2c561e4564efeb78f1bdb1ba39ef81b2822cb3\n * - reimport: https://github.com/socketio/engine.io-client/commit/df32277c3f6d622eec5ed09f493cae3f3391d242\n *\n * @author Steven Levithan (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@\\/?#]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@\\/?#]*)(?::([^:@\\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n if (str.length > 8000) {\n throw \"URI too long\";\n }\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n","import { transports as DEFAULT_TRANSPORTS } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nimport { createCookieJar, defaultBinaryType, nextTick, } from \"./globals.node.js\";\nconst withEventListeners = typeof addEventListener === \"function\" &&\n typeof removeEventListener === \"function\";\nconst OFFLINE_EVENT_LISTENERS = [];\nif (withEventListeners) {\n // within a ServiceWorker, any event handler for the 'offline' event must be added on the initial evaluation of the\n // script, so we create one single event listener here which will forward the event to the socket instances\n addEventListener(\"offline\", () => {\n OFFLINE_EVENT_LISTENERS.forEach((listener) => listener());\n }, false);\n}\n/**\n * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established\n * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.\n *\n * This class comes without upgrade mechanism, which means that it will keep the first low-level transport that\n * successfully establishes the connection.\n *\n * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.\n *\n * @example\n * import { SocketWithoutUpgrade, WebSocket } from \"engine.io-client\";\n *\n * const socket = new SocketWithoutUpgrade({\n * transports: [WebSocket]\n * });\n *\n * socket.on(\"open\", () => {\n * socket.send(\"hello\");\n * });\n *\n * @see SocketWithUpgrade\n * @see Socket\n */\nexport class SocketWithoutUpgrade extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri - uri or options\n * @param {Object} opts - options\n */\n constructor(uri, opts) {\n super();\n this.binaryType = defaultBinaryType;\n this.writeBuffer = [];\n this._prevBufferLen = 0;\n this._pingInterval = -1;\n this._pingTimeout = -1;\n this._maxPayload = -1;\n /**\n * The expiration timestamp of the {@link _pingTimeoutTimer} object is tracked, in case the timer is throttled and the\n * callback is not fired on time. This can happen for example when a laptop is suspended or when a phone is locked.\n */\n this._pingTimeoutTime = Infinity;\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n const parsedUri = parse(uri);\n opts.hostname = parsedUri.host;\n opts.secure =\n parsedUri.protocol === \"https\" || parsedUri.protocol === \"wss\";\n opts.port = parsedUri.port;\n if (parsedUri.query)\n opts.query = parsedUri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = [];\n this._transportsByName = {};\n opts.transports.forEach((t) => {\n const transportName = t.prototype.name;\n this.transports.push(transportName);\n this._transportsByName[transportName] = t;\n });\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n addTrailingSlash: true,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024,\n },\n transportOptions: {},\n closeOnBeforeunload: false,\n }, opts);\n this.opts.path =\n this.opts.path.replace(/\\/$/, \"\") +\n (this.opts.addTrailingSlash ? \"/\" : \"\");\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n if (withEventListeners) {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this._beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this._beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this._offlineEventListener = () => {\n this._onClose(\"transport close\", {\n description: \"network connection lost\",\n });\n };\n OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener);\n }\n }\n if (this.opts.withCredentials) {\n this._cookieJar = createCookieJar();\n }\n this._open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} name - transport name\n * @return {Transport}\n * @private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port,\n }, this.opts.transportOptions[name]);\n return new this._transportsByName[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @private\n */\n _open() {\n if (this.transports.length === 0) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n const transportName = this.opts.rememberUpgrade &&\n SocketWithoutUpgrade.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1\n ? \"websocket\"\n : this.transports[0];\n this.readyState = \"opening\";\n const transport = this.createTransport(transportName);\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this._onDrain.bind(this))\n .on(\"packet\", this._onPacket.bind(this))\n .on(\"error\", this._onError.bind(this))\n .on(\"close\", (reason) => this._onClose(\"transport close\", reason));\n }\n /**\n * Called when connection is deemed open.\n *\n * @private\n */\n onOpen() {\n this.readyState = \"open\";\n SocketWithoutUpgrade.priorWebsocketSuccess =\n \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n }\n /**\n * Handles a packet.\n *\n * @private\n */\n _onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this._sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n this._resetPingTimeout();\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this._onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this._pingInterval = data.pingInterval;\n this._pingTimeout = data.pingTimeout;\n this._maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this._resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @private\n */\n _resetPingTimeout() {\n this.clearTimeoutFn(this._pingTimeoutTimer);\n const delay = this._pingInterval + this._pingTimeout;\n this._pingTimeoutTime = Date.now() + delay;\n this._pingTimeoutTimer = this.setTimeoutFn(() => {\n this._onClose(\"ping timeout\");\n }, delay);\n if (this.opts.autoUnref) {\n this._pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @private\n */\n _onDrain() {\n this.writeBuffer.splice(0, this._prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this._prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this._getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this._prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n _getWritablePackets() {\n const shouldCheckPayloadSize = this._maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this._maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Checks whether the heartbeat timer has expired but the socket has not yet been notified.\n *\n * Note: this method is private for now because it does not really fit the WebSocket API, but if we put it in the\n * `write()` method then the message would not be buffered by the Socket.IO client.\n *\n * @return {boolean}\n * @private\n */\n /* private */ _hasPingExpired() {\n if (!this._pingTimeoutTime)\n return true;\n const hasExpired = Date.now() > this._pingTimeoutTime;\n if (hasExpired) {\n this._pingTimeoutTime = 0;\n nextTick(() => {\n this._onClose(\"ping timeout\");\n }, this.setTimeoutFn);\n }\n return hasExpired;\n }\n /**\n * Sends a message.\n *\n * @param {String} msg - message.\n * @param {Object} options.\n * @param {Function} fn - callback function.\n * @return {Socket} for chaining.\n */\n write(msg, options, fn) {\n this._sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a message. Alias of {@link Socket#write}.\n *\n * @param {String} msg - message.\n * @param {Object} options.\n * @param {Function} fn - callback function.\n * @return {Socket} for chaining.\n */\n send(msg, options, fn) {\n this._sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} type: packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} fn - callback function.\n * @private\n */\n _sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options,\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n */\n close() {\n const close = () => {\n this._onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @private\n */\n _onError(err) {\n SocketWithoutUpgrade.priorWebsocketSuccess = false;\n if (this.opts.tryAllTransports &&\n this.transports.length > 1 &&\n this.readyState === \"opening\") {\n this.transports.shift();\n return this._open();\n }\n this.emitReserved(\"error\", err);\n this._onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @private\n */\n _onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this._pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (withEventListeners) {\n if (this._beforeunloadEventListener) {\n removeEventListener(\"beforeunload\", this._beforeunloadEventListener, false);\n }\n if (this._offlineEventListener) {\n const i = OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);\n if (i !== -1) {\n OFFLINE_EVENT_LISTENERS.splice(i, 1);\n }\n }\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this._prevBufferLen = 0;\n }\n }\n}\nSocketWithoutUpgrade.protocol = protocol;\n/**\n * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established\n * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.\n *\n * This class comes with an upgrade mechanism, which means that once the connection is established with the first\n * low-level transport, it will try to upgrade to a better transport.\n *\n * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.\n *\n * @example\n * import { SocketWithUpgrade, WebSocket } from \"engine.io-client\";\n *\n * const socket = new SocketWithUpgrade({\n * transports: [WebSocket]\n * });\n *\n * socket.on(\"open\", () => {\n * socket.send(\"hello\");\n * });\n *\n * @see SocketWithoutUpgrade\n * @see Socket\n */\nexport class SocketWithUpgrade extends SocketWithoutUpgrade {\n constructor() {\n super(...arguments);\n this._upgrades = [];\n }\n onOpen() {\n super.onOpen();\n if (\"open\" === this.readyState && this.opts.upgrade) {\n for (let i = 0; i < this._upgrades.length; i++) {\n this._probe(this._upgrades[i]);\n }\n }\n }\n /**\n * Probes a transport.\n *\n * @param {String} name - transport name\n * @private\n */\n _probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n SocketWithoutUpgrade.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", (msg) => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n SocketWithoutUpgrade.priorWebsocketSuccess =\n \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = (err) => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n if (this._upgrades.indexOf(\"webtransport\") !== -1 &&\n name !== \"webtransport\") {\n // favor WebTransport\n this.setTimeoutFn(() => {\n if (!failed) {\n transport.open();\n }\n }, 200);\n }\n else {\n transport.open();\n }\n }\n onHandshake(data) {\n this._upgrades = this._filterUpgrades(data.upgrades);\n super.onHandshake(data);\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} upgrades - server upgrades\n * @private\n */\n _filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n for (let i = 0; i < upgrades.length; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\n/**\n * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established\n * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.\n *\n * This class comes with an upgrade mechanism, which means that once the connection is established with the first\n * low-level transport, it will try to upgrade to a better transport.\n *\n * @example\n * import { Socket } from \"engine.io-client\";\n *\n * const socket = new Socket();\n *\n * socket.on(\"open\", () => {\n * socket.send(\"hello\");\n * });\n *\n * @see SocketWithoutUpgrade\n * @see SocketWithUpgrade\n */\nexport class Socket extends SocketWithUpgrade {\n constructor(uri, opts = {}) {\n const o = typeof uri === \"object\" ? uri : opts;\n if (!o.transports ||\n (o.transports && typeof o.transports[0] === \"string\")) {\n o.transports = (o.transports || [\"polling\", \"websocket\", \"webtransport\"])\n .map((transportName) => DEFAULT_TRANSPORTS[transportName])\n .filter((t) => !!t);\n }\n super(uri, o);\n }\n}\n","import { Socket } from \"./socket.js\";\nexport { Socket };\nexport { SocketWithoutUpgrade, SocketWithUpgrade, } from \"./socket.js\";\nexport const protocol = Socket.protocol;\nexport { Transport, TransportError } from \"./transport.js\";\nexport { transports } from \"./transports/index.js\";\nexport { installTimerFunctions } from \"./util.js\";\nexport { parse } from \"./contrib/parseuri.js\";\nexport { nextTick } from \"./globals.node.js\";\nexport { Fetch } from \"./transports/polling-fetch.js\";\nexport { XHR as NodeXHR } from \"./transports/polling-xhr.node.js\";\nexport { XHR } from \"./transports/polling-xhr.js\";\nexport { WS as NodeWebSocket } from \"./transports/websocket.node.js\";\nexport { WS as WebSocket } from \"./transports/websocket.js\";\nexport { WT as WebTransport } from \"./transports/webtransport.js\";\n","const withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj.buffer instanceof ArrayBuffer;\n};\nconst toString = Object.prototype.toString;\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeFile = typeof File === \"function\" ||\n (typeof File !== \"undefined\" &&\n toString.call(File) === \"[object FileConstructor]\");\n/**\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\n *\n * @private\n */\nexport function isBinary(obj) {\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File));\n}\nexport function hasBinary(obj, toJSON) {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n if (Array.isArray(obj)) {\n for (let i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n if (isBinary(obj)) {\n return true;\n }\n if (obj.toJSON &&\n typeof obj.toJSON === \"function\" &&\n arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n return false;\n}\n","import { isBinary } from \"./is-binary.js\";\n/**\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @public\n */\nexport function deconstructPacket(packet) {\n const buffers = [];\n const packetData = packet.data;\n const pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return { packet: pack, buffers: buffers };\n}\nfunction _deconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (isBinary(data)) {\n const placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n }\n else if (Array.isArray(data)) {\n const newData = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n }\n else if (typeof data === \"object\" && !(data instanceof Date)) {\n const newData = {};\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n }\n return newData;\n }\n return data;\n}\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @public\n */\nexport function reconstructPacket(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n delete packet.attachments; // no longer useful\n return packet;\n}\nfunction _reconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (data && data._placeholder === true) {\n const isIndexValid = typeof data.num === \"number\" &&\n data.num >= 0 &&\n data.num < buffers.length;\n if (isIndexValid) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n }\n else {\n throw new Error(\"illegal attachments\");\n }\n }\n else if (Array.isArray(data)) {\n for (let i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n }\n else if (typeof data === \"object\") {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n }\n return data;\n}\n","import { Emitter } from \"@socket.io/component-emitter\";\nimport { deconstructPacket, reconstructPacket } from \"./binary.js\";\nimport { isBinary, hasBinary } from \"./is-binary.js\";\n/**\n * These strings must not be used as event names, as they have a special meaning.\n */\nconst RESERVED_EVENTS = [\n \"connect\", // used on the client side\n \"connect_error\", // used on the client side\n \"disconnect\", // used on both sides\n \"disconnecting\", // used on the server side\n \"newListener\", // used by the Node.js EventEmitter\n \"removeListener\", // used by the Node.js EventEmitter\n];\n/**\n * Protocol version.\n *\n * @public\n */\nexport const protocol = 5;\nexport var PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType || (PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nexport class Encoder {\n /**\n * Encoder constructor\n *\n * @param {function} replacer - custom replacer to pass down to JSON.parse\n */\n constructor(replacer) {\n this.replacer = replacer;\n }\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (hasBinary(obj)) {\n return this.encodeAsBinary({\n type: obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK,\n nsp: obj.nsp,\n data: obj.data,\n id: obj.id,\n });\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nexport class Decoder extends Emitter {\n /**\n * Decoder constructor\n *\n * @param {function} reviver - custom reviver to pass down to JSON.stringify\n */\n constructor(reviver) {\n super();\n this.reviver = reviver;\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n if (this.reconstructor) {\n throw new Error(\"got plaintext data when reconstructing a packet\");\n }\n packet = this.decodeString(obj);\n const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;\n if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {\n packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emitReserved(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emitReserved(\"decoded\", packet);\n }\n }\n else if (isBinary(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emitReserved(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = this.tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n return p;\n }\n tryParse(str) {\n try {\n return JSON.parse(str, this.reviver);\n }\n catch (e) {\n return false;\n }\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return isObject(payload);\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || isObject(payload);\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return (Array.isArray(payload) &&\n (typeof payload[0] === \"number\" ||\n (typeof payload[0] === \"string\" &&\n RESERVED_EVENTS.indexOf(payload[0]) === -1)));\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n this.reconstructor = null;\n }\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\nfunction isNamespaceValid(nsp) {\n return typeof nsp === \"string\";\n}\n// see https://caniuse.com/mdn-javascript_builtins_number_isinteger\nconst isInteger = Number.isInteger ||\n function (value) {\n return (typeof value === \"number\" &&\n isFinite(value) &&\n Math.floor(value) === value);\n };\nfunction isAckIdValid(id) {\n return id === undefined || isInteger(id);\n}\n// see https://stackoverflow.com/questions/8511281/check-if-a-value-is-an-object-in-javascript\nfunction isObject(value) {\n return Object.prototype.toString.call(value) === \"[object Object]\";\n}\nfunction isDataValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return payload === undefined || isObject(payload);\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.EVENT:\n return (Array.isArray(payload) &&\n (typeof payload[0] === \"number\" ||\n (typeof payload[0] === \"string\" &&\n RESERVED_EVENTS.indexOf(payload[0]) === -1)));\n case PacketType.ACK:\n return Array.isArray(payload);\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || isObject(payload);\n default:\n return false;\n }\n}\nexport function isPacketValid(packet) {\n return (isNamespaceValid(packet.nsp) &&\n isAckIdValid(packet.id) &&\n isDataValid(packet.type, packet.data));\n}\n","export function on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\n","import { PacketType } from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\n/**\n * A Socket is the fundamental class for interacting with the server.\n *\n * A Socket belongs to a certain Namespace (by default /) and uses an underlying {@link Manager} to communicate.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(\"connected\");\n * });\n *\n * // send an event to the server\n * socket.emit(\"foo\", \"bar\");\n *\n * socket.on(\"foobar\", () => {\n * // an event was received from the server\n * });\n *\n * // upon disconnection\n * socket.on(\"disconnect\", (reason) => {\n * console.log(`disconnected due to ${reason}`);\n * });\n */\nexport class Socket extends Emitter {\n /**\n * `Socket` constructor.\n */\n constructor(io, nsp, opts) {\n super();\n /**\n * Whether the socket is currently connected to the server.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.connected); // true\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.connected); // false\n * });\n */\n this.connected = false;\n /**\n * Whether the connection state was recovered after a temporary disconnection. In that case, any missed packets will\n * be transmitted by the server.\n */\n this.recovered = false;\n /**\n * Buffer for packets received before the CONNECT packet\n */\n this.receiveBuffer = [];\n /**\n * Buffer for packets that will be sent once the socket is connected\n */\n this.sendBuffer = [];\n /**\n * The queue of packets to be sent with retry in case of failure.\n *\n * Packets are sent one by one, each waiting for the server acknowledgement, in order to guarantee the delivery order.\n * @private\n */\n this._queue = [];\n /**\n * A sequence to generate the ID of the {@link QueuedPacket}.\n * @private\n */\n this._queueSeq = 0;\n this.ids = 0;\n /**\n * A map containing acknowledgement handlers.\n *\n * The `withError` attribute is used to differentiate handlers that accept an error as first argument:\n *\n * - `socket.emit(\"test\", (err, value) => { ... })` with `ackTimeout` option\n * - `socket.timeout(5000).emit(\"test\", (err, value) => { ... })`\n * - `const value = await socket.emitWithAck(\"test\")`\n *\n * From those that don't:\n *\n * - `socket.emit(\"test\", (value) => { ... });`\n *\n * In the first case, the handlers will be called with an error when:\n *\n * - the timeout is reached\n * - the socket gets disconnected\n *\n * In the second case, the handlers will be simply discarded upon disconnection, since the client will never receive\n * an acknowledgement from the server.\n *\n * @private\n */\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n this._opts = Object.assign({}, opts);\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Whether the socket is currently disconnected\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.disconnected); // false\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.disconnected); // true\n * });\n */\n get disconnected() {\n return !this.connected;\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects.\n *\n * @example\n * const socket = io();\n *\n * console.log(socket.active); // true\n *\n * socket.on(\"disconnect\", (reason) => {\n * if (reason === \"io server disconnect\") {\n * // the disconnection was initiated by the server, you need to manually reconnect\n * console.log(socket.active); // false\n * }\n * // else the socket will automatically try to reconnect\n * console.log(socket.active); // true\n * });\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @example\n * const socket = io({\n * autoConnect: false\n * });\n *\n * socket.connect();\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for {@link connect()}.\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * This method mimics the WebSocket.send() method.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send\n *\n * @example\n * socket.send(\"hello\");\n *\n * // this is equivalent to\n * socket.emit(\"message\", \"hello\");\n *\n * @return self\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @example\n * socket.emit(\"hello\", \"world\");\n *\n * // all serializable datastructures are supported (no need to call JSON.stringify)\n * socket.emit(\"hello\", 1, \"2\", { 3: [\"4\"], 5: Uint8Array.from([6]) });\n *\n * // with an acknowledgement from the server\n * socket.emit(\"hello\", \"world\", (val) => {\n * // ...\n * });\n *\n * @return self\n */\n emit(ev, ...args) {\n var _a, _b, _c;\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev.toString() + '\" is a reserved event name');\n }\n args.unshift(ev);\n if (this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) {\n this._addToQueue(args);\n return this;\n }\n const packet = {\n type: PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = (_b = (_a = this.io.engine) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.writable;\n const isConnected = this.connected && !((_c = this.io.engine) === null || _c === void 0 ? void 0 : _c._hasPingExpired());\n const discardPacket = this.flags.volatile && !isTransportWritable;\n if (discardPacket) {\n }\n else if (isConnected) {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * @private\n */\n _registerAckCallback(id, ack) {\n var _a;\n const timeout = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;\n if (timeout === undefined) {\n this.acks[id] = ack;\n return;\n }\n // @ts-ignore\n const timer = this.io.setTimeoutFn(() => {\n delete this.acks[id];\n for (let i = 0; i < this.sendBuffer.length; i++) {\n if (this.sendBuffer[i].id === id) {\n this.sendBuffer.splice(i, 1);\n }\n }\n ack.call(this, new Error(\"operation has timed out\"));\n }, timeout);\n const fn = (...args) => {\n // @ts-ignore\n this.io.clearTimeoutFn(timer);\n ack.apply(this, args);\n };\n fn.withError = true;\n this.acks[id] = fn;\n }\n /**\n * Emits an event and waits for an acknowledgement\n *\n * @example\n * // without timeout\n * const response = await socket.emitWithAck(\"hello\", \"world\");\n *\n * // with a specific timeout\n * try {\n * const response = await socket.timeout(1000).emitWithAck(\"hello\", \"world\");\n * } catch (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n *\n * @return a Promise that will be fulfilled when the server acknowledges the event\n */\n emitWithAck(ev, ...args) {\n return new Promise((resolve, reject) => {\n const fn = (arg1, arg2) => {\n return arg1 ? reject(arg1) : resolve(arg2);\n };\n fn.withError = true;\n args.push(fn);\n this.emit(ev, ...args);\n });\n }\n /**\n * Add the packet to the queue.\n * @param args\n * @private\n */\n _addToQueue(args) {\n let ack;\n if (typeof args[args.length - 1] === \"function\") {\n ack = args.pop();\n }\n const packet = {\n id: this._queueSeq++,\n tryCount: 0,\n pending: false,\n args,\n flags: Object.assign({ fromQueue: true }, this.flags),\n };\n args.push((err, ...responseArgs) => {\n if (packet !== this._queue[0]) {\n // the packet has already been acknowledged\n return;\n }\n const hasError = err !== null;\n if (hasError) {\n if (packet.tryCount > this._opts.retries) {\n this._queue.shift();\n if (ack) {\n ack(err);\n }\n }\n }\n else {\n this._queue.shift();\n if (ack) {\n ack(null, ...responseArgs);\n }\n }\n packet.pending = false;\n return this._drainQueue();\n });\n this._queue.push(packet);\n this._drainQueue();\n }\n /**\n * Send the first packet of the queue, and wait for an acknowledgement from the server.\n * @param force - whether to resend a packet that has not been acknowledged yet\n *\n * @private\n */\n _drainQueue(force = false) {\n if (!this.connected || this._queue.length === 0) {\n return;\n }\n const packet = this._queue[0];\n if (packet.pending && !force) {\n return;\n }\n packet.pending = true;\n packet.tryCount++;\n this.flags = packet.flags;\n this.emit.apply(this, packet.args);\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this._sendConnectPacket(data);\n });\n }\n else {\n this._sendConnectPacket(this.auth);\n }\n }\n /**\n * Sends a CONNECT packet to initiate the Socket.IO session.\n *\n * @param data\n * @private\n */\n _sendConnectPacket(data) {\n this.packet({\n type: PacketType.CONNECT,\n data: this._pid\n ? Object.assign({ pid: this._pid, offset: this._lastOffset }, data)\n : data,\n });\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @param description\n * @private\n */\n onclose(reason, description) {\n this.connected = false;\n delete this.id;\n this.emitReserved(\"disconnect\", reason, description);\n this._clearAcks();\n }\n /**\n * Clears the acknowledgement handlers upon disconnection, since the client will never receive an acknowledgement from\n * the server.\n *\n * @private\n */\n _clearAcks() {\n Object.keys(this.acks).forEach((id) => {\n const isBuffered = this.sendBuffer.some((packet) => String(packet.id) === id);\n if (!isBuffered) {\n // note: handlers that do not accept an error as first argument are ignored here\n const ack = this.acks[id];\n delete this.acks[id];\n if (ack.withError) {\n ack.call(this, new Error(\"socket has been disconnected\"));\n }\n }\n });\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case PacketType.CONNECT:\n if (packet.data && packet.data.sid) {\n this.onconnect(packet.data.sid, packet.data.pid);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n this.onevent(packet);\n break;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n this.onack(packet);\n break;\n case PacketType.DISCONNECT:\n this.ondisconnect();\n break;\n case PacketType.CONNECT_ERROR:\n this.destroy();\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n if (null != packet.id) {\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n if (this._pid && args.length && typeof args[args.length - 1] === \"string\") {\n this._lastOffset = args[args.length - 1];\n }\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n self.packet({\n type: PacketType.ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowledgement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (typeof ack !== \"function\") {\n return;\n }\n delete this.acks[packet.id];\n // @ts-ignore FIXME ack is incorrectly inferred as 'never'\n if (ack.withError) {\n packet.data.unshift(null);\n }\n // @ts-ignore\n ack.apply(this, packet.data);\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id, pid) {\n this.id = id;\n this.recovered = pid && this._pid === pid;\n this._pid = pid; // defined only if connection state recovery is enabled\n this.connected = true;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n this._drainQueue(true);\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually. In that case, the socket will not try to reconnect.\n *\n * If this is the last active Socket instance of the {@link Manager}, the low-level connection will be closed.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"disconnect\", (reason) => {\n * // console.log(reason); prints \"io client disconnect\"\n * });\n *\n * socket.disconnect();\n *\n * @return self\n */\n disconnect() {\n if (this.connected) {\n this.packet({ type: PacketType.DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for {@link disconnect()}.\n *\n * @return self\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @example\n * socket.compress(false).emit(\"hello\");\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @example\n * socket.volatile.emit(\"hello\"); // the server may or may not receive it\n *\n * @returns self\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\n * given number of milliseconds have elapsed without an acknowledgement from the server:\n *\n * @example\n * socket.timeout(5000).emit(\"my-event\", (err) => {\n * if (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n * });\n *\n * @returns self\n */\n timeout(timeout) {\n this.flags.timeout = timeout;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @example\n * socket.onAny((event, ...args) => {\n * console.log(`got ${event}`);\n * });\n *\n * @param listener\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @example\n * socket.prependAny((event, ...args) => {\n * console.log(`got event ${event}`);\n * });\n *\n * @param listener\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`got event ${event}`);\n * }\n *\n * socket.onAny(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAny(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAny();\n *\n * @param listener\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.onAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n onAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.prependAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n prependAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`sent event ${event}`);\n * }\n *\n * socket.onAnyOutgoing(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAnyOutgoing(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAnyOutgoing();\n *\n * @param [listener] - the catch-all listener (optional)\n */\n offAnyOutgoing(listener) {\n if (!this._anyOutgoingListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyOutgoingListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyOutgoingListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAnyOutgoing() {\n return this._anyOutgoingListeners || [];\n }\n /**\n * Notify the listeners for each packet sent\n *\n * @param packet\n *\n * @private\n */\n notifyOutgoingListeners(packet) {\n if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {\n const listeners = this._anyOutgoingListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, packet.data);\n }\n }\n }\n}\n","/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\nexport function Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\nBackoff.prototype.duration = function () {\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\nBackoff.prototype.reset = function () {\n this.attempts = 0;\n};\n/**\n * Set the minimum duration\n *\n * @api public\n */\nBackoff.prototype.setMin = function (min) {\n this.ms = min;\n};\n/**\n * Set the maximum duration\n *\n * @api public\n */\nBackoff.prototype.setMax = function (max) {\n this.max = max;\n};\n/**\n * Set the jitter\n *\n * @api public\n */\nBackoff.prototype.setJitter = function (jitter) {\n this.jitter = jitter;\n};\n","import { Socket as Engine, installTimerFunctions, nextTick, } from \"engine.io-client\";\nimport { Socket } from \"./socket.js\";\nimport * as parser from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Backoff } from \"./contrib/backo2.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\nexport class Manager extends Emitter {\n constructor(uri, opts) {\n var _a;\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n installTimerFunctions(this, opts);\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n if (!v) {\n this.skipReconnect = true;\n }\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n if (~this._readyState.indexOf(\"open\"))\n return this;\n this.engine = new Engine(this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = on(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n const onError = (err) => {\n this.cleanup();\n this._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n this.maybeReconnectOnOpen();\n }\n };\n // emit `error`\n const errorSub = on(socket, \"error\", onError);\n if (false !== this._timeout) {\n const timeout = this._timeout;\n // set timer\n const timer = this.setTimeoutFn(() => {\n openSubDestroy();\n onError(new Error(\"timeout\"));\n socket.close();\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(() => {\n this.clearTimeoutFn(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on(socket, \"ping\", this.onping.bind(this)), on(socket, \"data\", this.ondata.bind(this)), on(socket, \"error\", this.onerror.bind(this)), on(socket, \"close\", this.onclose.bind(this)), \n // @ts-ignore\n on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n try {\n this.decoder.add(data);\n }\n catch (e) {\n this.onclose(\"parse error\", e);\n }\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n // the nextTick call prevents an exception in a user-provided event listener from triggering a disconnection due to a \"parse error\"\n nextTick(() => {\n this.emitReserved(\"packet\", packet);\n }, this.setTimeoutFn);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n else if (this._autoConnect && !socket.active) {\n socket.connect();\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n this.skipReconnect = true;\n this._reconnecting = false;\n this.onclose(\"forced close\");\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called when:\n *\n * - the low-level engine is closed\n * - the parser encountered a badly formatted packet\n * - all sockets are disconnected\n *\n * @private\n */\n onclose(reason, description) {\n var _a;\n this.cleanup();\n (_a = this.engine) === null || _a === void 0 ? void 0 : _a.close();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason, description);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n this._reconnecting = true;\n const timer = this.setTimeoutFn(() => {\n if (self.skipReconnect)\n return;\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(() => {\n this.clearTimeoutFn(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\n","import { url } from \"./url.js\";\nimport { Manager } from \"./manager.js\";\nimport { Socket } from \"./socket.js\";\n/**\n * Managers cache.\n */\nconst cache = {};\nfunction lookup(uri, opts) {\n if (typeof uri === \"object\") {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n const parsed = url(uri, opts.path || \"/socket.io\");\n const source = parsed.source;\n const id = parsed.id;\n const path = parsed.path;\n const sameNamespace = cache[id] && path in cache[id][\"nsps\"];\n const newConnection = opts.forceNew ||\n opts[\"force new connection\"] ||\n false === opts.multiplex ||\n sameNamespace;\n let io;\n if (newConnection) {\n io = new Manager(source, opts);\n }\n else {\n if (!cache[id]) {\n cache[id] = new Manager(source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.queryKey;\n }\n return io.socket(parsed.path, opts);\n}\n// so that \"lookup\" can be used both as a function (e.g. `io(...)`) and as a\n// namespace (e.g. `io.connect(...)`), for backward compatibility\nObject.assign(lookup, {\n Manager,\n Socket,\n io: lookup,\n connect: lookup,\n});\n/**\n * Protocol version.\n *\n * @public\n */\nexport { protocol } from \"socket.io-parser\";\n/**\n * Expose constructors for standalone build.\n *\n * @public\n */\nexport { Manager, Socket, lookup as io, lookup as connect, lookup as default, };\nexport { Fetch, NodeXHR, XHR, NodeWebSocket, WebSocket, WebTransport, } from \"engine.io-client\";\n","import { parse } from \"engine.io-client\";\n/**\n * URL parser.\n *\n * @param uri - url\n * @param path - the request path of the connection\n * @param loc - An object meant to mimic window.location.\n * Defaults to window.location.\n * @public\n */\nexport function url(uri, path = \"\", loc) {\n let obj = uri;\n // default to window.location\n loc = loc || (typeof location !== \"undefined\" && location);\n if (null == uri)\n uri = loc.protocol + \"//\" + loc.host;\n // relative path support\n if (typeof uri === \"string\") {\n if (\"/\" === uri.charAt(0)) {\n if (\"/\" === uri.charAt(1)) {\n uri = loc.protocol + uri;\n }\n else {\n uri = loc.host + uri;\n }\n }\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n if (\"undefined\" !== typeof loc) {\n uri = loc.protocol + \"//\" + uri;\n }\n else {\n uri = \"https://\" + uri;\n }\n }\n // parse\n obj = parse(uri);\n }\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = \"80\";\n }\n else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = \"443\";\n }\n }\n obj.path = obj.path || \"/\";\n const ipv6 = obj.host.indexOf(\":\") !== -1;\n const host = ipv6 ? \"[\" + obj.host + \"]\" : obj.host;\n // define unique id\n obj.id = obj.protocol + \"://\" + host + \":\" + obj.port + path;\n // define href\n obj.href =\n obj.protocol +\n \"://\" +\n host +\n (loc && loc.port === obj.port ? \"\" : \":\" + obj.port);\n return obj;\n}\n"],"names":["PACKET_TYPES","Object","create","PACKET_TYPES_REVERSE","keys","forEach","key","TEXT_ENCODER","ERROR_PACKET","type","data","withNativeBlob","Blob","prototype","toString","call","withNativeArrayBuffer","ArrayBuffer","isView","obj","buffer","encodePacket","_ref","supportsBinary","callback","encodeBlobAsBase64","fileReader","FileReader","onload","content","result","split","readAsDataURL","toArray","Uint8Array","byteOffset","byteLength","chars","lookup","i","charCodeAt","TEXT_DECODER","decodePacket","encodedPacket","binaryType","mapBinary","charAt","decodeBase64Packet","substring","length","decoded","base64","encoded1","encoded2","encoded3","encoded4","bufferLength","len","p","arraybuffer","bytes","decode","SEPARATOR","String","fromCharCode","createPacketEncoderStream","TransformStream","transform","packet","controller","arrayBuffer","then","encoded","TextEncoder","encode","encodePacketToBinary","header","payloadLength","DataView","setUint8","view","setUint16","setBigUint64","BigInt","enqueue","totalLength","chunks","reduce","acc","chunk","concatChunks","size","shift","j","slice","Emitter","mixin","on","addEventListener","event","fn","this","_callbacks","push","once","off","apply","arguments","removeListener","removeAllListeners","removeEventListener","cb","callbacks","splice","emit","args","Array","emitReserved","listeners","hasListeners","nextTick","Promise","resolve","setTimeoutFn","globalThisShim","self","window","Function","pick","_len","attr","_key","k","hasOwnProperty","NATIVE_SET_TIMEOUT","globalThis","setTimeout","NATIVE_CLEAR_TIMEOUT","clearTimeout","installTimerFunctions","opts","useNativeTimers","bind","clearTimeoutFn","randomString","Date","now","Math","random","TransportError","_Error","reason","description","context","_this","_inheritsLoose","_wrapNativeSuper","Error","Transport","_Emitter","_this2","writable","query","socket","forceBase64","_proto","onError","open","readyState","doOpen","close","doClose","onClose","send","packets","write","onOpen","onData","onPacket","details","pause","onPause","createUri","schema","undefined","_hostname","_port","path","_query","hostname","indexOf","port","secure","Number","encodedQuery","str","encodeURIComponent","Polling","_Transport","_polling","_poll","total","doPoll","_this3","encodedPayload","encodedPackets","decodedPacket","decodePayload","_this4","_this5","count","join","encodePayload","doWrite","uri","timestampRequests","timestampParam","sid","b64","_createClass","get","value","XMLHttpRequest","err","hasCORS","empty","BaseXHR","_Polling","location","isSSL","protocol","xd","req","request","method","xhrStatus","pollXhr","Request","createRequest","_opts","_method","_uri","_data","_create","_proto2","_a","xdomain","xhr","_xhr","extraHeaders","setDisableHeaderCheck","setRequestHeader","e","cookieJar","addCookies","withCredentials","requestTimeout","timeout","onreadystatechange","parseCookies","getResponseHeader","status","_onLoad","_onError","document","_index","requestsCount","requests","_cleanup","fromError","abort","responseText","attachEvent","unloadHandler","hasXHR2","newRequest","responseType","XHR","_BaseXHR","_this6","_extends","concat","isReactNative","navigator","product","toLowerCase","BaseWS","protocols","headers","ws","createSocket","addEventListeners","onopen","autoUnref","_socket","unref","onclose","closeEvent","onmessage","ev","onerror","_loop","lastPacket","WebSocketCtor","WebSocket","MozWebSocket","WS","_BaseWS","_packet","WT","_transport","WebTransport","transportOptions","name","closed","ready","createBidirectionalStream","stream","decoderStream","maxPayload","TextDecoder","state","expectedLength","isBinary","headerArray","getUint16","n","getUint32","pow","createPacketDecoderStream","MAX_SAFE_INTEGER","reader","readable","pipeThrough","getReader","encoderStream","pipeTo","_writer","getWriter","read","done","transports","websocket","webtransport","polling","re","parts","parse","src","b","replace","m","exec","source","host","authority","ipv6uri","pathNames","regx","names","queryKey","$0","$1","$2","withEventListeners","OFFLINE_EVENT_LISTENERS","listener","SocketWithoutUpgrade","writeBuffer","_prevBufferLen","_pingInterval","_pingTimeout","_maxPayload","_pingTimeoutTime","Infinity","_typeof","parsedUri","_transportsByName","t","transportName","agent","upgrade","rememberUpgrade","addTrailingSlash","rejectUnauthorized","perMessageDeflate","threshold","closeOnBeforeunload","qs","qry","pairs","l","pair","decodeURIComponent","_beforeunloadEventListener","transport","_offlineEventListener","_onClose","_cookieJar","createCookieJar","_open","createTransport","EIO","id","priorWebsocketSuccess","setTransport","_onDrain","_onPacket","flush","onHandshake","JSON","_sendPacket","_resetPingTimeout","code","pingInterval","pingTimeout","_pingTimeoutTimer","delay","upgrading","_getWritablePackets","payloadSize","c","utf8Length","ceil","_hasPingExpired","hasExpired","msg","options","compress","cleanupAndClose","waitForUpgrade","tryAllTransports","SocketWithUpgrade","_SocketWithoutUpgrade","_this7","_upgrades","_probe","_this8","failed","onTransportOpen","cleanup","freezeTransport","error","onTransportClose","onupgrade","to","_filterUpgrades","upgrades","filteredUpgrades","Socket","_SocketWithUpgrade","o","map","DEFAULT_TRANSPORTS","filter","withNativeFile","File","hasBinary","toJSON","isArray","deconstructPacket","buffers","packetData","pack","_deconstructPacket","attachments","placeholder","_placeholder","num","newData","reconstructPacket","_reconstructPacket","PacketType","RESERVED_EVENTS","Encoder","replacer","EVENT","ACK","encodeAsString","encodeAsBinary","BINARY_EVENT","BINARY_ACK","nsp","stringify","deconstruction","unshift","Decoder","reviver","add","reconstructor","isBinaryEvent","decodeString","BinaryReconstructor","takeBinaryData","start","buf","next","payload","tryParse","substr","isPayloadValid","CONNECT","isObject","DISCONNECT","CONNECT_ERROR","destroy","finishedReconstruction","reconPack","_proto3","binData","isInteger","isFinite","floor","isDataValid","freeze","connect","connect_error","disconnect","disconnecting","newListener","io","connected","recovered","receiveBuffer","sendBuffer","_queue","_queueSeq","ids","acks","flags","auth","_autoConnect","subEvents","subs","onpacket","_readyState","_b","_c","_len2","_key2","retries","fromQueue","_addToQueue","ack","pop","_registerAckCallback","isTransportWritable","engine","isConnected","notifyOutgoingListeners","ackTimeout","timer","_len3","_key3","withError","emitWithAck","_len4","_key4","reject","arg1","arg2","tryCount","pending","_len5","responseArgs","_key5","_drainQueue","force","_sendConnectPacket","_pid","pid","offset","_lastOffset","_clearAcks","some","onconnect","onevent","onack","ondisconnect","message","emitEvent","_anyListeners","_step","_iterator","_createForOfIteratorHelper","s","f","sent","_len6","_key6","emitBuffered","subDestroy","onAny","prependAny","offAny","listenersAny","onAnyOutgoing","_anyOutgoingListeners","prependAnyOutgoing","offAnyOutgoing","listenersAnyOutgoing","_step2","_iterator2","Backoff","ms","min","max","factor","jitter","attempts","duration","rand","deviation","reset","setMin","setMax","setJitter","Manager","nsps","reconnection","reconnectionAttempts","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","_parser","parser","encoder","decoder","autoConnect","v","_reconnection","skipReconnect","_reconnectionAttempts","_reconnectionDelay","_randomizationFactor","_reconnectionDelayMax","_timeout","maybeReconnectOnOpen","_reconnecting","reconnect","Engine","openSubDestroy","errorSub","onping","ondata","ondecoded","active","_destroy","_i","_nsps","_close","onreconnect","attempt","cache","parsed","loc","test","href","url","sameNamespace","forceNew","multiplex"],"mappings":";;;;;g6GAAA,IAAMA,EAAeC,OAAOC,OAAO,MACnCF,EAAmB,KAAI,IACvBA,EAAoB,MAAI,IACxBA,EAAmB,KAAI,IACvBA,EAAmB,KAAI,IACvBA,EAAsB,QAAI,IAC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AW,MAAQ4H,EAAO,IAAM/U,EAAI4K,KAAOJ,EAExDxK,EAAI+nB,KACA/nB,EAAImN,SACA,MACA4H,GACC8S,GAAOA,EAAIjd,OAAS5K,EAAI4K,KAAO,GAAK,IAAM5K,EAAI4K,MAChD5K,CACX,CD7CmBgoB,CAAI7b,GADnB1E,EAAOA,GAAQ,IACc+C,MAAQ,cAC/BsK,EAAS8S,EAAO9S,OAChBkD,EAAK4P,EAAO5P,GACZxN,EAAOod,EAAOpd,KACdyd,EAAgBN,GAAM3P,IAAOxN,KAAQmd,GAAM3P,GAAU,KAkB3D,OAjBsBvQ,EAAKygB,UACvBzgB,EAAK,0BACL,IAAUA,EAAK0gB,WACfF,EAGA5I,EAAK,IAAIiG,GAAQxQ,EAAQrN,IAGpBkgB,GAAM3P,KACP2P,GAAM3P,GAAM,IAAIsN,GAAQxQ,EAAQrN,IAEpC4X,EAAKsI,GAAM3P,IAEX4P,EAAO7e,QAAUtB,EAAKsB,QACtBtB,EAAKsB,MAAQ6e,EAAOvS,UAEjBgK,EAAGrW,OAAO4e,EAAOpd,KAAM/C,EAClC,QAGA4I,EAAclP,GAAQ,CAClBmkB,QAAAA,GACAxK,OAAAA,GACAuE,GAAIle,GACJ6d,QAAS7d"} \ No newline at end of file diff --git a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.js b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.js index f44753cf6..545dd57d8 100644 --- a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.js +++ b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.js @@ -1,5 +1,5 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ @@ -8,12 +8,10 @@ let _WINDOW = {}; let _DOCUMENT = {}; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -23,152 +21,243 @@ const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function'; const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); - var a = "classic", - r = "sharp", - o = "sharp-duotone"; - - var et$1 = { - classic: { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - sharp: { - 900: "fass", - 400: "fasr", - 300: "fasl", - 100: "fast" - }, - "sharp-duotone": { - 900: "fasds" - } - }; - var bt = { - kit: { - fak: "kit", - "fa-kit": "kit" - }, - "kit-duotone": { - fakd: "kit-duotone", - "fa-kit-duotone": "kit-duotone" - } - }; - var lo = { - classic: { - "fa-brands": "fab", - "fa-duotone": "fad", - "fa-light": "fal", - "fa-regular": "far", - "fa-solid": "fas", - "fa-thin": "fat" - }, - sharp: { - "fa-solid": "fass", - "fa-regular": "fasr", - "fa-light": "fasl", - "fa-thin": "fast" - }, - "sharp-duotone": { - "fa-solid": "fasds" - } - }, - no = { - classic: { - fab: "fa-brands", - fad: "fa-duotone", - fal: "fa-light", - far: "fa-regular", - fas: "fa-solid", - fat: "fa-thin" - }, - sharp: { - fass: "fa-solid", - fasr: "fa-regular", - fasl: "fa-light", - fast: "fa-thin" - }, - "sharp-duotone": { - fasds: "fa-solid" - } - }, - fo = { - classic: { - solid: "fas", - regular: "far", - light: "fal", - thin: "fat", - duotone: "fad", - brands: "fab" - }, - sharp: { - solid: "fass", - regular: "fasr", - light: "fasl", - thin: "fast" - }, - "sharp-duotone": { - solid: "fasds" - } - }, - ho = { - classic: { - fa: "solid", - fas: "solid", - "fa-solid": "solid", - far: "regular", - "fa-regular": "regular", - fal: "light", - "fa-light": "light", - fat: "thin", - "fa-thin": "thin", - fad: "duotone", - "fa-duotone": "duotone", - fab: "brands", - "fa-brands": "brands" - }, - sharp: { - fa: "solid", - fass: "solid", - "fa-solid": "solid", - fasr: "regular", - "fa-regular": "regular", - fasl: "light", - "fa-light": "light", - fast: "thin", - "fa-thin": "thin" - }, - "sharp-duotone": { - fa: "solid", - fasds: "solid", - "fa-solid": "solid" + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); } - }; - var Io = { + return e; + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + + var S = { + classic: { + fa: "solid", + fas: "solid", + "fa-solid": "solid", + far: "regular", + "fa-regular": "regular", + fal: "light", + "fa-light": "light", + fat: "thin", + "fa-thin": "thin", + fab: "brands", + "fa-brands": "brands" + }, + duotone: { + fa: "solid", + fad: "solid", + "fa-solid": "solid", + "fa-duotone": "solid", + fadr: "regular", + "fa-regular": "regular", + fadl: "light", + "fa-light": "light", + fadt: "thin", + "fa-thin": "thin" + }, + sharp: { + fa: "solid", + fass: "solid", + "fa-solid": "solid", + fasr: "regular", + "fa-regular": "regular", + fasl: "light", + "fa-light": "light", + fast: "thin", + "fa-thin": "thin" + }, + "sharp-duotone": { + fa: "solid", + fasds: "solid", + "fa-solid": "solid", + fasdr: "regular", + "fa-regular": "regular", + fasdl: "light", + "fa-light": "light", + fasdt: "thin", + "fa-thin": "thin" + } + }; + var s = "classic"; + var G = { + classic: { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + duotone: { + 900: "fad", + 400: "fadr", + 300: "fadl", + 100: "fadt" + }, + sharp: { + 900: "fass", + 400: "fasr", + 300: "fasl", + 100: "fast" + }, + "sharp-duotone": { + 900: "fasds", + 400: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var xt = { + classic: { + solid: "fas", + regular: "far", + light: "fal", + thin: "fat", + brands: "fab" + }, + duotone: { + solid: "fad", + regular: "fadr", + light: "fadl", + thin: "fadt" + }, + sharp: { + solid: "fass", + regular: "fasr", + light: "fasl", + thin: "fast" + }, + "sharp-duotone": { + solid: "fasds", + regular: "fasdr", + light: "fasdl", + thin: "fasdt" + } + }; + var St = { + kit: { + fak: "kit", + "fa-kit": "kit" + }, + "kit-duotone": { + fakd: "kit-duotone", + "fa-kit-duotone": "kit-duotone" + } + }; + var Ct = { kit: { "fa-kit": "fak" }, "kit-duotone": { "fa-kit-duotone": "fakd" } - }, - Fo = { - kit: { - fak: "fa-kit" - }, - "kit-duotone": { - fakd: "fa-kit-duotone" - } - }, - So = { - kit: { - kit: "fak" - }, - "kit-duotone": { - "kit-duotone": "fakd" - } }; + var Wt = { + kit: { + fak: "fa-kit" + }, + "kit-duotone": { + fakd: "fa-kit-duotone" + } + }; + var Et = { + kit: { + kit: "fak" + }, + "kit-duotone": { + "kit-duotone": "fakd" + } + }; + + var po = { + classic: { + "fa-brands": "fab", + "fa-duotone": "fad", + "fa-light": "fal", + "fa-regular": "far", + "fa-solid": "fas", + "fa-thin": "fat" + }, + duotone: { + "fa-regular": "fadr", + "fa-light": "fadl", + "fa-thin": "fadt" + }, + sharp: { + "fa-solid": "fass", + "fa-regular": "fasr", + "fa-light": "fasl", + "fa-thin": "fast" + }, + "sharp-duotone": { + "fa-solid": "fasds", + "fa-regular": "fasdr", + "fa-light": "fasdl", + "fa-thin": "fasdt" + } + }, + co = { + classic: { + fab: "fa-brands", + fad: "fa-duotone", + fal: "fa-light", + far: "fa-regular", + fas: "fa-solid", + fat: "fa-thin" + }, + duotone: { + fadr: "fa-regular", + fadl: "fa-light", + fadt: "fa-thin" + }, + sharp: { + fass: "fa-solid", + fasr: "fa-regular", + fasl: "fa-light", + fast: "fa-thin" + }, + "sharp-duotone": { + fasds: "fa-solid", + fasdr: "fa-regular", + fasdl: "fa-light", + fasdt: "fa-thin" + } + }; const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; const PRODUCTION = (() => { @@ -178,57 +267,45 @@ return false; } })(); - function familyProxy(obj) { // Defaults to the classic family if family is not available return new Proxy(obj, { get(target, prop) { - return prop in target ? target[prop] : target[a]; + return prop in target ? target[prop] : target[s]; } - }); } - - const _PREFIX_TO_STYLE = { ...ho - }; - _PREFIX_TO_STYLE[a] = { ...ho[a], - ...bt['kit'], - ...bt['kit-duotone'] - }; + const _PREFIX_TO_STYLE = _objectSpread2({}, S); + + // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding + // {'fa-duotone': 'duotone'} + _PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + 'fa-duotone': 'duotone' + }), S[s]), St['kit']), St['kit-duotone']); const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE); - const _STYLE_TO_PREFIX = { ...fo - }; - _STYLE_TO_PREFIX[a] = { ..._STYLE_TO_PREFIX[a], - ...So['kit'], - ...So['kit-duotone'] - }; + const _STYLE_TO_PREFIX = _objectSpread2({}, xt); + + // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'} + _STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + duotone: 'fad' + }), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']); const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX); - const _PREFIX_TO_LONG_STYLE = { ...no - }; - _PREFIX_TO_LONG_STYLE[a] = { ..._PREFIX_TO_LONG_STYLE[a], - ...Fo['kit'] - }; + const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, co); + _PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']); const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE); - const _LONG_STYLE_TO_PREFIX = { ...lo - }; - _LONG_STYLE_TO_PREFIX[a] = { ..._LONG_STYLE_TO_PREFIX[a], - ...Io['kit'] - }; + const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, po); + _LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']); const LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX); - const _FONT_WEIGHT_TO_PREFIX = { ...et$1 - }; + const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G); const FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX); - const prefixes = new Set(); - Object.keys(STYLE_TO_PREFIX[a]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[r]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[o]).map(prefixes.add.bind(prefixes)); function bunker(fn) { try { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - fn(...args); } catch (e) { if (!PRODUCTION) { @@ -237,50 +314,43 @@ } } - const w$1 = WINDOW || {}; - if (!w$1[NAMESPACE_IDENTIFIER]) w$1[NAMESPACE_IDENTIFIER] = {}; - if (!w$1[NAMESPACE_IDENTIFIER].styles) w$1[NAMESPACE_IDENTIFIER].styles = {}; - if (!w$1[NAMESPACE_IDENTIFIER].hooks) w$1[NAMESPACE_IDENTIFIER].hooks = {}; - if (!w$1[NAMESPACE_IDENTIFIER].shims) w$1[NAMESPACE_IDENTIFIER].shims = []; - var namespace = w$1[NAMESPACE_IDENTIFIER]; + const w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; function normalizeIcons(icons) { return Object.keys(icons).reduce((acc, iconName) => { const icon = icons[iconName]; const expanded = !!icon.icon; - if (expanded) { acc[icon.iconName] = icon.icon; } else { acc[iconName] = icon; } - return acc; }, {}); } - function defineIcons(prefix, icons) { let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { skipHooks = false } = params; const normalized = normalizeIcons(icons); - if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { namespace.hooks.addPack(prefix, normalizeIcons(icons)); } else { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...normalized - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized); } + /** * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction * of new styles we needed to differentiate between them. Prefix `fa` is now an alias * for `fas` so we'll ease the upgrade process for our users by automatically defining * this as well. */ - - if (prefix === 'fas') { defineIcons('fa', icons); } @@ -399,6 +469,7 @@ "debian": [448, 512, [], "e60b", "M380.2 245.6c3-7.6 5.5-14 5.2-24.4l-4.3 9c4.4-13.2 4-27.1 3.6-40.4c-.2-6-.3-11.8 0-17.4l-1.8-.5c-1.5-45.2-40.6-93.1-75.3-109.4c-30-13.8-76.1-16.2-97.3-5.8c1.3-1.1 4.2-2 6.8-2.7l.3-.1c3.3-1 6-1.7 4-2.9c-19.2 1.9-24.9 5.5-31.1 9.4l-.1 0c-4.6 2.9-9.5 6-20.3 8.7c-3.5 3.4 1.7 2 5.8 .9l0 0c4.1-1.1 7.2-1.9-.1 2.4c-3.5 1-6.6 1.3-9.6 1.6l-.1 0c-8.3 .8-15.8 1.6-30.7 17c.8 1.3 3.4-.2 5.3-1.3l.1-.1c2.3-1.4 3.4-2-1.7 4.4c-19.1-2.4-60.3 43.7-69.1 59l4.6 .8c-3.2 8-6.8 14.8-10 20.8c-4.3 8.1-7.9 14.9-8.7 21.3c-.3 5.1-1 11-1.7 17.3l0 0c-.1 1-.2 2-.3 3l-.1 .6c-3 27.3-6.7 60.8 3.9 73l-1.3 13c.6 1.2 1.1 2.3 1.6 3.5c.2 .4 .4 .8 .5 1.1l0 0 0 0 0 0 0 0 0 0 0 0 0 0c1 2.1 2 4.2 3.3 6.2l-3 .2c7 22.1 10.8 22.5 15.1 22.9l0 0c4.4 .4 9.3 .9 18.7 24.2c-2.7-.9-5.5-1.9-9.4-7.2c-.5 4.1 5.8 16.3 13.1 25.8l-3.1 3.6c2.1 3.7 4.8 6.2 7.6 8.8l0 0 0 0c1 .9 2.1 1.9 3.1 2.9c-11.9-6.5 3.2 13.7 11.9 25.2c.8 1.1 1.5 2 2.2 2.9l0 0 0 0 0 0 0 0 0 0c1.4 1.9 2.5 3.4 2.9 4.1l2.4-4.2c-.3 6.1 4.3 13.9 13.1 24.7l7.3-.3c3 6 14 16.7 20.7 17.2l-4.4 5.8c8.1 2.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c3.6 7.1 6.4 11.5 9 15.7l.1 .2c2.3 3.7 4.4 7.1 6.8 11.7c-5.1-4.2-8.7-9.5-12.5-15l-.3-.5c-1.4-2.1-2.8-4.2-4.4-6.2l1.2-5.9h.1zm7.5-9.6c1.6 3.3 3.2 6.4 5.7 9.1l2.6 7.7-1.3-2.1c-3.2-5.3-6.3-10.6-8-16.7l.8 1.6 .2 .4zm238.9-41.6c-2.3 17.4-7.7 34.6-16 50.3c7.6-14.9 12.5-30.9 14.8-47.2l1.2-3.1zM35.6 110.6c.4 .8 1.4 .5 2.3 .3c1.9-.5 3.6-.9-.1 7.6c-.5 .3-1 .7-1.5 1l0 0 0 0c-1.4 .9-2.8 1.9-3.9 3c1.9-3.8 3.5-7.4 3.2-11.9zM25.3 152.3c-.7 3.7-1.5 7.9-3.4 13.9c.2-1.9 0-3.5-.2-4.9l0-.1c-.4-3.4-.7-6.3 4.3-12.8c-.3 1.2-.5 2.5-.7 3.8v.1z"], "openid": [448, 512, [], "f19b", "M271.5 432l-68 32C88.5 453.7 0 392.5 0 318.2c0-71.5 82.5-131 191.7-144.3v43c-71.5 12.5-124 53-124 101.3 0 51 58.5 93.3 135.7 103v-340l68-33.2v384zM448 291l-131.3-28.5 36.8-20.7c-19.5-11.5-43.5-20-70-24.8v-43c46.2 5.5 87.7 19.5 120.3 39.3l35-19.8L448 291z"], "instalod": [512, 512, [], "e081", "M153.384,480H387.113L502.554,275.765,204.229,333.211ZM504.726,240.078,387.113,32H155.669L360.23,267.9ZM124.386,48.809,7.274,256,123.236,461.154,225.627,165.561Z"], + "files-pinwheel": [512, 512, [], "e69f", "M253.2 246.4L136.9 130.2c-.6-.6-1-1.3-1.4-2s-.5-1.6-.5-2.4s.2-1.6 .5-2.4s.8-1.4 1.4-2L253.3 5.1c.9-.9 2-1.5 3.2-1.7s2.5-.1 3.6 .3s2.1 1.3 2.8 2.3s1.1 2.2 1.1 3.5L264 242c0 1.3-.3 2.5-1 3.6s-1.7 1.9-2.9 2.4s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-3.6s.8-2.3 1.7-3.2l128-128c.9-.9 2-1.5 3.2-1.7s2.5-.1 3.6 .3s2.1 1.3 2.8 2.3s1.1 2.2 1.1 3.5l0 128zm40-132.5l82.8 82.7c.6 .6 1 1.3 1.4 2s.5 1.6 .5 2.4s-.2 1.6-.5 2.4s-.8 1.4-1.4 2L304 507c-.9 .9-2 1.5-3.2 1.7s-2.5 .1-3.6-.3s-2.1-1.3-2.8-2.3s-1.1-2.2-1.1-3.5l0-165.4c0-1.2 .4-2.5 1.1-3.5s1.7-1.8 2.8-2.3s2.4-.6 3.6-.3s2.3 .8 3.2 1.7zM78.7 122.4c0-1.2 .3-2.5 1-3.5s1.7-1.8 2.8-2.3s2.4-.6 3.6-.4s2.3 .8 3.2 1.7L237.8 266.4c.9 .9 1.5 2 1.7 3.2s.1 2.5-.3 3.6s-1.3 2.1-2.3 2.8s-2.2 1.1-3.5 1.1L85 277.1c-1.7 0-3.2-.7-4.4-1.8s-1.8-2.8-1.8-4.4l0-148.4z"], "expeditedssl": [496, 512, [], "f23e", "M248 43.4C130.6 43.4 35.4 138.6 35.4 256S130.6 468.6 248 468.6 460.6 373.4 460.6 256 365.4 43.4 248 43.4zm-97.4 132.9c0-53.7 43.7-97.4 97.4-97.4s97.4 43.7 97.4 97.4v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6c0-82.1-124-82.1-124 0v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6zM389.7 380c0 9.7-8 17.7-17.7 17.7H124c-9.7 0-17.7-8-17.7-17.7V238.3c0-9.7 8-17.7 17.7-17.7h248c9.7 0 17.7 8 17.7 17.7V380zm-248-137.3v132.9c0 2.5-1.9 4.4-4.4 4.4h-8.9c-2.5 0-4.4-1.9-4.4-4.4V242.7c0-2.5 1.9-4.4 4.4-4.4h8.9c2.5 0 4.4 1.9 4.4 4.4zm141.7 48.7c0 13-7.2 24.4-17.7 30.4v31.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-31.6c-10.5-6.1-17.7-17.4-17.7-30.4 0-19.7 15.8-35.4 35.4-35.4s35.5 15.8 35.5 35.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 478.3C121 486.3 17.7 383 17.7 256S121 25.7 248 25.7 478.3 129 478.3 256 375 486.3 248 486.3z"], "sellcast": [448, 512, [], "f2da", "M353.4 32H94.7C42.6 32 0 74.6 0 126.6v258.7C0 437.4 42.6 480 94.7 480h258.7c52.1 0 94.7-42.6 94.7-94.6V126.6c0-52-42.6-94.6-94.7-94.6zm-50 316.4c-27.9 48.2-89.9 64.9-138.2 37.2-22.9 39.8-54.9 8.6-42.3-13.2l15.7-27.2c5.9-10.3 19.2-13.9 29.5-7.9 18.6 10.8-.1-.1 18.5 10.7 27.6 15.9 63.4 6.3 79.4-21.3 15.9-27.6 6.3-63.4-21.3-79.4-17.8-10.2-.6-.4-18.6-10.6-24.6-14.2-3.4-51.9 21.6-37.5 18.6 10.8-.1-.1 18.5 10.7 48.4 28 65.1 90.3 37.2 138.5zm21.8-208.8c-17 29.5-16.3 28.8-19 31.5-6.5 6.5-16.3 8.7-26.5 3.6-18.6-10.8.1.1-18.5-10.7-27.6-15.9-63.4-6.3-79.4 21.3s-6.3 63.4 21.3 79.4c0 0 18.5 10.6 18.6 10.6 24.6 14.2 3.4 51.9-21.6 37.5-18.6-10.8.1.1-18.5-10.7-48.2-27.8-64.9-90.1-37.1-138.4 27.9-48.2 89.9-64.9 138.2-37.2l4.8-8.4c14.3-24.9 52-3.3 37.7 21.5z"], "square-twitter": [448, 512, ["twitter-square"], "f081", "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM351.3 199.3v0c0 86.7-66 186.6-186.6 186.6c-37.2 0-71.7-10.8-100.7-29.4c5.3 .6 10.4 .8 15.8 .8c30.7 0 58.9-10.4 81.4-28c-28.8-.6-53-19.5-61.3-45.5c10.1 1.5 19.2 1.5 29.6-1.2c-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3c-9-6-16.4-14.1-21.5-23.6s-7.8-20.2-7.7-31c0-12.2 3.2-23.4 8.9-33.1c32.3 39.8 80.8 65.8 135.2 68.6c-9.3-44.5 24-80.6 64-80.6c18.9 0 35.9 7.9 47.9 20.7c14.8-2.8 29-8.3 41.6-15.8c-4.9 15.2-15.2 28-28.8 36.1c13.2-1.4 26-5.1 37.8-10.2c-8.9 13.1-20.1 24.7-32.9 34c.2 2.8 .2 5.7 .2 8.5z"], @@ -429,13 +500,14 @@ "fedora": [448, 512, [], "f798", "M.0413 255.8C.1219 132.2 100.3 32 224 32C347.7 32 448 132.3 448 256C448 379.7 347.8 479.9 224.1 480H50.93C22.84 480 .0832 457.3 .0416 429.2H0V255.8H.0413zM342.6 192.7C342.6 153 307 124.2 269.4 124.2C234.5 124.2 203.6 150.5 199.3 184.1C199.1 187.9 198.9 189.1 198.9 192.6C198.8 213.7 198.9 235.4 198.1 257C199 283.1 199.1 309.1 198.1 333.6C198.1 360.7 178.7 379.1 153.4 379.1C128.1 379.1 107.6 358.9 107.6 333.6C108.1 305.9 130.2 288.3 156.1 287.5H156.3L182.6 287.3V250L156.3 250.2C109.2 249.8 71.72 286.7 70.36 333.6C70.36 379.2 107.9 416.5 153.4 416.5C196.4 416.5 232.1 382.9 236 340.9L236.2 287.4L268.8 287.1C294.1 287.3 293.8 249.3 268.6 249.8L236.2 250.1C236.2 243.7 236.3 237.3 236.3 230.9C236.4 218.2 236.4 205.5 236.2 192.7C236.3 176.2 252 161.5 269.4 161.5C286.9 161.5 305.3 170.2 305.3 192.7C305.3 195.9 305.2 197.8 305 199C303.1 209.5 310.2 219.4 320.7 220.9C331.3 222.4 340.9 214.8 341.9 204.3C342.5 200.1 342.6 196.4 342.6 192.7H342.6z"], "stripe-s": [384, 512, [], "f42a", "M155.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C298.3 7.2 251.1 0 203.8 0 88.1 0 11 60.4 11 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5a396.09 396.09 0 0 0 156 32.4c118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9z"], "meta": [640, 512, [], "e49b", "M640 317.9C640 409.2 600.6 466.4 529.7 466.4C467.1 466.4 433.9 431.8 372.8 329.8L341.4 277.2C333.1 264.7 326.9 253 320.2 242.2C300.1 276 273.1 325.2 273.1 325.2C206.1 441.8 168.5 466.4 116.2 466.4C43.42 466.4 0 409.1 0 320.5C0 177.5 79.78 42.4 183.9 42.4C234.1 42.4 277.7 67.08 328.7 131.9C365.8 81.8 406.8 42.4 459.3 42.4C558.4 42.4 640 168.1 640 317.9H640zM287.4 192.2C244.5 130.1 216.5 111.7 183 111.7C121.1 111.7 69.22 217.8 69.22 321.7C69.22 370.2 87.7 397.4 118.8 397.4C149 397.4 167.8 378.4 222 293.6C222 293.6 246.7 254.5 287.4 192.2V192.2zM531.2 397.4C563.4 397.4 578.1 369.9 578.1 322.5C578.1 198.3 523.8 97.08 454.9 97.08C421.7 97.08 393.8 123 360 175.1C369.4 188.9 379.1 204.1 389.3 220.5L426.8 282.9C485.5 377 500.3 397.4 531.2 397.4L531.2 397.4z"], - "laravel": [512, 512, [], "f3bd", "M504.4,115.83a5.72,5.72,0,0,0-.28-.68,8.52,8.52,0,0,0-.53-1.25,6,6,0,0,0-.54-.71,9.36,9.36,0,0,0-.72-.94c-.23-.22-.52-.4-.77-.6a8.84,8.84,0,0,0-.9-.68L404.4,55.55a8,8,0,0,0-8,0L300.12,111h0a8.07,8.07,0,0,0-.88.69,7.68,7.68,0,0,0-.78.6,8.23,8.23,0,0,0-.72.93c-.17.24-.39.45-.54.71a9.7,9.7,0,0,0-.52,1.25c-.08.23-.21.44-.28.68a8.08,8.08,0,0,0-.28,2.08V223.18l-80.22,46.19V63.44a7.8,7.8,0,0,0-.28-2.09c-.06-.24-.2-.45-.28-.68a8.35,8.35,0,0,0-.52-1.24c-.14-.26-.37-.47-.54-.72a9.36,9.36,0,0,0-.72-.94,9.46,9.46,0,0,0-.78-.6,9.8,9.8,0,0,0-.88-.68h0L115.61,1.07a8,8,0,0,0-8,0L11.34,56.49h0a6.52,6.52,0,0,0-.88.69,7.81,7.81,0,0,0-.79.6,8.15,8.15,0,0,0-.71.93c-.18.25-.4.46-.55.72a7.88,7.88,0,0,0-.51,1.24,6.46,6.46,0,0,0-.29.67,8.18,8.18,0,0,0-.28,2.1v329.7a8,8,0,0,0,4,6.95l192.5,110.84a8.83,8.83,0,0,0,1.33.54c.21.08.41.2.63.26a7.92,7.92,0,0,0,4.1,0c.2-.05.37-.16.55-.22a8.6,8.6,0,0,0,1.4-.58L404.4,400.09a8,8,0,0,0,4-6.95V287.88l92.24-53.11a8,8,0,0,0,4-7V117.92A8.63,8.63,0,0,0,504.4,115.83ZM111.6,17.28h0l80.19,46.15-80.2,46.18L31.41,63.44Zm88.25,60V278.6l-46.53,26.79-33.69,19.4V123.5l46.53-26.79Zm0,412.78L23.37,388.5V77.32L57.06,96.7l46.52,26.8V338.68a6.94,6.94,0,0,0,.12.9,8,8,0,0,0,.16,1.18h0a5.92,5.92,0,0,0,.38.9,6.38,6.38,0,0,0,.42,1v0a8.54,8.54,0,0,0,.6.78,7.62,7.62,0,0,0,.66.84l0,0c.23.22.52.38.77.58a8.93,8.93,0,0,0,.86.66l0,0,0,0,92.19,52.18Zm8-106.17-80.06-45.32,84.09-48.41,92.26-53.11,80.13,46.13-58.8,33.56Zm184.52,4.57L215.88,490.11V397.8L346.6,323.2l45.77-26.15Zm0-119.13L358.68,250l-46.53-26.79V131.79l33.69,19.4L392.37,178Zm8-105.28-80.2-46.17,80.2-46.16,80.18,46.15Zm8,105.28V178L455,151.19l33.68-19.4v91.39h0Z"], + "laravel": [512, 512, [], "f3bd", "M107.2 0c2.5 0 4.7 .8 6.7 2l94.3 54.1c2.7 1.5 4.5 3.5 5.4 5.9c.9 2.2 .9 4.3 .9 5.6l0 193.4 69.2-39.7 0-100.3c0-2.6 .6-5 2.2-7.2c1.5-2.1 3.5-3.6 5.7-4.8c0 0 0 0 0 0l94-54c1.6-.9 3.4-1.6 5.5-1.6s4 .7 5.6 1.6l95.8 55.1c2.3 1.3 3.9 3 4.9 5.3c.9 2.1 .9 4.2 .9 5.8l0 107.2c0 2-.2 4.3-1.4 6.4c-1.2 2.2-3 3.7-5.1 4.9l-.1 .1-88 50.5 0 100c0 2.3-.3 4.8-1.6 7c-1.3 2.2-3.3 3.7-5.3 4.9c0 0 0 0-.1 0L208.7 510c-2.2 1.2-4.5 2-7.1 2s-4.9-.9-7.1-2l-.1-.1L7.1 402l-.5-.3c-1.1-.7-2.6-1.7-3.8-2.9C.9 396.9 0 394.6 0 391.6L0 65.9c0-4.8 3-7.9 5.5-9.3L100.5 2c2-1.2 4.3-2 6.8-2zM38.1 67.1l69 39.9 69.2-39.9L107.1 27.4l-69 39.7zm353 93.2l69-39.7-69-39.7-69.1 39.7 69.1 39.7zM189.2 89L120 128.8l0 186.4 69.2-39.9 0-186.4zM94.5 128.9L25.2 89.1l0 294.2 164 94.2 0-79.4-87.3-49.3-.2-.1c-1.3-.8-3.2-1.9-4.6-3.7c-1.7-2.1-2.5-4.7-2.5-7.7l0-208.5zm214.7 92.4l69.3 39.6 0-78.5-69.3-39.9 0 78.8zm94.5 39.6L473 221.2l0-78.8-69.3 39.9 0 78.5zM201.6 376.1l163.8-93.2-69-39.9L133 337.1l68.6 38.9zm12.9 101.5l164-94.2 0-78.8-164 93.6 0 79.4z"], "hotjar": [512, 512, [], "f3b1", "M361.5 0c0 131.6-80.7 176.8-140.2 209.4c-.6 .3-1.1 .6-1.6 .9c-53.8 30.2-88.7 49.8-89.6 122H32C32 200.8 112.7 155.6 172.2 123C227 93.2 262.5 73 262.5 0h98.9zM301 302.6c54.8-29.8 90.3-50 90.3-123h98c0 131.6-80.7 176.7-140.2 209.4c-54.8 29.8-90.3 50-90.3 123h-98c0-131.6 80.7-176.8 140.2-209.4z"], "bluetooth-b": [320, 512, [], "f294", "M196.48 260.023l92.626-103.333L143.125 0v206.33l-86.111-86.111-31.406 31.405 108.061 108.399L25.608 368.422l31.406 31.405 86.111-86.111L145.84 512l148.552-148.644-97.912-103.333zm40.86-102.996l-49.977 49.978-.338-100.295 50.315 50.317zM187.363 313.04l49.977 49.978-50.315 50.316.338-100.294z"], "square-letterboxd": [448, 512, [], "e62e", "M384 32c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384zM105.1 187C66.4 187 35 218.3 35 257s31.4 70 70.1 70c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1c-12.4-19.8-34.4-32.9-59.5-32.9zM224 187c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1C176.9 313.8 198.9 327 224 327c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1C271.1 200.2 249.1 187 224 187zm118.9 0c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1c12.4 19.8 34.4 32.9 59.5 32.9c38.7 0 70.1-31.3 70.1-70s-31.4-70-70.1-70z"], "sticker-mule": [576, 512, [], "f3f7", "M561.7 199.6c-1.3.3.3 0 0 0zm-6.2-77.4c-7.7-22.3-5.1-7.2-13.4-36.9-1.6-6.5-3.6-14.5-6.2-20-4.4-8.7-4.6-7.5-4.6-9.5 0-5.3 30.7-45.3 19-46.9-5.7-.6-12.2 11.6-20.6 17-8.6 4.2-8 5-10.3 5-2.6 0-5.7-3-6.2-5-2-5.7 1.9-25.9-3.6-25.9-3.6 0-12.3 24.8-17 25.8-5.2 1.3-27.9-11.4-75.1 18-25.3 13.2-86.9 65.2-87 65.3-6.7 4.7-20 4.7-35.5 16-44.4 30.1-109.6 9.4-110.7 9-110.6-26.8-128-15.2-159 11.5-20.8 17.9-23.7 36.5-24.2 38.9-4.2 20.4 5.2 48.3 6.7 64.3 1.8 19.3-2.7 17.7 7.7 98.3.5 1 4.1 0 5.1 1.5 0 8.4-3.8 12.1-4.1 13-1.5 4.5-1.5 10.5 0 16 2.3 8.2 8.2 37.2 8.2 46.9 0 41.8.4 44 2.6 49.4 3.9 10 12.5 9.1 17 12 3.1 3.5-.5 8.5 1 12.5.5 2 3.6 4 6.2 5 9.2 3.6 27 .3 29.9-2.5 1.6-1.5.5-4.5 3.1-5 5.1 0 10.8-.5 14.4-2.5 5.1-2.5 4.1-6 1.5-10.5-.4-.8-7-13.3-9.8-16-2.1-2-5.1-3-7.2-4.5-5.8-4.9-10.3-19.4-10.3-19.5-4.6-19.4-10.3-46.3-4.1-66.8 4.6-17.2 39.5-87.7 39.6-87.8 4.1-6.5 17-11.5 27.3-7 6 1.9 19.3 22 65.4 30.9 47.9 8.7 97.4-2 112.2-2 2.8 2-1.9 13-.5 38.9 0 26.4-.4 13.7-4.1 29.9-2.2 9.7 3.4 23.2-1.5 46.9-1.4 9.8-9.9 32.7-8.2 43.4.5 1 1 2 1.5 3.5.5 4.5 1.5 8.5 4.6 10 7.3 3.6 12-3.5 9.8 11.5-.7 3.1-2.6 12 1.5 15 4.4 3.7 30.6 3.4 36.5.5 2.6-1.5 1.6-4.5 6.4-7.4 1.9-.9 11.3-.4 11.3-6.5.3-1.8-9.2-19.9-9.3-20-2.6-3.5-9.2-4.5-11.3-8-6.9-10.1-1.7-52.6.5-59.4 3-11 5.6-22.4 8.7-32.4 11-42.5 10.3-50.6 16.5-68.3.8-1.8 6.4-23.1 10.3-29.9 9.3-17 21.7-32.4 33.5-47.4 18-22.9 34-46.9 52-69.8 6.1-7 8.2-13.7 18-8 10.8 5.7 21.6 7 31.9 17 14.6 12.8 10.2 18.2 11.8 22.9 1.5 5 7.7 10.5 14.9 9.5 10.4-2 13-2.5 13.4-2.5 2.6-.5 5.7-5 7.2-8 3.1-5.5 7.2-9 7.2-16.5 0-7.7-.4-2.8-20.6-52.9z"], "creative-commons-zero": [496, 512, [], "f4f3", "M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm-.4 60.5c-81.9 0-102.5 77.3-102.5 142.8 0 65.5 20.6 142.8 102.5 142.8S350.5 321.5 350.5 256c0-65.5-20.6-142.8-102.5-142.8zm0 53.9c3.3 0 6.4.5 9.2 1.2 5.9 5.1 8.8 12.1 3.1 21.9l-54.5 100.2c-1.7-12.7-1.9-25.1-1.9-34.4 0-28.8 2-88.9 44.1-88.9zm40.8 46.2c2.9 15.4 3.3 31.4 3.3 42.7 0 28.9-2 88.9-44.1 88.9-13.5 0-32.6-7.7-20.1-26.4l60.9-105.2z"], "hips": [640, 512, [], "f452", "M251.6 157.6c0-1.9-.9-2.8-2.8-2.8h-40.9c-1.6 0-2.7 1.4-2.7 2.8v201.8c0 1.4 1.1 2.8 2.7 2.8h40.9c1.9 0 2.8-.9 2.8-2.8zM156.5 168c-16.1-11.8-36.3-17.9-60.3-18-18.1-.1-34.6 3.7-49.8 11.4V80.2c0-1.8-.9-2.7-2.8-2.7H2.7c-1.8 0-2.7.9-2.7 2.7v279.2c0 1.9.9 2.8 2.7 2.8h41c1.9 0 2.8-.9 2.8-2.8V223.3c0-.8-2.8-27 45.8-27 48.5 0 45.8 26.1 45.8 27v122.6c0 9 7.3 16.3 16.4 16.3h27.3c1.8 0 2.7-.9 2.7-2.8V223.3c0-23.4-9.3-41.8-28-55.3zm478.4 110.1c-6.8-15.7-18.4-27-34.9-34.1l-57.6-25.3c-8.6-3.6-9.2-11.2-2.6-16.1 7.4-5.5 44.3-13.9 84 6.8 1.7 1 4-.3 4-2.4v-44.7c0-1.3-.6-2.1-1.9-2.6-17.7-6.6-36.1-9.9-55.1-9.9-26.5 0-45.3 5.8-58.5 15.4-.5.4-28.4 20-22.7 53.7 3.4 19.6 15.8 34.2 37.2 43.6l53.6 23.5c11.6 5.1 15.2 13.3 12.2 21.2-3.7 9.1-13.2 13.6-36.5 13.6-24.3 0-44.7-8.9-58.4-19.1-2.1-1.4-4.4.2-4.4 2.3v34.4c0 10.4 4.9 17.3 14.6 20.7 15.6 5.5 31.6 8.2 48.2 8.2 12.7 0 25.8-1.2 36.3-4.3.7-.3 36-8.9 45.6-45.8 3.5-13.5 2.4-26.5-3.1-39.1zM376.2 149.8c-31.7 0-104.2 20.1-104.2 103.5v183.5c0 .8.6 2.7 2.7 2.7h40.9c1.9 0 2.8-.9 2.8-2.7V348c16.5 12.7 35.8 19.1 57.7 19.1 60.5 0 108.7-48.5 108.7-108.7.1-60.3-48.2-108.6-108.6-108.6zm0 170.9c-17.2 0-31.9-6.1-44-18.2-12.2-12.2-18.2-26.8-18.2-44 0-34.5 27.6-62.2 62.2-62.2 34.5 0 62.2 27.6 62.2 62.2.1 34.3-27.3 62.2-62.2 62.2zM228.3 72.5c-15.9 0-28.8 12.9-28.9 28.9 0 15.6 12.7 28.9 28.9 28.9s28.9-13.1 28.9-28.9c0-16.2-13-28.9-28.9-28.9z"], + "css": [448, 512, [], "e6a2", "M376.3 32L0 32 0 408.3c0 19 7.6 37.2 21 50.7s31.7 21 50.7 21l304.6 0c19 0 37.2-7.6 50.7-21s21-31.7 21-50.7l0-304.6c0-19-7.6-37.2-21-50.7s-31.7-21-50.7-21zM332.4 431.4c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.5-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-4-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L351.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.5 12.5c7.5 8.4 11.5 20.3 11.8 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4 27.4-12.3 35.7c-8.2 8.3-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-101 0c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.4-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-3.9-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L250.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.4 12.5c7.6 8.4 11.5 20.3 11.9 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4.1 27.4-12.3 35.7s-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-105.6 1.1c-8.4-7.7-12.5-19.2-12.5-34.5l0-75.4c0-15.2 4.4-26.7 13.2-34.6c8.9-7.8 20.7-11.8 35.2-11.8c14.1 0 25.2 4 33.4 12c8.3 8 12.5 20 12.5 35.9l0 6-33.1 0 0-5.8c0-6.1-1.3-10.7-4-13.6c-1.1-1.5-2.6-2.7-4.3-3.5s-3.5-1.2-5.4-1.1c-5.4 0-9.2 1.8-11.4 5.6c-2.3 5.2-3.3 10.8-3 16.4l0 65.5c0 13.7 4.8 20.6 14.4 20.8c4.5 0 7.9-1.6 10.2-4.8c2.5-4.1 3.7-8.8 3.5-13.6l0-4.9 33.1 0 0 5.1c0 10.6-2.1 19.5-6.2 26.6c-4 6.9-9.9 12.5-17.1 16c-7.7 3.7-16.1 5.5-24.6 5.3c-14.2 0-25.5-3.9-33.8-11.6z"], "behance": [576, 512, [], "f1b4", "M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z"], "reddit": [512, 512, [], "f1a1", "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"], "discord": [640, 512, [], "f392", "M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"], @@ -569,6 +641,7 @@ "spotify": [496, 512, [], "f1bc", "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"], "optin-monster": [576, 512, [], "f23c", "M572.6 421.4c5.6-9.5 4.7-15.2-5.4-11.6-3-4.9-7-9.5-11.1-13.8 2.9-9.7-.7-14.2-10.8-9.2-4.6-3.2-10.3-6.5-15.9-9.2 0-15.1-11.6-11.6-17.6-5.7-10.4-1.5-18.7-.3-26.8 5.7.3-6.5.3-13 .3-19.7 12.6 0 40.2-11 45.9-36.2 1.4-6.8 1.6-13.8-.3-21.9-3-13.5-14.3-21.3-25.1-25.7-.8-5.9-7.6-14.3-14.9-15.9s-12.4 4.9-14.1 10.3c-8.5 0-19.2 2.8-21.1 8.4-5.4-.5-11.1-1.4-16.8-1.9 2.7-1.9 5.4-3.5 8.4-4.6 5.4-9.2 14.6-11.4 25.7-11.6V256c19.5-.5 43-5.9 53.8-18.1 12.7-13.8 14.6-37.3 12.4-55.1-2.4-17.3-9.7-37.6-24.6-48.1-8.4-5.9-21.6-.8-22.7 9.5-2.2 19.6 1.2 30-38.6 25.1-10.3-23.8-24.6-44.6-42.7-60C341 49.6 242.9 55.5 166.4 71.7c19.7 4.6 41.1 8.6 59.7 16.5-26.2 2.4-52.7 11.3-76.2 23.2-32.8 17-44 29.9-56.7 42.4 14.9-2.2 28.9-5.1 43.8-3.8-9.7 5.4-18.4 12.2-26.5 20-25.8.9-23.8-5.3-26.2-25.9-1.1-10.5-14.3-15.4-22.7-9.7-28.1 19.9-33.5 79.9-12.2 103.5 10.8 12.2 35.1 17.3 54.9 17.8-.3 1.1-.3 1.9-.3 2.7 10.8.5 19.5 2.7 24.6 11.6 3 1.1 5.7 2.7 8.1 4.6-5.4.5-11.1 1.4-16.5 1.9-3.3-6.6-13.7-8.1-21.1-8.1-1.6-5.7-6.5-12.2-14.1-10.3-6.8 1.9-14.1 10-14.9 15.9-22.5 9.5-30.1 26.8-25.1 47.6 5.3 24.8 33 36.2 45.9 36.2v19.7c-6.6-5-14.3-7.5-26.8-5.7-5.5-5.5-17.3-10.1-17.3 5.7-5.9 2.7-11.4 5.9-15.9 9.2-9.8-4.9-13.6-1.7-11.1 9.2-4.1 4.3-7.8 8.6-11.1 13.8-10.2-3.7-11 2.2-5.4 11.6-1.1 3.5-1.6 7-1.9 10.8-.5 31.6 44.6 64 73.5 65.1 17.3.5 34.6-8.4 43-23.5 113.2 4.9 226.7 4.1 340.2 0 8.1 15.1 25.4 24.3 42.7 23.5 29.2-1.1 74.3-33.5 73.5-65.1.2-3.7-.7-7.2-1.7-10.7zm-73.8-254c1.1-3 2.4-8.4 2.4-14.6 0-5.9 6.8-8.1 14.1-.8 11.1 11.6 14.9 40.5 13.8 51.1-4.1-13.6-13-29-30.3-35.7zm-4.6 6.7c19.5 6.2 28.6 27.6 29.7 48.9-1.1 2.7-3 5.4-4.9 7.6-5.7 5.9-15.4 10-26.2 12.2 4.3-21.3.3-47.3-12.7-63 4.9-.8 10.9-2.4 14.1-5.7zm-24.1 6.8c13.8 11.9 20 39.2 14.1 63.5-4.1.5-8.1.8-11.6.8-1.9-21.9-6.8-44-14.3-64.6 3.7.3 8.1.3 11.8.3zM47.5 203c-1.1-10.5 2.4-39.5 13.8-51.1 7-7.3 14.1-5.1 14.1.8 0 6.2 1.4 11.6 2.4 14.6-17.3 6.8-26.2 22.2-30.3 35.7zm9.7 27.6c-1.9-2.2-3.5-4.9-4.9-7.6 1.4-21.3 10.3-42.7 29.7-48.9 3.2 3.2 9.2 4.9 14.1 5.7-13 15.7-17 41.6-12.7 63-10.8-2.2-20.5-6-26.2-12.2zm47.9 14.6c-4.1 0-8.1-.3-12.7-.8-4.6-18.6-1.9-38.9 5.4-53v.3l12.2-5.1c4.9-1.9 9.7-3.8 14.9-4.9-10.7 19.7-17.4 41.3-19.8 63.5zm184-162.7c41.9 0 76.2 34 76.2 75.9 0 42.2-34.3 76.2-76.2 76.2s-76.2-34-76.2-76.2c0-41.8 34.3-75.9 76.2-75.9zm115.6 174.3c-.3 17.8-7 48.9-23 57-13.2 6.6-6.5-7.5-16.5-58.1 13.3.3 26.6.3 39.5 1.1zm-54-1.6c.8 4.9 3.8 40.3-1.6 41.9-11.6 3.5-40 4.3-51.1-1.1-4.1-3-4.6-35.9-4.3-41.1v.3c18.9-.3 38.1-.3 57 0zM278.3 309c-13 3.5-41.6 4.1-54.6-1.6-6.5-2.7-3.8-42.4-1.9-51.6 19.2-.5 38.4-.5 57.8-.8v.3c1.1 8.3 3.3 51.2-1.3 53.7zm-106.5-51.1c12.2-.8 24.6-1.4 36.8-1.6-2.4 15.4-3 43.5-4.9 52.2-1.1 6.8-4.3 6.8-9.7 4.3-21.9-9.8-27.6-35.2-22.2-54.9zm-35.4 31.3c7.8-1.1 15.7-1.9 23.5-2.7 1.6 6.2 3.8 11.9 7 17.6 10 17 44 35.7 45.1 7 6.2 14.9 40.8 12.2 54.9 10.8 15.7-1.4 23.8-1.4 26.8-14.3 12.4 4.3 30.8 4.1 44 3 11.3-.8 20.8-.5 24.6-8.9 1.1 5.1 1.9 11.6 4.6 16.8 10.8 21.3 37.3 1.4 46.8-31.6 8.6.8 17.6 1.9 26.5 2.7-.4 1.3-3.8 7.3 7.3 11.6-47.6 47-95.7 87.8-163.2 107-63.2-20.8-112.1-59.5-155.9-106.5 9.6-3.4 10.4-8.8 8-12.5zm-21.6 172.5c-3.8 17.8-21.9 29.7-39.7 28.9-19.2-.8-46.5-17-59.2-36.5-2.7-31.1 43.8-61.3 66.2-54.6 14.9 4.3 27.8 30.8 33.5 54 0 3-.3 5.7-.8 8.2zm-8.7-66c-.5-13.5-.5-27-.3-40.5h.3c2.7-1.6 5.7-3.8 7.8-6.5 6.5-1.6 13-5.1 15.1-9.2 3.3-7.1-7-7.5-5.4-12.4 2.7-1.1 5.7-2.2 7.8-3.5 29.2 29.2 58.6 56.5 97.3 77-36.8 11.3-72.4 27.6-105.9 47-1.2-18.6-7.7-35.9-16.7-51.9zm337.6 64.6c-103 3.5-206.2 4.1-309.4 0 0 .3 0 .3-.3.3v-.3h.3c35.1-21.6 72.2-39.2 112.4-50.8 11.6 5.1 23 9.5 34.9 13.2 2.2.8 2.2.8 4.3 0 14.3-4.1 28.4-9.2 42.2-15.4 41.5 11.7 78.8 31.7 115.6 53zm10.5-12.4c-35.9-19.5-73-35.9-111.9-47.6 38.1-20 71.9-47.3 103.5-76.7 2.2 1.4 4.6 2.4 7.6 3.2 0 .8.3 1.9.5 2.4-4.6 2.7-7.8 6.2-5.9 10.3 2.2 3.8 8.6 7.6 15.1 8.9 2.4 2.7 5.1 5.1 8.1 6.8 0 13.8-.3 27.6-.8 41.3l.3-.3c-9.3 15.9-15.5 37-16.5 51.7zm105.9 6.2c-12.7 19.5-40 35.7-59.2 36.5-19.3.9-40.5-13.2-40.5-37 5.7-23.2 18.9-49.7 33.5-54 22.7-6.9 69.2 23.4 66.2 54.5zM372.9 75.2c-3.8-72.1-100.8-79.7-126-23.5 44.6-24.3 90.3-15.7 126 23.5zM74.8 407.1c-15.7 1.6-49.5 25.4-49.5 43.2 0 11.6 15.7 19.5 32.2 14.9 12.2-3.2 31.1-17.6 35.9-27.3 6-11.6-3.7-32.7-18.6-30.8zm215.9-176.2c28.6 0 51.9-21.6 51.9-48.4 0-36.1-40.5-58.1-72.2-44.3 9.5 3 16.5 11.6 16.5 21.6 0 23.3-33.3 32-46.5 11.3-7.3 34.1 19.4 59.8 50.3 59.8zM68 474.1c.5 6.5 12.2 12.7 21.6 9.5 6.8-2.7 14.6-10.5 17.3-16.2 3-7-1.1-20-9.7-18.4-8.9 1.6-29.7 16.7-29.2 25.1zm433.2-67c-14.9-1.9-24.6 19.2-18.9 30.8 4.9 9.7 24.1 24.1 36.2 27.3 16.5 4.6 32.2-3.2 32.2-14.9 0-17.8-33.8-41.6-49.5-43.2zM478.8 449c-8.4-1.6-12.4 11.3-9.5 18.4 2.4 5.7 10.3 13.5 17.3 16.2 9.2 3.2 21.1-3 21.3-9.5.9-8.4-20.2-23.5-29.1-25.1z"], "fly": [384, 512, [], "f417", "M197.8 427.8c12.9 11.7 33.7 33.3 33.2 50.7 0 .8-.1 1.6-.1 2.5-1.8 19.8-18.8 31.1-39.1 31-25-.1-39.9-16.8-38.7-35.8 1-16.2 20.5-36.7 32.4-47.6 2.3-2.1 2.7-2.7 5.6-3.6 3.4 0 3.9.3 6.7 2.8zM331.9 67.3c-16.3-25.7-38.6-40.6-63.3-52.1C243.1 4.5 214-.2 192 0c-44.1 0-71.2 13.2-81.1 17.3C57.3 45.2 26.5 87.2 28 158.6c7.1 82.2 97 176 155.8 233.8 1.7 1.6 4.5 4.5 6.2 5.1l3.3.1c2.1-.7 1.8-.5 3.5-2.1 52.3-49.2 140.7-145.8 155.9-215.7 7-39.2 3.1-72.5-20.8-112.5zM186.8 351.9c-28-51.1-65.2-130.7-69.3-189-3.4-47.5 11.4-131.2 69.3-136.7v325.7zM328.7 180c-16.4 56.8-77.3 128-118.9 170.3C237.6 298.4 275 217 277 158.4c1.6-45.9-9.8-105.8-48-131.4 88.8 18.3 115.5 98.1 99.7 153z"], + "square-bluesky": [448, 512, [], "e6a3", "M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 247.4c14.5-30 54-85.8 90.7-113.3c26.5-19.9 69.3-35.2 69.3 13.7c0 9.8-5.6 82.1-8.9 93.8c-11.4 40.8-53 51.2-90 44.9c64.7 11 81.2 47.5 45.6 84c-67.5 69.3-97-17.4-104.6-39.6c0 0 0 0 0 0l-.3-.9c-.9-2.6-1.4-4.1-1.8-4.1s-.9 1.5-1.8 4.1c-.1 .3-.2 .6-.3 .9c0 0 0 0 0 0c-7.6 22.2-37.1 108.8-104.6 39.6c-35.5-36.5-19.1-73 45.6-84c-37 6.3-78.6-4.1-90-44.9c-3.3-11.7-8.9-84-8.9-93.8c0-48.9 42.9-33.5 69.3-13.7c36.7 27.5 76.2 83.4 90.7 113.3z"], "aviato": [640, 512, [], "f421", "M107.2 283.5l-19-41.8H36.1l-19 41.8H0l62.2-131.4 62.2 131.4h-17.2zm-45-98.1l-19.6 42.5h39.2l-19.6-42.5zm112.7 102.4l-62.2-131.4h17.1l45.1 96 45.1-96h17l-62.1 131.4zm80.6-4.3V156.4H271v127.1h-15.5zm209.1-115.6v115.6h-17.3V167.9h-41.2v-11.5h99.6v11.5h-41.1zM640 218.8c0 9.2-1.7 17.8-5.1 25.8-3.4 8-8.2 15.1-14.2 21.1-6 6-13.1 10.8-21.1 14.2-8 3.4-16.6 5.1-25.8 5.1s-17.8-1.7-25.8-5.1c-8-3.4-15.1-8.2-21.1-14.2-6-6-10.8-13-14.2-21.1-3.4-8-5.1-16.6-5.1-25.8s1.7-17.8 5.1-25.8c3.4-8 8.2-15.1 14.2-21.1 6-6 13-8.4 21.1-11.9 8-3.4 16.6-5.1 25.8-5.1s17.8 1.7 25.8 5.1c8 3.4 15.1 5.8 21.1 11.9 6 6 10.7 13.1 14.2 21.1 3.4 8 5.1 16.6 5.1 25.8zm-15.5 0c0-7.3-1.3-14-3.9-20.3-2.6-6.3-6.2-11.7-10.8-16.3-4.6-4.6-10-8.2-16.2-10.9-6.2-2.7-12.8-4-19.8-4s-13.6 1.3-19.8 4c-6.2 2.7-11.6 6.3-16.2 10.9-4.6 4.6-8.2 10-10.8 16.3-2.6 6.3-3.9 13.1-3.9 20.3 0 7.3 1.3 14 3.9 20.3 2.6 6.3 6.2 11.7 10.8 16.3 4.6 4.6 10 8.2 16.2 10.9 6.2 2.7 12.8 4 19.8 4s13.6-1.3 19.8-4c6.2-2.7 11.6-6.3 16.2-10.9 4.6-4.6 8.2-10 10.8-16.3 2.6-6.3 3.9-13.1 3.9-20.3zm-94.8 96.7v-6.3l88.9-10-242.9 13.4c.6-2.2 1.1-4.6 1.4-7.2.3-2 .5-4.2.6-6.5l64.8-8.1-64.9 1.9c0-.4-.1-.7-.1-1.1-2.8-17.2-25.5-23.7-25.5-23.7l-1.1-26.3h23.8l19 41.8h17.1L348.6 152l-62.2 131.4h17.1l19-41.8h23.6L345 268s-22.7 6.5-25.5 23.7c-.1.3-.1.7-.1 1.1l-64.9-1.9 64.8 8.1c.1 2.3.3 4.4.6 6.5.3 2.6.8 5 1.4 7.2L78.4 299.2l88.9 10v6.3c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4 0-6.2-4.6-11.3-10.5-12.2v-5.8l80.3 9v5.4c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-4.9l28.4 3.2v23.7h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9V323l38.3 4.3c8.1 11.4 19 13.6 19 13.6l-.1 6.7-5.1.2-.1 12.1h4.1l.1-5h5.2l.1 5h4.1l-.1-12.1-5.1-.2-.1-6.7s10.9-2.1 19-13.6l38.3-4.3v23.2h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9v-23.7l28.4-3.2v4.9c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-5.4l80.3-9v5.8c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4-.2-6.3-4.7-11.4-10.7-12.3zm-200.8-87.6l19.6-42.5 19.6 42.5h-17.9l-1.7-40.3-1.7 40.3h-17.9z"], "itunes": [448, 512, [], "f3b4", "M223.6 80.3C129 80.3 52.5 157 52.5 251.5S129 422.8 223.6 422.8s171.2-76.7 171.2-171.2c0-94.6-76.7-171.3-171.2-171.3zm79.4 240c-3.2 13.6-13.5 21.2-27.3 23.8-12.1 2.2-22.2 2.8-31.9-5-11.8-10-12-26.4-1.4-36.8 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 3.2-3.6 2.2-2 2.2-80.8 0-5.6-2.7-7.1-8.4-6.1-4 .7-91.9 17.1-91.9 17.1-5 1.1-6.7 2.6-6.7 8.3 0 116.1.5 110.8-1.2 118.5-2.1 9-7.6 15.8-14.9 19.6-8.3 4.6-23.4 6.6-31.4 5.2-21.4-4-28.9-28.7-14.4-42.9 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 5-5.7.9-127 2.6-133.7.4-2.6 1.5-4.8 3.5-6.4 2.1-1.7 5.8-2.7 6.7-2.7 101-19 113.3-21.4 115.1-21.4 5.7-.4 9 3 9 8.7-.1 170.6.4 161.4-1 167.6zM345.2 32H102.8C45.9 32 0 77.9 0 134.8v242.4C0 434.1 45.9 480 102.8 480h242.4c57 0 102.8-45.9 102.8-102.8V134.8C448 77.9 402.1 32 345.2 32zM223.6 444c-106.3 0-192.5-86.2-192.5-192.5S117.3 59 223.6 59s192.5 86.2 192.5 192.5S329.9 444 223.6 444z"], "cuttlefish": [440, 512, [], "f38c", "M344 305.5c-17.5 31.6-57.4 54.5-96 54.5-56.6 0-104-47.4-104-104s47.4-104 104-104c38.6 0 78.5 22.9 96 54.5 13.7-50.9 41.7-93.3 87-117.8C385.7 39.1 320.5 8 248 8 111 8 0 119 0 256s111 248 248 248c72.5 0 137.7-31.1 183-80.7-45.3-24.5-73.3-66.9-87-117.8z"], @@ -674,7 +747,7 @@ "apper": [640, 512, [], "f371", "M42.1 239.1c22.2 0 29 2.8 33.5 14.6h.8v-22.9c0-11.3-4.8-15.4-17.9-15.4-11.3 0-14.4 2.5-15.1 12.8H4.8c.3-13.9 1.5-19.1 5.8-24.4C17.9 195 29.5 192 56.7 192c33 0 47.1 5 53.9 18.9 2 4.3 4 15.6 4 23.7v76.3H76.3l1.3-19.1h-1c-5.3 15.6-13.6 20.4-35.5 20.4-30.3 0-41.1-10.1-41.1-37.3 0-25.2 12.3-35.8 42.1-35.8zm17.1 48.1c13.1 0 16.9-3 16.9-13.4 0-9.1-4.3-11.6-19.6-11.6-13.1 0-17.9 3-17.9 12.1-.1 10.4 3.7 12.9 20.6 12.9zm77.8-94.9h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.2 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3H137v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm57.9-60.7h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.3 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3h-39.5v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm53.8-3.8c0-25.4 3.3-37.8 12.3-45.8 8.8-8.1 22.2-11.3 45.1-11.3 42.8 0 55.7 12.8 55.7 55.7v11.1h-75.3c-.3 2-.3 4-.3 4.8 0 16.9 4.5 21.9 20.1 21.9 13.9 0 17.9-3 17.9-13.9h37.5v2.3c0 9.8-2.5 18.9-6.8 24.7-7.3 9.8-19.6 13.6-44.3 13.6-27.5 0-41.6-3.3-50.6-12.3-8.5-8.5-11.3-21.3-11.3-50.8zm76.4-11.6c-.3-1.8-.3-3.3-.3-3.8 0-12.3-3.3-14.6-19.6-14.6-14.4 0-17.1 3-18.1 15.1l-.3 3.3h38.3zm55.6-45.3h38.3l-1.8 19.9h.7c6.8-14.9 14.4-20.2 29.7-20.2 10.8 0 19.1 3.3 23.4 9.3 5.3 7.3 6.8 14.4 6.8 34 0 1.5 0 5 .2 9.3h-35c.3-1.8.3-3.3.3-4 0-15.4-2-19.4-10.3-19.4-6.3 0-10.8 3.3-13.1 9.3-1 3-1 4.3-1 12.3v68h-38.3V192.3z"], "fort-awesome": [512, 512, [], "f286", "M489.2 287.9h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6V146.2c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-6-8-4.6-11.7-4.6v-38c8.3-2 17.1-3.4 25.7-3.4 10.9 0 20.9 4.3 31.4 4.3 4.6 0 27.7-1.1 27.7-8v-60c0-2.6-2-4.6-4.6-4.6-5.1 0-15.1 4.3-24 4.3-9.7 0-20.9-4.3-32.6-4.3-8 0-16 1.1-23.7 2.9v-4.9c5.4-2.6 9.1-8.3 9.1-14.3 0-20.7-31.4-20.8-31.4 0 0 6 3.7 11.7 9.1 14.3v111.7c-3.7 0-11.7-1.4-11.7 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32H128v-32c0-2.6-2-4.6-4.6-4.6H96c-2.6 0-4.6 2-4.6 4.6v178.3H54.8v-32c0-2.6-2-4.6-4.6-4.6H22.8c-2.6 0-4.6 2-4.6 4.6V512h182.9v-96c0-72.6 109.7-72.6 109.7 0v96h182.9V292.5c.1-2.6-1.9-4.6-4.5-4.6zm-288.1-4.5c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64zm146.4 0c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64z"], "waze": [512, 512, [], "f83f", "M502.17 201.67C516.69 287.53 471.23 369.59 389 409.8c13 34.1-12.4 70.2-48.32 70.2a51.68 51.68 0 0 1-51.57-49c-6.44.19-64.2 0-76.33-.64A51.69 51.69 0 0 1 159 479.92c-33.86-1.36-57.95-34.84-47-67.92-37.21-13.11-72.54-34.87-99.62-70.8-13-17.28-.48-41.8 20.84-41.8 46.31 0 32.22-54.17 43.15-110.26C94.8 95.2 193.12 32 288.09 32c102.48 0 197.15 70.67 214.08 169.67zM373.51 388.28c42-19.18 81.33-56.71 96.29-102.14 40.48-123.09-64.15-228-181.71-228-83.45 0-170.32 55.42-186.07 136-9.53 48.91 5 131.35-68.75 131.35C58.21 358.6 91.6 378.11 127 389.54c24.66-21.8 63.87-15.47 79.83 14.34 14.22 1 79.19 1.18 87.9.82a51.69 51.69 0 0 1 78.78-16.42zM205.12 187.13c0-34.74 50.84-34.75 50.84 0s-50.84 34.74-50.84 0zm116.57 0c0-34.74 50.86-34.75 50.86 0s-50.86 34.75-50.86 0zm-122.61 70.69c-3.44-16.94 22.18-22.18 25.62-5.21l.06.28c4.14 21.42 29.85 44 64.12 43.07 35.68-.94 59.25-22.21 64.11-42.77 4.46-16.05 28.6-10.36 25.47 6-5.23 22.18-31.21 62-91.46 62.9-42.55 0-80.88-27.84-87.9-64.25z"], - "bluesky": [576, 512, [], "e671", "M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3 .5-6.6 1-10 1.4C74.3 308.6-9.1 342.8 100.3 464.5C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z"], + "bluesky": [512, 512, [], "e671", "M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z"], "cc-jcb": [576, 512, [], "f24b", "M431.5 244.3V212c41.2 0 38.5.2 38.5.2 7.3 1.3 13.3 7.3 13.3 16 0 8.8-6 14.5-13.3 15.8-1.2.4-3.3.3-38.5.3zm42.8 20.2c-2.8-.7-3.3-.5-42.8-.5v35c39.6 0 40 .2 42.8-.5 7.5-1.5 13.5-8 13.5-17 0-8.7-6-15.5-13.5-17zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM182 192.3h-57c0 67.1 10.7 109.7-35.8 109.7-19.5 0-38.8-5.7-57.2-14.8v28c30 8.3 68 8.3 68 8.3 97.9 0 82-47.7 82-131.2zm178.5 4.5c-63.4-16-165-14.9-165 59.3 0 77.1 108.2 73.6 165 59.2V287C312.9 311.7 253 309 253 256s59.8-55.6 107.5-31.2v-28zM544 286.5c0-18.5-16.5-30.5-38-32v-.8c19.5-2.7 30.3-15.5 30.3-30.2 0-19-15.7-30-37-31 0 0 6.3-.3-120.3-.3v127.5h122.7c24.3.1 42.3-12.9 42.3-33.2z"], "snapchat": [512, 512, [62124, "snapchat-ghost"], "f2ab", "M496.926,366.6c-3.373-9.176-9.8-14.086-17.112-18.153-1.376-.806-2.641-1.451-3.72-1.947-2.182-1.128-4.414-2.22-6.634-3.373-22.8-12.09-40.609-27.341-52.959-45.42a102.889,102.889,0,0,1-9.089-16.12c-1.054-3.013-1-4.724-.248-6.287a10.221,10.221,0,0,1,2.914-3.038c3.918-2.591,7.96-5.22,10.7-6.993,4.885-3.162,8.754-5.667,11.246-7.44,9.362-6.547,15.909-13.5,20-21.278a42.371,42.371,0,0,0,2.1-35.191c-6.2-16.318-21.613-26.449-40.287-26.449a55.543,55.543,0,0,0-11.718,1.24c-1.029.224-2.059.459-3.063.72.174-11.16-.074-22.94-1.066-34.534-3.522-40.758-17.794-62.123-32.674-79.16A130.167,130.167,0,0,0,332.1,36.443C309.515,23.547,283.91,17,256,17S202.6,23.547,180,36.443a129.735,129.735,0,0,0-33.281,26.783c-14.88,17.038-29.152,38.44-32.673,79.161-.992,11.594-1.24,23.435-1.079,34.533-1-.26-2.021-.5-3.051-.719a55.461,55.461,0,0,0-11.717-1.24c-18.687,0-34.125,10.131-40.3,26.449a42.423,42.423,0,0,0,2.046,35.228c4.105,7.774,10.652,14.731,20.014,21.278,2.48,1.736,6.361,4.24,11.246,7.44,2.641,1.711,6.5,4.216,10.28,6.72a11.054,11.054,0,0,1,3.3,3.311c.794,1.624.818,3.373-.36,6.6a102.02,102.02,0,0,1-8.94,15.785c-12.077,17.669-29.363,32.648-51.434,44.639C32.355,348.608,20.2,352.75,15.069,366.7c-3.868,10.528-1.339,22.506,8.494,32.6a49.137,49.137,0,0,0,12.4,9.387,134.337,134.337,0,0,0,30.342,12.139,20.024,20.024,0,0,1,6.126,2.741c3.583,3.137,3.075,7.861,7.849,14.78a34.468,34.468,0,0,0,8.977,9.127c10.019,6.919,21.278,7.353,33.207,7.811,10.776.41,22.989.881,36.939,5.481,5.778,1.91,11.78,5.605,18.736,9.92C194.842,480.951,217.707,495,255.973,495s61.292-14.123,78.118-24.428c6.907-4.24,12.872-7.9,18.489-9.758,13.949-4.613,26.163-5.072,36.939-5.481,11.928-.459,23.187-.893,33.206-7.812a34.584,34.584,0,0,0,10.218-11.16c3.434-5.84,3.348-9.919,6.572-12.771a18.971,18.971,0,0,1,5.753-2.629A134.893,134.893,0,0,0,476.02,408.71a48.344,48.344,0,0,0,13.019-10.193l.124-.149C498.389,388.5,500.708,376.867,496.926,366.6Zm-34.013,18.277c-20.745,11.458-34.533,10.23-45.259,17.137-9.114,5.865-3.72,18.513-10.342,23.076-8.134,5.617-32.177-.4-63.239,9.858-25.618,8.469-41.961,32.822-88.038,32.822s-62.036-24.3-88.076-32.884c-31-10.255-55.092-4.241-63.239-9.858-6.609-4.563-1.24-17.211-10.341-23.076-10.739-6.907-24.527-5.679-45.26-17.075-13.206-7.291-5.716-11.8-1.314-13.937,75.143-36.381,87.133-92.552,87.666-96.719.645-5.046,1.364-9.014-4.191-14.148-5.369-4.96-29.189-19.7-35.8-24.316-10.937-7.638-15.748-15.264-12.2-24.638,2.48-6.485,8.531-8.928,14.879-8.928a27.643,27.643,0,0,1,5.965.67c12,2.6,23.659,8.617,30.392,10.242a10.749,10.749,0,0,0,2.48.335c3.6,0,4.86-1.811,4.612-5.927-.768-13.132-2.628-38.725-.558-62.644,2.84-32.909,13.442-49.215,26.04-63.636,6.051-6.932,34.484-36.976,88.857-36.976s82.88,29.92,88.931,36.827c12.611,14.421,23.225,30.727,26.04,63.636,2.071,23.919.285,49.525-.558,62.644-.285,4.327,1.017,5.927,4.613,5.927a10.648,10.648,0,0,0,2.48-.335c6.745-1.624,18.4-7.638,30.4-10.242a27.641,27.641,0,0,1,5.964-.67c6.386,0,12.4,2.48,14.88,8.928,3.546,9.374-1.24,17-12.189,24.639-6.609,4.612-30.429,19.343-35.8,24.315-5.568,5.134-4.836,9.1-4.191,14.149.533,4.228,12.511,60.4,87.666,96.718C468.629,373.011,476.119,377.524,462.913,384.877Z"], "fantasy-flight-games": [512, 512, [], "f6dc", "M256 32.86L32.86 256 256 479.14 479.14 256 256 32.86zM88.34 255.83c1.96-2 11.92-12.3 96.49-97.48 41.45-41.75 86.19-43.77 119.77-18.69 24.63 18.4 62.06 58.9 62.15 59 .68.74 1.07 2.86.58 3.38-11.27 11.84-22.68 23.54-33.5 34.69-34.21-32.31-40.52-38.24-48.51-43.95-17.77-12.69-41.4-10.13-56.98 5.1-2.17 2.13-1.79 3.43.12 5.35 2.94 2.95 28.1 28.33 35.09 35.78-11.95 11.6-23.66 22.97-35.69 34.66-12.02-12.54-24.48-25.53-36.54-38.11-21.39 21.09-41.69 41.11-61.85 60.99zm234.82 101.6c-35.49 35.43-78.09 38.14-106.99 20.47-22.08-13.5-39.38-32.08-72.93-66.84 12.05-12.37 23.79-24.42 35.37-36.31 33.02 31.91 37.06 36.01 44.68 42.09 18.48 14.74 42.52 13.67 59.32-1.8 3.68-3.39 3.69-3.64.14-7.24-10.59-10.73-21.19-21.44-31.77-32.18-1.32-1.34-3.03-2.48-.8-4.69 10.79-10.71 21.48-21.52 32.21-32.29.26-.26.65-.38 1.91-1.07 12.37 12.87 24.92 25.92 37.25 38.75 21.01-20.73 41.24-40.68 61.25-60.42 13.68 13.4 27.13 26.58 40.86 40.03-20.17 20.86-81.68 82.71-100.5 101.5zM256 0L0 256l256 256 256-256L256 0zM16 256L256 16l240 240-240 240L16 256z"], @@ -792,12 +865,10 @@ let _WINDOW = {}; let _DOCUMENT = {}; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -807,152 +878,243 @@ const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function'; const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); - var a = "classic", - r = "sharp", - o = "sharp-duotone"; - - var et$1 = { - classic: { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - sharp: { - 900: "fass", - 400: "fasr", - 300: "fasl", - 100: "fast" - }, - "sharp-duotone": { - 900: "fasds" - } - }; - var bt = { - kit: { - fak: "kit", - "fa-kit": "kit" - }, - "kit-duotone": { - fakd: "kit-duotone", - "fa-kit-duotone": "kit-duotone" - } - }; - var lo = { - classic: { - "fa-brands": "fab", - "fa-duotone": "fad", - "fa-light": "fal", - "fa-regular": "far", - "fa-solid": "fas", - "fa-thin": "fat" - }, - sharp: { - "fa-solid": "fass", - "fa-regular": "fasr", - "fa-light": "fasl", - "fa-thin": "fast" - }, - "sharp-duotone": { - "fa-solid": "fasds" - } - }, - no = { - classic: { - fab: "fa-brands", - fad: "fa-duotone", - fal: "fa-light", - far: "fa-regular", - fas: "fa-solid", - fat: "fa-thin" - }, - sharp: { - fass: "fa-solid", - fasr: "fa-regular", - fasl: "fa-light", - fast: "fa-thin" - }, - "sharp-duotone": { - fasds: "fa-solid" - } - }, - fo = { - classic: { - solid: "fas", - regular: "far", - light: "fal", - thin: "fat", - duotone: "fad", - brands: "fab" - }, - sharp: { - solid: "fass", - regular: "fasr", - light: "fasl", - thin: "fast" - }, - "sharp-duotone": { - solid: "fasds" - } - }, - ho = { - classic: { - fa: "solid", - fas: "solid", - "fa-solid": "solid", - far: "regular", - "fa-regular": "regular", - fal: "light", - "fa-light": "light", - fat: "thin", - "fa-thin": "thin", - fad: "duotone", - "fa-duotone": "duotone", - fab: "brands", - "fa-brands": "brands" - }, - sharp: { - fa: "solid", - fass: "solid", - "fa-solid": "solid", - fasr: "regular", - "fa-regular": "regular", - fasl: "light", - "fa-light": "light", - fast: "thin", - "fa-thin": "thin" - }, - "sharp-duotone": { - fa: "solid", - fasds: "solid", - "fa-solid": "solid" + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); } - }; - var Io = { + return e; + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + + var S = { + classic: { + fa: "solid", + fas: "solid", + "fa-solid": "solid", + far: "regular", + "fa-regular": "regular", + fal: "light", + "fa-light": "light", + fat: "thin", + "fa-thin": "thin", + fab: "brands", + "fa-brands": "brands" + }, + duotone: { + fa: "solid", + fad: "solid", + "fa-solid": "solid", + "fa-duotone": "solid", + fadr: "regular", + "fa-regular": "regular", + fadl: "light", + "fa-light": "light", + fadt: "thin", + "fa-thin": "thin" + }, + sharp: { + fa: "solid", + fass: "solid", + "fa-solid": "solid", + fasr: "regular", + "fa-regular": "regular", + fasl: "light", + "fa-light": "light", + fast: "thin", + "fa-thin": "thin" + }, + "sharp-duotone": { + fa: "solid", + fasds: "solid", + "fa-solid": "solid", + fasdr: "regular", + "fa-regular": "regular", + fasdl: "light", + "fa-light": "light", + fasdt: "thin", + "fa-thin": "thin" + } + }; + var s = "classic"; + var G = { + classic: { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + duotone: { + 900: "fad", + 400: "fadr", + 300: "fadl", + 100: "fadt" + }, + sharp: { + 900: "fass", + 400: "fasr", + 300: "fasl", + 100: "fast" + }, + "sharp-duotone": { + 900: "fasds", + 400: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var xt = { + classic: { + solid: "fas", + regular: "far", + light: "fal", + thin: "fat", + brands: "fab" + }, + duotone: { + solid: "fad", + regular: "fadr", + light: "fadl", + thin: "fadt" + }, + sharp: { + solid: "fass", + regular: "fasr", + light: "fasl", + thin: "fast" + }, + "sharp-duotone": { + solid: "fasds", + regular: "fasdr", + light: "fasdl", + thin: "fasdt" + } + }; + var St = { + kit: { + fak: "kit", + "fa-kit": "kit" + }, + "kit-duotone": { + fakd: "kit-duotone", + "fa-kit-duotone": "kit-duotone" + } + }; + var Ct = { kit: { "fa-kit": "fak" }, "kit-duotone": { "fa-kit-duotone": "fakd" } - }, - Fo = { - kit: { - fak: "fa-kit" - }, - "kit-duotone": { - fakd: "fa-kit-duotone" - } - }, - So = { - kit: { - kit: "fak" - }, - "kit-duotone": { - "kit-duotone": "fakd" - } }; + var Wt = { + kit: { + fak: "fa-kit" + }, + "kit-duotone": { + fakd: "fa-kit-duotone" + } + }; + var Et = { + kit: { + kit: "fak" + }, + "kit-duotone": { + "kit-duotone": "fakd" + } + }; + + var po = { + classic: { + "fa-brands": "fab", + "fa-duotone": "fad", + "fa-light": "fal", + "fa-regular": "far", + "fa-solid": "fas", + "fa-thin": "fat" + }, + duotone: { + "fa-regular": "fadr", + "fa-light": "fadl", + "fa-thin": "fadt" + }, + sharp: { + "fa-solid": "fass", + "fa-regular": "fasr", + "fa-light": "fasl", + "fa-thin": "fast" + }, + "sharp-duotone": { + "fa-solid": "fasds", + "fa-regular": "fasdr", + "fa-light": "fasdl", + "fa-thin": "fasdt" + } + }, + co = { + classic: { + fab: "fa-brands", + fad: "fa-duotone", + fal: "fa-light", + far: "fa-regular", + fas: "fa-solid", + fat: "fa-thin" + }, + duotone: { + fadr: "fa-regular", + fadl: "fa-light", + fadt: "fa-thin" + }, + sharp: { + fass: "fa-solid", + fasr: "fa-regular", + fasl: "fa-light", + fast: "fa-thin" + }, + "sharp-duotone": { + fasds: "fa-solid", + fasdr: "fa-regular", + fasdl: "fa-light", + fasdt: "fa-thin" + } + }; const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; const PRODUCTION = (() => { @@ -962,57 +1124,45 @@ return false; } })(); - function familyProxy(obj) { // Defaults to the classic family if family is not available return new Proxy(obj, { get(target, prop) { - return prop in target ? target[prop] : target[a]; + return prop in target ? target[prop] : target[s]; } - }); } - - const _PREFIX_TO_STYLE = { ...ho - }; - _PREFIX_TO_STYLE[a] = { ...ho[a], - ...bt['kit'], - ...bt['kit-duotone'] - }; + const _PREFIX_TO_STYLE = _objectSpread2({}, S); + + // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding + // {'fa-duotone': 'duotone'} + _PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + 'fa-duotone': 'duotone' + }), S[s]), St['kit']), St['kit-duotone']); const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE); - const _STYLE_TO_PREFIX = { ...fo - }; - _STYLE_TO_PREFIX[a] = { ..._STYLE_TO_PREFIX[a], - ...So['kit'], - ...So['kit-duotone'] - }; + const _STYLE_TO_PREFIX = _objectSpread2({}, xt); + + // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'} + _STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + duotone: 'fad' + }), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']); const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX); - const _PREFIX_TO_LONG_STYLE = { ...no - }; - _PREFIX_TO_LONG_STYLE[a] = { ..._PREFIX_TO_LONG_STYLE[a], - ...Fo['kit'] - }; + const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, co); + _PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']); const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE); - const _LONG_STYLE_TO_PREFIX = { ...lo - }; - _LONG_STYLE_TO_PREFIX[a] = { ..._LONG_STYLE_TO_PREFIX[a], - ...Io['kit'] - }; + const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, po); + _LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']); const LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX); - const _FONT_WEIGHT_TO_PREFIX = { ...et$1 - }; + const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G); const FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX); - const prefixes = new Set(); - Object.keys(STYLE_TO_PREFIX[a]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[r]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[o]).map(prefixes.add.bind(prefixes)); function bunker(fn) { try { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - fn(...args); } catch (e) { if (!PRODUCTION) { @@ -1021,50 +1171,43 @@ } } - const w$1 = WINDOW || {}; - if (!w$1[NAMESPACE_IDENTIFIER]) w$1[NAMESPACE_IDENTIFIER] = {}; - if (!w$1[NAMESPACE_IDENTIFIER].styles) w$1[NAMESPACE_IDENTIFIER].styles = {}; - if (!w$1[NAMESPACE_IDENTIFIER].hooks) w$1[NAMESPACE_IDENTIFIER].hooks = {}; - if (!w$1[NAMESPACE_IDENTIFIER].shims) w$1[NAMESPACE_IDENTIFIER].shims = []; - var namespace = w$1[NAMESPACE_IDENTIFIER]; + const w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; function normalizeIcons(icons) { return Object.keys(icons).reduce((acc, iconName) => { const icon = icons[iconName]; const expanded = !!icon.icon; - if (expanded) { acc[icon.iconName] = icon.icon; } else { acc[iconName] = icon; } - return acc; }, {}); } - function defineIcons(prefix, icons) { let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { skipHooks = false } = params; const normalized = normalizeIcons(icons); - if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { namespace.hooks.addPack(prefix, normalizeIcons(icons)); } else { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...normalized - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized); } + /** * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction * of new styles we needed to differentiate between them. Prefix `fa` is now an alias * for `fas` so we'll ease the upgrade process for our users by automatically defining * this as well. */ - - if (prefix === 'fas') { defineIcons('fa', icons); } @@ -1184,7 +1327,7 @@ "face-grin-squint-tears": [512, 512, [129315, "grin-squint-tears"], "f586", "M426.8 14.2C446-5 477.5-4.6 497.1 14.9s20 51 .7 70.3c-14.8 14.8-65.7 23.6-88.3 26.7c-5.6 .9-10.3-3.9-9.5-9.5C403.3 79.9 412 29 426.8 14.2zM75 75C158.2-8.3 284.5-22.2 382.2 33.2c-1.5 4.8-2.9 9.6-4.1 14.3c-3.1 12.2-5.5 24.6-7.3 35c-80.8-53.6-190.7-44.8-261.9 26.4C37.7 180.1 28.9 290 82.5 370.8c-10.5 1.8-22.9 4.2-35 7.3c-4.7 1.2-9.5 2.5-14.3 4.1C-22.2 284.5-8.2 158.2 75 75zm389.6 58.9c4.7-1.2 9.5-2.5 14.3-4.1C534.2 227.5 520.2 353.8 437 437c-83.2 83.2-209.5 97.2-307.2 41.8c1.5-4.8 2.8-9.6 4-14.3c3.1-12.2 5.5-24.6 7.3-35c80.8 53.6 190.7 44.8 261.9-26.4c71.2-71.2 80-181.1 26.4-261.9c10.5-1.8 22.9-4.2 35-7.3zm-105.4 93c10.1-16.3 33.9-16.9 37.9 1.9c9.5 44.4-3.7 93.5-39.3 129.1s-84.8 48.8-129.1 39.3c-18.7-4-18.2-27.8-1.9-37.9c25.2-15.7 50.2-35.4 73.6-58.8s43.1-48.4 58.8-73.6zM92 265.3l97.4-29.7c11.6-3.5 22.5 7.3 19 19l-29.7 97.4c-2.6 8.6-13.4 11.3-19.8 4.9c-2-2-3.2-4.6-3.4-7.3l-5.1-56.1-56.1-5.1c-2.8-.3-5.4-1.5-7.3-3.4c-6.3-6.3-3.6-17.2 4.9-19.8zm193-178.2c2 2 3.2 4.6 3.4 7.3l5.1 56.1 56.1 5.1c2.8 .3 5.4 1.5 7.3 3.4c6.3 6.3 3.6 17.2-4.9 19.8l-97.4 29.7c-11.6 3.5-22.5-7.3-19-19L265.3 92c2.6-8.6 13.4-11.3 19.8-4.9zM14.9 497.1c-19.6-19.6-20-51-.7-70.3C29 412 79.8 403.2 102.4 400.1c5.6-.9 10.3 3.9 9.5 9.5c-3.2 22.5-11.9 73.5-26.7 88.3C66 517 34.5 516.6 14.9 497.1z"], "rectangle-list": [576, 512, ["list-alt"], "f022", "M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l448 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm96 64a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm104 0c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24l224 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-224 0c-13.3 0-24-10.7-24-24zm-72-64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM96 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"], "calendar-plus": [448, 512, [], "f271", "M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L64 64C28.7 64 0 92.7 0 128l0 16 0 48L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-256 0-48 0-16c0-35.3-28.7-64-64-64l-40 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40L152 64l0-40zM48 192l352 0 0 256c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256zm176 40c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z"], - "circle-left": [512, 512, [61840, "arrow-alt-circle-left"], "f359", "M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM256 128l-32 0L96 256 224 384l32 0 0-80 128 0 0-96-128 0 0-80z"], + "circle-left": [512, 512, [61840, "arrow-alt-circle-left"], "f359", "M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"], "money-bill-1": [576, 512, ["money-bill-alt"], "f3d1", "M112 112c0 35.3-28.7 64-64 64l0 160c35.3 0 64 28.7 64 64l352 0c0-35.3 28.7-64 64-64l0-160c-35.3 0-64-28.7-64-64l-352 0zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 256a112 112 0 1 1 224 0 112 112 0 1 1 -224 0zm80-48c0 8.8 7.2 16 16 16l0 64-8 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l24 0 24 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-8 0 0-80c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"], "clock": [512, 512, [128339, "clock-four"], "f017", "M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"], "keyboard": [576, 512, [9000], "f11c", "M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z"], @@ -1195,7 +1338,7 @@ "id-card": [576, 512, [62147, "drivers-license"], "f2c2", "M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"], "sun": [512, 512, [9728], "f185", "M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"], "face-laugh-wink": [512, 512, ["laugh-wink"], "f59c", "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm130.7 57.9c-4.2-13.6 7.1-25.9 21.3-25.9l212.5 0c14.2 0 25.5 12.4 21.3 25.9C369 368.4 318.2 408 258.2 408s-110.8-39.6-127.5-94.1zM144.4 192a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm165.8 21.7c-7.6 8.1-20.2 8.5-28.3 .9s-8.5-20.2-.9-28.3c14.5-15.5 35.2-22.3 54.6-22.3s40.1 6.8 54.6 22.3c7.6 8.1 7.1 20.7-.9 28.3s-20.7 7.1-28.3-.9c-5.5-5.8-14.8-9.7-25.4-9.7s-19.9 3.8-25.4 9.7z"], - "circle-down": [512, 512, [61466, "arrow-alt-circle-down"], "f358", "M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM128 256l0 32L256 416 384 288l0-32-80 0 0-128-96 0 0 128-80 0z"], + "circle-down": [512, 512, [61466, "arrow-alt-circle-down"], "f358", "M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"], "thumbs-down": [512, 512, [128078, 61576], "f165", "M323.8 477.2c-38.2 10.9-78.1-11.2-89-49.4l-5.7-20c-3.7-13-10.4-25-19.5-35l-51.3-56.4c-8.9-9.8-8.2-25 1.6-33.9s25-8.2 33.9 1.6l51.3 56.4c14.1 15.5 24.4 34 30.1 54.1l5.7 20c3.6 12.7 16.9 20.1 29.7 16.5s20.1-16.9 16.5-29.7l-5.7-20c-5.7-19.9-14.7-38.7-26.6-55.5c-5.2-7.3-5.8-16.9-1.7-24.9s12.3-13 21.3-13L448 288c8.8 0 16-7.2 16-16c0-6.8-4.3-12.7-10.4-15c-7.4-2.8-13-9-14.9-16.7s.1-15.8 5.3-21.7c2.5-2.8 4-6.5 4-10.6c0-7.8-5.6-14.3-13-15.7c-8.2-1.6-15.1-7.3-18-15.2s-1.6-16.7 3.6-23.3c2.1-2.7 3.4-6.1 3.4-9.9c0-6.7-4.2-12.6-10.2-14.9c-11.5-4.5-17.7-16.9-14.4-28.8c.4-1.3 .6-2.8 .6-4.3c0-8.8-7.2-16-16-16l-97.5 0c-12.6 0-25 3.7-35.5 10.7l-61.7 41.1c-11 7.4-25.9 4.4-33.3-6.7s-4.4-25.9 6.7-33.3l61.7-41.1c18.4-12.3 40-18.8 62.1-18.8L384 32c34.7 0 62.9 27.6 64 62c14.6 11.7 24 29.7 24 50c0 4.5-.5 8.8-1.3 13c15.4 11.7 25.3 30.2 25.3 51c0 6.5-1 12.8-2.8 18.7C504.8 238.3 512 254.3 512 272c0 35.3-28.6 64-64 64l-92.3 0c4.7 10.4 8.7 21.2 11.8 32.2l5.7 20c10.9 38.2-11.2 78.1-49.4 89zM32 384c-17.7 0-32-14.3-32-32L0 128c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224c0 17.7-14.3 32-32 32l-64 0z"], "chess-pawn": [320, 512, [9823], "f443", "M232 152A72 72 0 1 0 88 152a72 72 0 1 0 144 0zm24 120l-12.6 0 10.7 80-48.4 0L195 272l-35 0-35 0-10.7 80-48.4 0 10.7-80L64 272c-13.3 0-24-10.7-24-24s10.7-24 24-24c-15.1-20.1-24-45-24-72C40 85.7 93.7 32 160 32s120 53.7 120 120c0 27-8.9 51.9-24 72c13.3 0 24 10.7 24 24s-10.7 24-24 24zM52.7 464l214.7 0-16.6-32L69.2 432 52.7 464zm207.9-80c12 0 22.9 6.7 28.4 17.3l26.5 51.2c3 5.8 4.6 12.2 4.6 18.7c0 22.5-18.2 40.8-40.8 40.8L40.8 512C18.2 512 0 493.8 0 471.2c0-6.5 1.6-12.9 4.6-18.7l26.5-51.2C36.5 390.7 47.5 384 59.5 384l201 0z"], "credit-card": [576, 512, [128179, 62083, "credit-card-alt"], "f09d", "M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"], @@ -1247,12 +1390,10 @@ let _WINDOW = {}; let _DOCUMENT = {}; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -1262,154 +1403,245 @@ const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function'; const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); - var a = "classic", - r = "sharp", - o = "sharp-duotone"; - - var et$1 = { - classic: { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - sharp: { - 900: "fass", - 400: "fasr", - 300: "fasl", - 100: "fast" - }, - "sharp-duotone": { - 900: "fasds" - } - }; - var bt = { - kit: { - fak: "kit", - "fa-kit": "kit" - }, - "kit-duotone": { - fakd: "kit-duotone", - "fa-kit-duotone": "kit-duotone" - } - }; - var lo = { - classic: { - "fa-brands": "fab", - "fa-duotone": "fad", - "fa-light": "fal", - "fa-regular": "far", - "fa-solid": "fas", - "fa-thin": "fat" - }, - sharp: { - "fa-solid": "fass", - "fa-regular": "fasr", - "fa-light": "fasl", - "fa-thin": "fast" - }, - "sharp-duotone": { - "fa-solid": "fasds" - } - }, - no = { - classic: { - fab: "fa-brands", - fad: "fa-duotone", - fal: "fa-light", - far: "fa-regular", - fas: "fa-solid", - fat: "fa-thin" - }, - sharp: { - fass: "fa-solid", - fasr: "fa-regular", - fasl: "fa-light", - fast: "fa-thin" - }, - "sharp-duotone": { - fasds: "fa-solid" - } - }, - fo = { - classic: { - solid: "fas", - regular: "far", - light: "fal", - thin: "fat", - duotone: "fad", - brands: "fab" - }, - sharp: { - solid: "fass", - regular: "fasr", - light: "fasl", - thin: "fast" - }, - "sharp-duotone": { - solid: "fasds" - } - }, - ho = { - classic: { - fa: "solid", - fas: "solid", - "fa-solid": "solid", - far: "regular", - "fa-regular": "regular", - fal: "light", - "fa-light": "light", - fat: "thin", - "fa-thin": "thin", - fad: "duotone", - "fa-duotone": "duotone", - fab: "brands", - "fa-brands": "brands" - }, - sharp: { - fa: "solid", - fass: "solid", - "fa-solid": "solid", - fasr: "regular", - "fa-regular": "regular", - fasl: "light", - "fa-light": "light", - fast: "thin", - "fa-thin": "thin" - }, - "sharp-duotone": { - fa: "solid", - fasds: "solid", - "fa-solid": "solid" + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); } - }; - var Io = { + return e; + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + + var S = { + classic: { + fa: "solid", + fas: "solid", + "fa-solid": "solid", + far: "regular", + "fa-regular": "regular", + fal: "light", + "fa-light": "light", + fat: "thin", + "fa-thin": "thin", + fab: "brands", + "fa-brands": "brands" + }, + duotone: { + fa: "solid", + fad: "solid", + "fa-solid": "solid", + "fa-duotone": "solid", + fadr: "regular", + "fa-regular": "regular", + fadl: "light", + "fa-light": "light", + fadt: "thin", + "fa-thin": "thin" + }, + sharp: { + fa: "solid", + fass: "solid", + "fa-solid": "solid", + fasr: "regular", + "fa-regular": "regular", + fasl: "light", + "fa-light": "light", + fast: "thin", + "fa-thin": "thin" + }, + "sharp-duotone": { + fa: "solid", + fasds: "solid", + "fa-solid": "solid", + fasdr: "regular", + "fa-regular": "regular", + fasdl: "light", + "fa-light": "light", + fasdt: "thin", + "fa-thin": "thin" + } + }; + var s = "classic"; + var G = { + classic: { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + duotone: { + 900: "fad", + 400: "fadr", + 300: "fadl", + 100: "fadt" + }, + sharp: { + 900: "fass", + 400: "fasr", + 300: "fasl", + 100: "fast" + }, + "sharp-duotone": { + 900: "fasds", + 400: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var xt = { + classic: { + solid: "fas", + regular: "far", + light: "fal", + thin: "fat", + brands: "fab" + }, + duotone: { + solid: "fad", + regular: "fadr", + light: "fadl", + thin: "fadt" + }, + sharp: { + solid: "fass", + regular: "fasr", + light: "fasl", + thin: "fast" + }, + "sharp-duotone": { + solid: "fasds", + regular: "fasdr", + light: "fasdl", + thin: "fasdt" + } + }; + var St = { + kit: { + fak: "kit", + "fa-kit": "kit" + }, + "kit-duotone": { + fakd: "kit-duotone", + "fa-kit-duotone": "kit-duotone" + } + }; + var Ct = { kit: { "fa-kit": "fak" }, "kit-duotone": { "fa-kit-duotone": "fakd" } - }, - Fo = { - kit: { - fak: "fa-kit" - }, - "kit-duotone": { - fakd: "fa-kit-duotone" - } - }, - So = { - kit: { - kit: "fak" - }, - "kit-duotone": { - "kit-duotone": "fakd" - } }; + var Wt = { + kit: { + fak: "fa-kit" + }, + "kit-duotone": { + fakd: "fa-kit-duotone" + } + }; + var Et = { + kit: { + kit: "fak" + }, + "kit-duotone": { + "kit-duotone": "fakd" + } + }; - const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; + var po = { + classic: { + "fa-brands": "fab", + "fa-duotone": "fad", + "fa-light": "fal", + "fa-regular": "far", + "fa-solid": "fas", + "fa-thin": "fat" + }, + duotone: { + "fa-regular": "fadr", + "fa-light": "fadl", + "fa-thin": "fadt" + }, + sharp: { + "fa-solid": "fass", + "fa-regular": "fasr", + "fa-light": "fasl", + "fa-thin": "fast" + }, + "sharp-duotone": { + "fa-solid": "fasds", + "fa-regular": "fasdr", + "fa-light": "fasdl", + "fa-thin": "fasdt" + } + }, + co = { + classic: { + fab: "fa-brands", + fad: "fa-duotone", + fal: "fa-light", + far: "fa-regular", + fas: "fa-solid", + fat: "fa-thin" + }, + duotone: { + fadr: "fa-regular", + fadl: "fa-light", + fadt: "fa-thin" + }, + sharp: { + fass: "fa-solid", + fasr: "fa-regular", + fasl: "fa-light", + fast: "fa-thin" + }, + "sharp-duotone": { + fasds: "fa-solid", + fasdr: "fa-regular", + fasdl: "fa-light", + fasdt: "fa-thin" + } + }; + + const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; const PRODUCTION = (() => { try { return "production" === 'production'; @@ -1417,57 +1649,45 @@ return false; } })(); - function familyProxy(obj) { // Defaults to the classic family if family is not available return new Proxy(obj, { get(target, prop) { - return prop in target ? target[prop] : target[a]; + return prop in target ? target[prop] : target[s]; } - }); } - - const _PREFIX_TO_STYLE = { ...ho - }; - _PREFIX_TO_STYLE[a] = { ...ho[a], - ...bt['kit'], - ...bt['kit-duotone'] - }; + const _PREFIX_TO_STYLE = _objectSpread2({}, S); + + // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding + // {'fa-duotone': 'duotone'} + _PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + 'fa-duotone': 'duotone' + }), S[s]), St['kit']), St['kit-duotone']); const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE); - const _STYLE_TO_PREFIX = { ...fo - }; - _STYLE_TO_PREFIX[a] = { ..._STYLE_TO_PREFIX[a], - ...So['kit'], - ...So['kit-duotone'] - }; + const _STYLE_TO_PREFIX = _objectSpread2({}, xt); + + // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'} + _STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + duotone: 'fad' + }), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']); const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX); - const _PREFIX_TO_LONG_STYLE = { ...no - }; - _PREFIX_TO_LONG_STYLE[a] = { ..._PREFIX_TO_LONG_STYLE[a], - ...Fo['kit'] - }; + const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, co); + _PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']); const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE); - const _LONG_STYLE_TO_PREFIX = { ...lo - }; - _LONG_STYLE_TO_PREFIX[a] = { ..._LONG_STYLE_TO_PREFIX[a], - ...Io['kit'] - }; + const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, po); + _LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']); const LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX); - const _FONT_WEIGHT_TO_PREFIX = { ...et$1 - }; + const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G); const FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX); - const prefixes = new Set(); - Object.keys(STYLE_TO_PREFIX[a]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[r]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[o]).map(prefixes.add.bind(prefixes)); function bunker(fn) { try { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - fn(...args); } catch (e) { if (!PRODUCTION) { @@ -1476,50 +1696,43 @@ } } - const w$1 = WINDOW || {}; - if (!w$1[NAMESPACE_IDENTIFIER]) w$1[NAMESPACE_IDENTIFIER] = {}; - if (!w$1[NAMESPACE_IDENTIFIER].styles) w$1[NAMESPACE_IDENTIFIER].styles = {}; - if (!w$1[NAMESPACE_IDENTIFIER].hooks) w$1[NAMESPACE_IDENTIFIER].hooks = {}; - if (!w$1[NAMESPACE_IDENTIFIER].shims) w$1[NAMESPACE_IDENTIFIER].shims = []; - var namespace = w$1[NAMESPACE_IDENTIFIER]; + const w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; function normalizeIcons(icons) { return Object.keys(icons).reduce((acc, iconName) => { const icon = icons[iconName]; const expanded = !!icon.icon; - if (expanded) { acc[icon.iconName] = icon.icon; } else { acc[iconName] = icon; } - return acc; }, {}); } - function defineIcons(prefix, icons) { let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { skipHooks = false } = params; const normalized = normalizeIcons(icons); - if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { namespace.hooks.addPack(prefix, normalizeIcons(icons)); } else { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...normalized - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized); } + /** * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction * of new styles we needed to differentiate between them. Prefix `fa` is now an alias * for `fas` so we'll ease the upgrade process for our users by automatically defining * this as well. */ - - if (prefix === 'fas') { defineIcons('fa', icons); } @@ -1959,6 +2172,7 @@ "square-nfi": [448, 512, [], "e576", "M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm75.7 64.6C68.8 162.5 64 168.8 64 176l0 160c0 8.8 7.2 16 16 16s16-7.2 16-16l0-102.2 66.3 110.5c3.7 6.2 11.1 9.1 18 7.2s11.7-8.2 11.7-15.4l0-160c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 102.2L93.7 167.8c-3.7-6.2-11.1-9.1-18-7.2zM224 176l0 64 0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-80 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-32 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zm160 0c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 160c0 8.8 7.2 16 16 16s16-7.2 16-16l0-160z"], "arrow-up-from-ground-water": [576, 512, [], "e4b5", "M288 352c17.7 0 32-14.3 32-32l0-210.7 25.4 25.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-80-80c-12.5-12.5-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L256 109.3 256 320c0 17.7 14.3 32 32 32zm-18.5 69.9C247 437.4 219.5 448 192 448c-26.9 0-55.3-10.8-77.4-26.1c0 0 0 0 0 0c-11.9-8.5-28.1-7.8-39.2 1.7c-14.4 11.9-32.5 21-50.6 25.2c-17.2 4-27.9 21.2-23.9 38.4s21.2 27.9 38.4 23.9c24.5-5.7 44.9-16.5 58.2-25C126.5 501.7 159 512 192 512c31.9 0 60.6-9.9 80.4-18.9c5.8-2.7 11.1-5.3 15.6-7.7c4.5 2.4 9.7 5.1 15.6 7.7c19.8 9 48.5 18.9 80.4 18.9c33 0 65.5-10.3 94.5-25.8c13.4 8.4 33.7 19.3 58.2 25c17.2 4 34.4-6.7 38.4-23.9s-6.7-34.4-23.9-38.4c-18.1-4.2-36.2-13.3-50.6-25.2c-11.1-9.4-27.3-10.1-39.2-1.7c0 0 0 0 0 0C439.4 437.2 410.9 448 384 448c-27.5 0-55-10.6-77.5-26.1c-11.1-7.9-25.9-7.9-37 0zM192 192L48 192c-26.5 0-48 21.5-48 48L0 425c5.3-3.1 11.2-5.4 17.5-6.9c13.1-3.1 26.7-9.8 37.3-18.6c22.2-18.7 54.3-20.1 78.1-3.4c18 12.4 40.1 20.3 59.1 20.3L192 192zm384 48c0-26.5-21.5-48-48-48l-144 0 0 224.5s0 0 0 0c19 0 41.2-7.9 59.2-20.3c23.8-16.7 55.8-15.4 78.1 3.4c10.6 8.8 24.2 15.6 37.3 18.6c6.3 1.5 12.1 3.8 17.5 6.9l0-185z"], "martini-glass": [512, 512, [127864, "glass-martini-alt"], "f57b", "M32 0C19.1 0 7.4 7.8 2.4 19.8s-2.2 25.7 6.9 34.9L224 269.3 224 448l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-178.7L502.6 54.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 0 480 0L32 0zM173.3 128l-64-64 293.5 0-64 64-165.5 0z"], + "square-binary": [448, 512, [], "e69b", "M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm144 4c-24.3 0-44 19.7-44 44l0 48c0 24.3 19.7 44 44 44l32 0c24.3 0 44-19.7 44-44l0-48c0-24.3-19.7-44-44-44l-32 0zm-4 44c0-2.2 1.8-4 4-4l32 0c2.2 0 4 1.8 4 4l0 48c0 2.2-1.8 4-4 4l-32 0c-2.2 0-4-1.8-4-4l0-48zm140-44c-11 0-20 9-20 20c0 9.7 6.9 17.7 16 19.6l0 76.4c0 11 9 20 20 20s20-9 20-20l0-96c0-11-9-20-20-20l-16 0zM132 296c0 9.7 6.9 17.7 16 19.6l0 76.4c0 11 9 20 20 20s20-9 20-20l0-96c0-11-9-20-20-20l-16 0c-11 0-20 9-20 20zm96 24l0 48c0 24.3 19.7 44 44 44l32 0c24.3 0 44-19.7 44-44l0-48c0-24.3-19.7-44-44-44l-32 0c-24.3 0-44 19.7-44 44zm44-4l32 0c2.2 0 4 1.8 4 4l0 48c0 2.2-1.8 4-4 4l-32 0c-2.2 0-4-1.8-4-4l0-48c0-2.2 1.8-4 4-4z"], "rotate-left": [512, 512, ["rotate-back", "rotate-backward", "undo-alt"], "f2ea", "M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"], "table-columns": [512, 512, ["columns"], "f0db", "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 64l0 256 160 0 0-256L64 160zm384 0l-160 0 0 256 160 0 0-256z"], "lemon": [448, 512, [127819], "f094", "M448 96c0-35.3-28.7-64-64-64c-6.6 0-13 1-19 2.9c-22.5 7-48.1 14.9-71 9c-75.2-19.1-156.4 11-213.7 68.3S-7.2 250.8 11.9 326c5.8 22.9-2 48.4-9 71C1 403 0 409.4 0 416c0 35.3 28.7 64 64 64c6.6 0 13-1 19.1-2.9c22.5-7 48.1-14.9 71-9c75.2 19.1 156.4-11 213.7-68.3s87.5-138.5 68.3-213.7c-5.8-22.9 2-48.4 9-71c1.9-6 2.9-12.4 2.9-19.1zM212.5 127.4c-54.6 16-101.1 62.5-117.1 117.1C92.9 253 84 257.8 75.5 255.4S62.2 244 64.6 235.5c19.1-65.1 73.7-119.8 138.9-138.9c8.5-2.5 17.4 2.4 19.9 10.9s-2.4 17.4-10.9 19.9z"], @@ -2258,6 +2472,7 @@ "diamond": [512, 512, [9830], "f219", "M284.3 11.7c-15.6-15.6-40.9-15.6-56.6 0l-216 216c-15.6 15.6-15.6 40.9 0 56.6l216 216c15.6 15.6 40.9 15.6 56.6 0l216-216c15.6-15.6 15.6-40.9 0-56.6l-216-216z"], "face-grin-squint": [512, 512, [128518, "grin-squint"], "f585", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM388.1 312.8c12.3-3.8 24.3 6.9 19.3 18.7C382.4 390.6 324.2 432 256.3 432s-126.2-41.4-151.1-100.5c-5-11.8 7-22.5 19.3-18.7c39.7 12.2 84.5 19 131.8 19s92.1-6.8 131.8-19zM133.5 146.7l89.9 47.9c10.7 5.7 10.7 21.1 0 26.8l-89.9 47.9c-7.9 4.2-17.5-1.5-17.5-10.5c0-2.8 1-5.5 2.8-7.6l36-43.2-36-43.2c-1.8-2.1-2.8-4.8-2.8-7.6c0-9 9.6-14.7 17.5-10.5zM396 157.1c0 2.8-1 5.5-2.8 7.6l-36 43.2 36 43.2c1.8 2.1 2.8 4.8 2.8 7.6c0 9-9.6 14.7-17.5 10.5l-89.9-47.9c-10.7-5.7-10.7-21.1 0-26.8l89.9-47.9c7.9-4.2 17.5 1.5 17.5 10.5z"], "hand-holding-dollar": [576, 512, ["hand-holding-usd"], "f4c0", "M312 24l0 10.5c6.4 1.2 12.6 2.7 18.2 4.2c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17c-10.9-2.9-21.1-4.9-30.2-5c-7.3-.1-14.7 1.7-19.4 4.4c-2.1 1.3-3.1 2.4-3.5 3c-.3 .5-.7 1.2-.7 2.8c0 .3 0 .5 0 .6c.2 .2 .9 1.2 3.3 2.6c5.8 3.5 14.4 6.2 27.4 10.1l.9 .3s0 0 0 0c11.1 3.3 25.9 7.8 37.9 15.3c13.7 8.6 26.1 22.9 26.4 44.9c.3 22.5-11.4 38.9-26.7 48.5c-6.7 4.1-13.9 7-21.3 8.8l0 10.6c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-11.4c-9.5-2.3-18.2-5.3-25.6-7.8c-2.1-.7-4.1-1.4-6-2c-12.6-4.2-19.4-17.8-15.2-30.4s17.8-19.4 30.4-15.2c2.6 .9 5 1.7 7.3 2.5c13.6 4.6 23.4 7.9 33.9 8.3c8 .3 15.1-1.6 19.2-4.1c1.9-1.2 2.8-2.2 3.2-2.9c.4-.6 .9-1.8 .8-4.1l0-.2c0-1 0-2.1-4-4.6c-5.7-3.6-14.3-6.4-27.1-10.3l-1.9-.6c-10.8-3.2-25-7.5-36.4-14.4c-13.5-8.1-26.5-22-26.6-44.1c-.1-22.9 12.9-38.6 27.7-47.4c6.4-3.8 13.3-6.4 20.2-8.2L264 24c0-13.3 10.7-24 24-24s24 10.7 24 24zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z"], + "chart-diagram": [512, 512, [], "e695", "M80 32C53.5 32 32 53.5 32 80s21.5 48 48 48l152 0 0 40-48 48-56 0c-48.6 0-88 39.4-88 88l0 48-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-48c0-22.1 17.9-40 40-40l56 0 48 48 0 40-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-40 48-48 56 0c22.1 0 40 17.9 40 40l0 48-8 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-8 0 0-48c0-48.6-39.4-88-88-88l-56 0-48-48 0-40 152 0c26.5 0 48-21.5 48-48s-21.5-48-48-48L80 32z"], "bacterium": [512, 512, [], "e05a", "M423.1 30.6c3.6-12.7-3.7-26-16.5-29.7s-26 3.7-29.7 16.5l-4.2 14.7c-9.8-.4-19.9 .5-29.9 2.8c-12.1 2.8-23.7 5.9-34.9 9.4l-5.9-13.7c-5.2-12.2-19.3-17.8-31.5-12.6s-17.8 19.3-12.6 31.5l4.9 11.3c-22 9.4-42 20.1-60.2 31.8L196 82.7c-7.4-11-22.3-14-33.3-6.7s-14 22.3-6.7 33.3l7.8 11.6c-18 15-33.7 30.8-47.3 47.1L103 157.3c-10.4-8.3-25.5-6.6-33.7 3.7s-6.6 25.5 3.7 33.7l15 12c-2.1 3.2-4.1 6.5-6 9.7c-9.4 15.7-17 31-23.2 45.3l-9.9-3.9c-12.3-4.9-26.3 1.1-31.2 13.4s1.1 26.3 13.4 31.2l11.6 4.6c-.3 1.1-.6 2.1-.9 3.1c-3.5 12.5-5.7 23.2-7.1 31.3c-.7 4.1-1.2 7.5-1.6 10.3c-.2 1.4-.3 2.6-.4 3.6l-.1 1.4-.1 .6 0 .3 0 .1c0 0 0 .1 39.2 3.7c0 0 0 0 0 0l-39.2-3.6c-.5 5-.6 10-.4 14.9l-14.7 4.2C4.7 380.6-2.7 393.8 .9 406.6s16.9 20.1 29.7 16.5l13.8-3.9c10.6 20.7 27.6 37.8 48.5 48.5l-3.9 13.7c-3.6 12.7 3.7 26 16.5 29.7s26-3.7 29.7-16.5l4.2-14.7c23.8 1 46.3-5.5 65.1-17.6L215 473c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-10.6-10.6c9.1-14.1 15.1-30.5 17-48.3l.1-.8c.3-1.7 1-5.1 2.3-9.8l.2-.8 12.6 5.4c12.2 5.2 26.3-.4 31.5-12.6s-.4-26.3-12.6-31.5l-11.3-4.8c9.9-14.9 24.9-31.6 48.6-46l2.1 7.5c3.6 12.7 16.9 20.1 29.7 16.5s20.1-16.9 16.5-29.7L371 259.2c6.9-2.2 14.3-4.3 22.2-6.1c12.9-3 24.7-8 35.2-14.8L439 249c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-10.6-10.6c12.2-19 18.6-41.6 17.6-65.1l14.7-4.2c12.7-3.6 20.1-16.9 16.5-29.7s-16.9-20.1-29.7-16.5l-13.7 3.9c-10.8-21.2-28-38-48.5-48.5l3.9-13.8zM92.1 363.3s0 0 0 0L144 368l-51.9-4.7zM112 320a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM240 184a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"], "hand-pointer": [448, 512, [], "f25a", "M128 40c0-22.1 17.9-40 40-40s40 17.9 40 40l0 148.2c8.5-7.6 19.7-12.2 32-12.2c20.6 0 38.2 13 45 31.2c8.8-9.3 21.2-15.2 35-15.2c25.3 0 46 19.5 47.9 44.3c8.5-7.7 19.8-12.3 32.1-12.3c26.5 0 48 21.5 48 48l0 48 0 16 0 48c0 70.7-57.3 128-128 128l-16 0-64 0-.1 0-5.2 0c-5 0-9.9-.3-14.7-1c-55.3-5.6-106.2-34-140-79L8 336c-13.3-17.7-9.7-42.7 8-56s42.7-9.7 56 8l56 74.7L128 40zM240 304c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96zm48-16c-8.8 0-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 96c0 8.8 7.2 16 16 16s16-7.2 16-16l0-96z"], "drum-steelpan": [576, 512, [], "f56a", "M288 32c159.1 0 288 48 288 128l0 192c0 80-128.9 128-288 128S0 432 0 352L0 160C0 80 128.9 32 288 32zM528 160c0-9.9-8-29.9-55-49.8c-18.6-7.9-40.9-14.4-66-19.4l-27.8 43.6c-7.3 11.5-11.2 24.8-11.2 38.4c0 17.5 6.4 34.4 18.1 47.5l9.8 11c29.8-5.2 55.9-12.5 77.2-21.5c47.1-19.9 55-39.9 55-49.8zM349.2 237.3c-8-26.2-32.4-45.3-61.2-45.3s-53.3 19.1-61.2 45.3c19.4 1.7 39.9 2.7 61.2 2.7s41.8-.9 61.2-2.7zM169 90.8c-25.2 5-47.4 11.6-66 19.4C56 130.1 48 150.1 48 160s8 29.9 55 49.8c21.3 9 47.4 16.3 77.2 21.5l9.8-11c11.6-13.1 18.1-30 18.1-47.5c0-13.6-3.9-26.9-11.2-38.4L169 90.8zm56.3-8C224.5 87 224 91.5 224 96c0 35.3 28.7 64 64 64s64-28.7 64-64c0-4.5-.5-9-1.4-13.2C330.8 81 309.8 80 288 80s-42.8 1-62.6 2.8z"], @@ -2282,6 +2497,7 @@ "shield-virus": [512, 512, [], "e06c", "M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM256 112c8.8 0 16 7.2 16 16c0 33 39.9 49.5 63.2 26.2c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6C334.5 200.1 351 240 384 240c8.8 0 16 7.2 16 16s-7.2 16-16 16c-33 0-49.5 39.9-26.2 63.2c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0C311.9 334.5 272 351 272 384c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-33-39.9-49.5-63.2-26.2c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6C177.5 311.9 161 272 128 272c-8.8 0-16-7.2-16-16s7.2-16 16-16c33 0 49.5-39.9 26.2-63.2c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0C200.1 177.5 240 161 240 128c0-8.8 7.2-16 16-16zM232 256a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm72 32a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z"], "dice-six": [448, 512, [9861], "f526", "M0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm160 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 192a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM320 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"], "mosquito-net": [640, 512, [], "e52c", "M168.8 462.3c-7.9-4-11.1-13.6-7.2-21.5L192 380.2l0-44.2c0-4.2 1.7-8.3 4.7-11.3L256 265.4l0-23.1L139.2 344C87.8 395.3 0 358.9 0 286.3c0-41.1 30.6-75.8 71.4-80.9l159.9-23.9-49.6-41.3c-5.1-4.2-7-11.1-4.9-17.4l13.9-41.7-29-58.1c-4-7.9-.7-17.5 7.2-21.5s17.5-.7 21.5 7.2l32 64c1.9 3.8 2.2 8.2 .9 12.2l-12.5 37.6L256 160.5l0-22.6c0-14.9 10.1-27.3 23.8-31l0-43.3c0-4.5 3.7-8.2 8.2-8.2s8.2 3.7 8.2 8.2l0 43.3c13.7 3.6 23.8 16.1 23.8 31l0 22.6 45.4-37.8L352.8 85.1c-1.3-4-1-8.4 .9-12.2l32-64c4-7.9 13.6-11.1 21.5-7.2s11.1 13.6 7.2 21.5l-29 58.1 13.9 41.7c2.1 6.2 .1 13.1-4.9 17.4l-49.6 41.3 159.9 23.9c22.5 2.8 41.8 14.6 54.7 31.4c-2.7 2.6-5.2 5.4-7.3 8.6c-8.6-12.9-23.3-21.5-40-21.5s-31.4 8.5-40 21.5c-8.6-12.9-23.3-21.5-40-21.5c-21.7 0-40 14.3-45.9 34.1c-10.7 3.2-19.8 10.1-25.9 19.2l-40.2-35 0 23.1 32.4 32.4c-.3 2-.4 4.1-.4 6.2c0 16.7 8.5 31.4 21.5 40c-4 2.6-7.5 5.9-10.6 9.5L320 310.6l0 50c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-50-32 32 0 41.4c0 2.5-.6 4.9-1.7 7.2l-32 64c-4 7.9-13.6 11.1-21.5 7.2zM512 256c8.8 0 16 7.2 16 16l0 16 48 0 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 16 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 48 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 48 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-48 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-48 0 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-16-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-48-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-48-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l16 0 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 16 48 0 0-16c0-8.8 7.2-16 16-16zm16 112l48 0 0-48-48 0 0 48zm0 80l48 0 0-48-48 0 0 48zM448 320l0 48 48 0 0-48-48 0zm0 80l0 48 48 0 0-48-48 0z"], + "file-fragment": [384, 512, [], "e697", "M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64l-128 0 0-128c0-35.3-28.7-64-64-64L0 320 0 64zm384 64l-128 0L256 0 384 128zM32 352l96 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32z"], "bridge-water": [576, 512, [], "e4ce", "M0 96C0 78.3 14.3 64 32 64l512 0c17.7 0 32 14.3 32 32l0 35.6c0 15.7-12.7 28.4-28.4 28.4c-37.3 0-67.6 30.2-67.6 67.6l0 124.9c-12.9 0-25.8 3.9-36.8 11.7c-18 12.4-40.1 20.3-59.2 20.3c0 0 0 0 0 0l0-.5 0-128c0-53-43-96-96-96s-96 43-96 96l0 128 0 .5c-19 0-41.2-7.9-59.1-20.3c-11.1-7.8-24-11.7-36.9-11.7l0-124.9C96 190.2 65.8 160 28.4 160C12.7 160 0 147.3 0 131.6L0 96zM306.5 389.9C329 405.4 356.5 416 384 416c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 469.7 417 480 384 480c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 405.2 165.1 416 192 416c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"], "person-booth": [576, 512, [], "f756", "M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160 64 0 0-160zm320 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-448zM224 512c17.7 0 32-14.3 32-32l0-160-64 0 0 160c0 17.7 14.3 32 32 32zM320 0c-9.3 0-18.1 4-24.2 11s-8.8 16.3-7.5 25.5l31.2 218.6L288.6 409.7c-3.5 17.3 7.8 34.2 25.1 37.7s34.2-7.8 37.7-25.1l.7-3.6c1.3 16.4 15.1 29.4 31.9 29.4c17.7 0 32-14.3 32-32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384c0-17.7-14.3-32-32-32L320 0zM112 80A48 48 0 1 0 16 80a48 48 0 1 0 96 0zm0 261.3l0-72.1 4.7 4.7c9 9 21.2 14.1 33.9 14.1l73.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-66.7 0-41.6-41.6c-14.3-14.3-33.8-22.4-54-22.4C27.6 160 0 187.6 0 221.6l0 55.7 0 .9L0 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 42.7L96 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-58.7c0-10.4-3.4-20.5-9.6-28.8L112 341.3z"], "text-width": [448, 512, [], "f035", "M64 128l0-32 128 0 0 128-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-128 128 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L224 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-32 192 0 0 32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 32-192 0 0-32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64z"], @@ -2410,6 +2626,7 @@ "plug-circle-plus": [576, 512, [], "e55f", "M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208l0 48 48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 0-48c0-8.8 7.2-16 16-16s16 7.2 16 16z"], "place-of-worship": [640, 512, [], "f67f", "M224 109.3l0 108.3L183.3 242c-14.5 8.7-23.3 24.3-23.3 41.2L160 512l96 0 0-96c0-35.3 28.7-64 64-64s64 28.7 64 64l0 96 96 0 0-228.8c0-16.9-8.8-32.5-23.3-41.2L416 217.6l0-108.3c0-8.5-3.4-16.6-9.4-22.6L331.3 11.3c-6.2-6.2-16.4-6.2-22.6 0L233.4 86.6c-6 6-9.4 14.1-9.4 22.6zM24.9 330.3C9.5 338.8 0 354.9 0 372.4L0 464c0 26.5 21.5 48 48 48l80 0 0-238.4L24.9 330.3zM592 512c26.5 0 48-21.5 48-48l0-91.6c0-17.5-9.5-33.6-24.9-42.1L512 273.6 512 512l80 0z"], "grip-vertical": [320, 512, [], "f58e", "M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"], + "hexagon-nodes": [448, 512, [], "e699", "M248 106.6c18.9-9 32-28.3 32-50.6c0-30.9-25.1-56-56-56s-56 25.1-56 56c0 22.3 13.1 41.6 32 50.6l0 98.8c-2.8 1.3-5.5 2.9-8 4.7l-80.1-45.8c1.6-20.8-8.6-41.6-27.9-52.8C57.2 96 23 105.2 7.5 132S1.2 193 28 208.5c1.3 .8 2.6 1.5 4 2.1l0 90.8c-1.3 .6-2.7 1.3-4 2.1C1.2 319-8 353.2 7.5 380S57.2 416 84 400.5c19.3-11.1 29.4-32 27.8-52.8l50.5-28.9c-11.5-11.2-19.9-25.6-23.8-41.7L88 306.1c-2.6-1.8-5.2-3.3-8-4.7l0-90.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-.1 1.4-.2 2.8-.2 4.3c0 22.3 13.1 41.6 32 50.6l0 98.8c-18.9 9-32 28.3-32 50.6c0 30.9 25.1 56 56 56s56-25.1 56-56c0-22.3-13.1-41.6-32-50.6l0-98.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-1.6 20.8 8.6 41.6 27.8 52.8c26.8 15.5 61 6.3 76.5-20.5s6.3-61-20.5-76.5c-1.3-.8-2.7-1.5-4-2.1l0-90.8c1.4-.6 2.7-1.3 4-2.1c26.8-15.5 36-49.7 20.5-76.5S390.8 96 364 111.5c-19.3 11.1-29.4 32-27.8 52.8l-50.6 28.9c11.5 11.2 19.9 25.6 23.8 41.7L360 205.9c2.6 1.8 5.2 3.3 8 4.7l0 90.8c-2.8 1.3-5.5 2.9-8 4.6l-80.1-45.8c.1-1.4 .2-2.8 .2-4.3c0-22.3-13.1-41.6-32-50.6l0-98.8z"], "arrow-turn-up": [384, 512, ["level-up"], "f148", "M32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c53 0 96-43 96-96l0-306.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 416c0 17.7-14.3 32-32 32l-96 0z"], "u": [384, 512, [117], "55", "M32 32c17.7 0 32 14.3 32 32l0 224c0 70.7 57.3 128 128 128s128-57.3 128-128l0-224c0-17.7 14.3-32 32-32s32 14.3 32 32l0 224c0 106-86 192-192 192S0 394 0 288L0 64C0 46.3 14.3 32 32 32z"], "square-root-variable": [576, 512, ["square-root-alt"], "f698", "M282.6 78.1c8-27.3 33-46.1 61.4-46.1l200 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L344 96 238.7 457c-3.6 12.3-14.1 21.2-26.8 22.8s-25.1-4.6-31.5-15.6L77.6 288 32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l45.6 0c22.8 0 43.8 12.1 55.3 31.8l65.2 111.8L282.6 78.1zM393.4 233.4c12.5-12.5 32.8-12.5 45.3 0L480 274.7l41.4-41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L525.3 320l41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L480 365.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L434.7 320l-41.4-41.4c-12.5-12.5-12.5-32.8 0-45.3z"], @@ -2675,6 +2892,7 @@ "rocket": [512, 512, [], "f135", "M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2l0 82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9l0-107.2c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"], "photo-film": [640, 512, ["photo-video"], "f87c", "M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"], "folder-minus": [512, 512, [], "f65d", "M448 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64zM184 272c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"], + "hexagon-nodes-bolt": [576, 512, [], "e69a", "M248 106.6c18.9-9 32-28.3 32-50.6c0-30.9-25.1-56-56-56s-56 25.1-56 56c0 22.3 13.1 41.6 32 50.6l0 98.8c-2.8 1.3-5.5 2.9-8 4.7l-80.1-45.8c1.6-20.8-8.6-41.6-27.9-52.8C57.2 96 23 105.2 7.5 132S1.2 193 28 208.5c1.3 .8 2.6 1.5 4 2.1l0 90.8c-1.3 .6-2.7 1.3-4 2.1C1.2 319-8 353.2 7.5 380S57.2 416 84 400.5c19.3-11.1 29.4-32 27.8-52.8l50.5-28.9c-11.5-11.2-19.9-25.6-23.8-41.7L88 306.1c-2.6-1.8-5.2-3.3-8-4.7l0-90.8c2.8-1.3 5.5-2.9 8-4.7l80.1 45.8c-.1 1.4-.2 2.8-.2 4.3c0 22.3 13.1 41.6 32 50.6l0 98.8c-18.9 9-32 28.3-32 50.6c0 30.9 25.1 56 56 56c30.7 0 55.6-24.7 56-55.2c-7.5-12.9-13.5-26.8-17.6-41.5c-4.2-4-9.1-7.3-14.4-9.9l0-98.8c2.8-1.3 5.5-2.9 8-4.7l10.5 6c5.5-15.3 13.1-29.5 22.4-42.5l-9.1-5.2c.1-1.4 .2-2.8 .2-4.3c0-22.3-13.1-41.6-32-50.6l0-98.8zM440.5 132C425 105.2 390.8 96 364 111.5c-19.3 11.1-29.4 32-27.8 52.8l-50.6 28.9c11.5 11.2 19.9 25.6 23.8 41.7L360 205.9c.4 .3 .8 .6 1.3 .9c21.7-9.5 45.6-14.8 70.8-14.8c2 0 4 0 5.9 .1c12.1-17.3 13.8-40.6 2.6-60.1zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm47.9-225c4.3 3.7 5.4 9.9 2.6 14.9L452.4 356l35.6 0c5.2 0 9.8 3.3 11.4 8.2s-.1 10.3-4.2 13.4l-96 72c-4.5 3.4-10.8 3.2-15.1-.6s-5.4-9.9-2.6-14.9L411.6 380 376 380c-5.2 0-9.8-3.3-11.4-8.2s.1-10.3 4.2-13.4l96-72c4.5-3.4 10.8-3.2 15.1 .6z"], "store": [576, 512, [], "f54e", "M547.6 103.8L490.3 13.1C485.2 5 476.1 0 466.4 0L109.6 0C99.9 0 90.8 5 85.7 13.1L28.3 103.8c-29.6 46.8-3.4 111.9 51.9 119.4c4 .5 8.1 .8 12.1 .8c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4zM499.7 254.9c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3L448 384l-320 0 0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L64 384l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64 0-131.4c-4 1-8 1.8-12.3 2.3z"], "arrow-trend-up": [576, 512, [], "e098", "M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"], "plug-circle-minus": [576, 512, [], "e55e", "M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32L32 160zM576 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-64 0c0 8.8-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l128 0c8.8 0 16 7.2 16 16z"], @@ -2741,6 +2959,7 @@ "file-export": [576, 512, ["arrow-right-from-file"], "f56e", "M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 128-168 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0 0 112c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM384 336l0-48 110.1 0-39-39c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9l-80 80c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l39-39L384 336zm0-208l-128 0L256 0 384 128z"], "shield": [512, 512, [128737, "shield-blank"], "f132", "M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0z"], "arrow-up-short-wide": [576, 512, ["sort-amount-up-alt"], "f885", "M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"], + "comment-nodes": [640, 512, [], "e696", "M256 448c10.8 0 21.5-.5 32-1.6c.3-15.8 4.4-31.7 12.9-46.4c16-27.7 43.7-44.4 73.2-47.5l16.7-29.2c-4.3-11-6.7-22.9-6.7-35.4c0-53 43-96 96-96c9.1 0 17.8 1.3 26.2 3.6C481.1 102.1 378.6 32 256 32C114.6 32 0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.2 .3-.4 .5-.6 .7c-.3 .3-.5 .5-.6 .7l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zm72.6-32c-17.7 30.6-7.2 69.7 23.4 87.4s69.7 7.2 87.4-23.4c1.5-2.6 2.8-5.3 3.9-8l73.3 0c1.1 2.7 2.4 5.4 3.9 8c17.7 30.6 56.8 41.1 87.4 23.4s41.1-56.8 23.4-87.4c-13.4-23.2-39.1-34.8-64-31.4l-17.6-30.7c-11 11.7-25 20.6-40.6 25.6l16.5 28.9c-3.8 4.8-6.8 10-9 15.6l-73.4 0c-2.2-5.6-5.3-10.8-9-15.6l33-57.7c4.1 .8 8.4 1.3 12.8 1.3c35.3 0 64-28.7 64-64s-28.7-64-64-64s-64 28.7-64 64c0 13.4 4.1 25.8 11.2 36.1l-34.6 60.5c-25-3.4-50.6 8.3-64 31.4z"], "house-medical": [576, 512, [], "e3b2", "M543.8 287.6c17 0 32-14 32-32.1c1-9-3-17-11-24L309.5 7c-6-5-14-7-21-7s-15 1-22 8L10 231.5c-7 7-10 15-10 24c0 18 14 32.1 32 32.1l32 0 0 160.4c0 35.3 28.7 64 64 64l320.4 0c35.5 0 64.2-28.8 64-64.3l-.7-160.2 32 0zM256 208c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 48 48 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-48 0 0 48c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-48-48 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l48 0 0-48z"], "golf-ball-tee": [384, 512, ["golf-ball"], "f450", "M384 192c0 66.8-34.1 125.6-85.8 160L85.8 352C34.1 317.6 0 258.8 0 192C0 86 86 0 192 0S384 86 384 192zM242.1 256.6c0 18.5-15 33.5-33.5 33.5c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4zm-52.3-49.3c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4c0 18.5-15 33.5-33.5 33.5zm113.5-17.5c0 18.5-15 33.5-33.5 33.5c-4.9 0-9.1 5.1-5.4 8.4c5.9 5.2 13.7 8.4 22.1 8.4c18.5 0 33.5-15 33.5-33.5c0-8.5-3.2-16.2-8.4-22.1c-3.3-3.7-8.4 .5-8.4 5.4zM96 416c0-17.7 14.3-32 32-32l64 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0c-8.8 0-16 7.2-16 16l0 16c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-16c0-8.8-7.2-16-16-16l-16 0c-17.7 0-32-14.3-32-32z"], "circle-chevron-left": [512, 512, ["chevron-circle-left"], "f137", "M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"], @@ -2873,6 +3092,7 @@ "window-minimize": [512, 512, [128469], "f2d1", "M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"], "mug-saucer": [640, 512, ["coffee"], "f0f4", "M96 64c0-17.7 14.3-32 32-32l320 0 64 0c70.7 0 128 57.3 128 128s-57.3 128-128 128l-32 0c0 53-43 96-96 96l-192 0c-53 0-96-43-96-96L96 64zM480 224l32 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0 0 128zM32 416l512 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32z"], "brush": [384, 512, [], "f55d", "M162.4 6c-1.5-3.6-5-6-8.9-6l-19 0c-3.9 0-7.5 2.4-8.9 6L104.9 57.7c-3.2 8-14.6 8-17.8 0L66.4 6c-1.5-3.6-5-6-8.9-6L48 0C21.5 0 0 21.5 0 48L0 224l0 22.4L0 256l9.6 0 364.8 0 9.6 0 0-9.6 0-22.4 0-176c0-26.5-21.5-48-48-48L230.5 0c-3.9 0-7.5 2.4-8.9 6L200.9 57.7c-3.2 8-14.6 8-17.8 0L162.4 6zM0 288l0 32c0 35.3 28.7 64 64 64l64 0 0 64c0 35.3 28.7 64 64 64s64-28.7 64-64l0-64 64 0c35.3 0 64-28.7 64-64l0-32L0 288zM192 432a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"], + "file-half-dashed": [384, 512, [], "e698", "M64 0C28.7 0 0 28.7 0 64L0 320l384 0 0-160-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM0 416l64 0 0-64L0 352l0 64zm288 32l-80 0 0 64 80 0 0-64zm-112 0l-80 0 0 64 80 0 0-64zM64 448L0 448c0 35.3 28.7 64 64 64l0-64zm256 0l0 64c35.3 0 64-28.7 64-64l-64 0zm64-32l0-64-64 0 0 64 64 0z"], "mask": [576, 512, [], "f6fa", "M288 64C64 64 0 160 0 272S80 448 176 448l8.4 0c24.2 0 46.4-13.7 57.2-35.4l23.2-46.3c4.4-8.8 13.3-14.3 23.2-14.3s18.8 5.5 23.2 14.3l23.2 46.3c10.8 21.7 33 35.4 57.2 35.4l8.4 0c96 0 176-64 176-176s-64-208-288-208zM96 256a64 64 0 1 1 128 0A64 64 0 1 1 96 256zm320-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"], "magnifying-glass-minus": [512, 512, ["search-minus"], "f010", "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"], "ruler-vertical": [256, 512, [], "f548", "M0 48C0 21.5 21.5 0 48 0L208 0c26.5 0 48 21.5 48 48l0 48-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 64-80 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l80 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 48z"], @@ -2932,8 +3152,115 @@ (function () { 'use strict'; - const noop = () => {}; + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), Object.defineProperty(t, "prototype", { + writable: !1 + }), e && _setPrototypeOf(t, e); + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + function _wrapRegExp() { + _wrapRegExp = function (e, r) { + return new BabelRegExp(e, void 0, r); + }; + var e = RegExp.prototype, + r = new WeakMap(); + function BabelRegExp(e, t, p) { + var o = RegExp(e, t); + return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); + } + function buildGroups(e, t) { + var p = r.get(t); + return Object.keys(p).reduce(function (r, t) { + var o = p[t]; + if ("number" == typeof o) r[t] = e[o];else { + for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; + r[t] = e[o[i]]; + } + return r; + }, Object.create(null)); + } + return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { + var t = e.exec.call(this, r); + if (t) { + t.groups = buildGroups(t, this); + var p = t.indices; + p && (p.groups = buildGroups(p, this)); + } + return t; + }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { + if ("string" == typeof p) { + var o = r.get(this); + return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { + var t = o[r]; + return "$" + (Array.isArray(t) ? t.join("$") : t); + })); + } + if ("function" == typeof p) { + var i = this; + return e[Symbol.replace].call(this, t, function () { + var e = arguments; + return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); + }); + } + return e[Symbol.replace].call(this, t, p); + }, _wrapRegExp.apply(this, arguments); + } + const noop = () => {}; let _WINDOW = {}; let _DOCUMENT = {}; let _MUTATION_OBSERVER = null; @@ -2941,14 +3268,12 @@ mark: noop, measure: noop }; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver; if (typeof performance !== 'undefined') _PERFORMANCE = performance; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -2960,231 +3285,327 @@ const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function'; const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); - var a = "classic", - t = "duotone", - r = "sharp", - o = "sharp-duotone", - c = [a, t, r, o]; - - var et$1 = { - classic: { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - sharp: { - 900: "fass", - 400: "fasr", - 300: "fasl", - 100: "fast" - }, - "sharp-duotone": { - 900: "fasds" - } - }; - var bt = { - kit: { - fak: "kit", - "fa-kit": "kit" - }, - "kit-duotone": { - fakd: "kit-duotone", - "fa-kit-duotone": "kit-duotone" - } - }, - Ct = ["kit"]; - var Dt = /fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/, - Kt = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i; - var ao = { - "Font Awesome 5 Free": { - 900: "fas", - 400: "far" - }, - "Font Awesome 5 Pro": { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal" - }, - "Font Awesome 5 Brands": { - 400: "fab", - normal: "fab" - }, - "Font Awesome 5 Duotone": { - 900: "fad" - } - }; - var eo = { - "Font Awesome 6 Free": { - 900: "fas", - 400: "far" - }, - "Font Awesome 6 Pro": { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - "Font Awesome 6 Brands": { - 400: "fab", - normal: "fab" - }, - "Font Awesome 6 Duotone": { - 900: "fad" - }, - "Font Awesome 6 Sharp": { - 900: "fass", - 400: "fasr", - normal: "fasr", - 300: "fasl", - 100: "fast" - }, - "Font Awesome 6 Sharp Duotone": { - 900: "fasds" - } - }, - lo = { - classic: { - "fa-brands": "fab", - "fa-duotone": "fad", - "fa-light": "fal", - "fa-regular": "far", - "fa-solid": "fas", - "fa-thin": "fat" - }, - sharp: { - "fa-solid": "fass", - "fa-regular": "fasr", - "fa-light": "fasl", - "fa-thin": "fast" - }, - "sharp-duotone": { - "fa-solid": "fasds" - } - }, - y = { - classic: ["fas", "far", "fal", "fat"], - sharp: ["fass", "fasr", "fasl", "fast"], - "sharp-duotone": ["fasds"] - }, - no = { - classic: { - fab: "fa-brands", - fad: "fa-duotone", - fal: "fa-light", - far: "fa-regular", - fas: "fa-solid", - fat: "fa-thin" - }, - sharp: { - fass: "fa-solid", - fasr: "fa-regular", - fasl: "fa-light", - fast: "fa-thin" - }, - "sharp-duotone": { - fasds: "fa-solid" - } - }, - fo = { - classic: { - solid: "fas", - regular: "far", - light: "fal", - thin: "fat", - duotone: "fad", - brands: "fab" - }, - sharp: { - solid: "fass", - regular: "fasr", - light: "fasl", - thin: "fast" - }, - "sharp-duotone": { - solid: "fasds" - } - }, - ho = { - classic: { - fa: "solid", - fas: "solid", - "fa-solid": "solid", - far: "regular", - "fa-regular": "regular", - fal: "light", - "fa-light": "light", - fat: "thin", - "fa-thin": "thin", - fad: "duotone", - "fa-duotone": "duotone", - fab: "brands", - "fa-brands": "brands" + var p = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/, + g = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i; + var S = { + classic: { + fa: "solid", + fas: "solid", + "fa-solid": "solid", + far: "regular", + "fa-regular": "regular", + fal: "light", + "fa-light": "light", + fat: "thin", + "fa-thin": "thin", + fab: "brands", + "fa-brands": "brands" + }, + duotone: { + fa: "solid", + fad: "solid", + "fa-solid": "solid", + "fa-duotone": "solid", + fadr: "regular", + "fa-regular": "regular", + fadl: "light", + "fa-light": "light", + fadt: "thin", + "fa-thin": "thin" + }, + sharp: { + fa: "solid", + fass: "solid", + "fa-solid": "solid", + fasr: "regular", + "fa-regular": "regular", + fasl: "light", + "fa-light": "light", + fast: "thin", + "fa-thin": "thin" + }, + "sharp-duotone": { + fa: "solid", + fasds: "solid", + "fa-solid": "solid", + fasdr: "regular", + "fa-regular": "regular", + fasdl: "light", + "fa-light": "light", + fasdt: "thin", + "fa-thin": "thin" + } }, - sharp: { - fa: "solid", - fass: "solid", - "fa-solid": "solid", - fasr: "regular", - "fa-regular": "regular", - fasl: "light", - "fa-light": "light", - fast: "thin", - "fa-thin": "thin" + A = { + GROUP: "duotone-group", + SWAP_OPACITY: "swap-opacity", + PRIMARY: "primary", + SECONDARY: "secondary" }, - "sharp-duotone": { - fa: "solid", - fasds: "solid", - "fa-solid": "solid" - } - }, - x$1 = ["solid", "regular", "light", "thin", "duotone", "brands"], - u$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - m$1 = u$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), - t$1 = { - GROUP: "duotone-group", - SWAP_OPACITY: "swap-opacity", - PRIMARY: "primary", - SECONDARY: "secondary" - }, - yo = [...Object.keys(y), ...x$1, "2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "fw", "inverse", "layers-counter", "layers-text", "layers", "li", "pull-left", "pull-right", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(u$1.map(o => "".concat(o, "x"))).concat(m$1.map(o => "w-".concat(o))); - var mo = { - "Font Awesome Kit": { - 400: "fak", - normal: "fak" + P = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"]; + var s = "classic", + t = "duotone", + r = "sharp", + o = "sharp-duotone", + L = [s, t, r, o]; + var G = { + classic: { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + duotone: { + 900: "fad", + 400: "fadr", + 300: "fadl", + 100: "fadt" + }, + sharp: { + 900: "fass", + 400: "fasr", + 300: "fasl", + 100: "fast" + }, + "sharp-duotone": { + 900: "fasds", + 400: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var lt = { + "Font Awesome 6 Free": { + 900: "fas", + 400: "far" + }, + "Font Awesome 6 Pro": { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + "Font Awesome 6 Brands": { + 400: "fab", + normal: "fab" + }, + "Font Awesome 6 Duotone": { + 900: "fad", + 400: "fadr", + normal: "fadr", + 300: "fadl", + 100: "fadt" + }, + "Font Awesome 6 Sharp": { + 900: "fass", + 400: "fasr", + normal: "fasr", + 300: "fasl", + 100: "fast" + }, + "Font Awesome 6 Sharp Duotone": { + 900: "fasds", + 400: "fasdr", + normal: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var pt = new Map([["classic", { + defaultShortPrefixId: "fas", + defaultStyleId: "solid", + styleIds: ["solid", "regular", "light", "thin", "brands"], + futureStyleIds: [], + defaultFontWeight: 900 + }], ["sharp", { + defaultShortPrefixId: "fass", + defaultStyleId: "solid", + styleIds: ["solid", "regular", "light", "thin"], + futureStyleIds: [], + defaultFontWeight: 900 + }], ["duotone", { + defaultShortPrefixId: "fad", + defaultStyleId: "solid", + styleIds: ["solid", "regular", "light", "thin"], + futureStyleIds: [], + defaultFontWeight: 900 + }], ["sharp-duotone", { + defaultShortPrefixId: "fasds", + defaultStyleId: "solid", + styleIds: ["solid", "regular", "light", "thin"], + futureStyleIds: [], + defaultFontWeight: 900 + }]]), + xt = { + classic: { + solid: "fas", + regular: "far", + light: "fal", + thin: "fat", + brands: "fab" + }, + duotone: { + solid: "fad", + regular: "fadr", + light: "fadl", + thin: "fadt" + }, + sharp: { + solid: "fass", + regular: "fasr", + light: "fasl", + thin: "fast" + }, + "sharp-duotone": { + solid: "fasds", + regular: "fasdr", + light: "fasdl", + thin: "fasdt" + } + }; + var Ft = ["fak", "fa-kit", "fakd", "fa-kit-duotone"], + St = { + kit: { + fak: "kit", + "fa-kit": "kit" + }, + "kit-duotone": { + fakd: "kit-duotone", + "fa-kit-duotone": "kit-duotone" + } }, - "Font Awesome Kit Duotone": { - 400: "fakd", - normal: "fakd" - } - }, - Io = { + At = ["kit"]; + var Ct = { kit: { "fa-kit": "fak" }, "kit-duotone": { "fa-kit-duotone": "fakd" } - }, - Fo = { - kit: { - fak: "fa-kit" + }; + var Lt = ["fak", "fakd"], + Wt = { + kit: { + fak: "fa-kit" + }, + "kit-duotone": { + fakd: "fa-kit-duotone" + } + }; + var Et = { + kit: { + kit: "fak" + }, + "kit-duotone": { + "kit-duotone": "fakd" + } + }; + + var t$1 = { + GROUP: "duotone-group", + SWAP_OPACITY: "swap-opacity", + PRIMARY: "primary", + SECONDARY: "secondary" }, - "kit-duotone": { - fakd: "fa-kit-duotone" - } - }, - So = { - kit: { - kit: "fak" + r$1 = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"]; + var bt$1 = ["fak", "fa-kit", "fakd", "fa-kit-duotone"]; + var Yt = { + "Font Awesome Kit": { + 400: "fak", + normal: "fak" + }, + "Font Awesome Kit Duotone": { + 400: "fakd", + normal: "fakd" + } + }; + var po = { + classic: { + "fa-brands": "fab", + "fa-duotone": "fad", + "fa-light": "fal", + "fa-regular": "far", + "fa-solid": "fas", + "fa-thin": "fat" + }, + duotone: { + "fa-regular": "fadr", + "fa-light": "fadl", + "fa-thin": "fadt" + }, + sharp: { + "fa-solid": "fass", + "fa-regular": "fasr", + "fa-light": "fasl", + "fa-thin": "fast" + }, + "sharp-duotone": { + "fa-solid": "fasds", + "fa-regular": "fasdr", + "fa-light": "fasdl", + "fa-thin": "fasdt" + } }, - "kit-duotone": { - "kit-duotone": "fakd" - } - }; + I$1 = { + classic: ["fas", "far", "fal", "fat", "fad"], + duotone: ["fadr", "fadl", "fadt"], + sharp: ["fass", "fasr", "fasl", "fast"], + "sharp-duotone": ["fasds", "fasdr", "fasdl", "fasdt"] + }, + co = { + classic: { + fab: "fa-brands", + fad: "fa-duotone", + fal: "fa-light", + far: "fa-regular", + fas: "fa-solid", + fat: "fa-thin" + }, + duotone: { + fadr: "fa-regular", + fadl: "fa-light", + fadt: "fa-thin" + }, + sharp: { + fass: "fa-solid", + fasr: "fa-regular", + fasl: "fa-light", + fast: "fa-thin" + }, + "sharp-duotone": { + fasds: "fa-solid", + fasdr: "fa-regular", + fasdl: "fa-light", + fasdt: "fa-thin" + } + }, + x = ["fa-solid", "fa-regular", "fa-light", "fa-thin", "fa-duotone", "fa-brands"], + xo = ["fa", "fas", "far", "fal", "fat", "fad", "fadr", "fadl", "fadt", "fab", "fass", "fasr", "fasl", "fast", "fasds", "fasdr", "fasdl", "fasdt", ...r$1, ...x], + m$1 = ["solid", "regular", "light", "thin", "duotone", "brands"], + c$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + F$1 = c$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), + Fo = [...Object.keys(I$1), ...m$1, "2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "fw", "inverse", "layers-counter", "layers-text", "layers", "li", "pull-left", "pull-right", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(c$1.map(o => "".concat(o, "x"))).concat(F$1.map(o => "w-".concat(o))); + var ko = { + "Font Awesome 5 Free": { + 900: "fas", + 400: "far" + }, + "Font Awesome 5 Pro": { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal" + }, + "Font Awesome 5 Brands": { + 400: "fab", + normal: "fab" + }, + "Font Awesome 5 Duotone": { + 900: "fad" + } + }; const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; const UNITS_IN_GRID = 16; @@ -3205,69 +3626,54 @@ return false; } })(); - const FAMILIES = [a, r, o]; - function familyProxy(obj) { // Defaults to the classic family if family is not available return new Proxy(obj, { get(target, prop) { - return prop in target ? target[prop] : target[a]; + return prop in target ? target[prop] : target[s]; } - }); } - - const _PREFIX_TO_STYLE = { ...ho - }; - _PREFIX_TO_STYLE[a] = { ...ho[a], - ...bt['kit'], - ...bt['kit-duotone'] - }; + const _PREFIX_TO_STYLE = _objectSpread2({}, S); + + // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding + // {'fa-duotone': 'duotone'} + _PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + 'fa-duotone': 'duotone' + }), S[s]), St['kit']), St['kit-duotone']); const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE); - const _STYLE_TO_PREFIX = { ...fo - }; - _STYLE_TO_PREFIX[a] = { ..._STYLE_TO_PREFIX[a], - ...So['kit'], - ...So['kit-duotone'] - }; + const _STYLE_TO_PREFIX = _objectSpread2({}, xt); + + // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'} + _STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + duotone: 'fad' + }), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']); const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX); - const _PREFIX_TO_LONG_STYLE = { ...no - }; - _PREFIX_TO_LONG_STYLE[a] = { ..._PREFIX_TO_LONG_STYLE[a], - ...Fo['kit'] - }; + const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, co); + _PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']); const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE); - const _LONG_STYLE_TO_PREFIX = { ...lo - }; - _LONG_STYLE_TO_PREFIX[a] = { ..._LONG_STYLE_TO_PREFIX[a], - ...Io['kit'] - }; + const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, po); + _LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']); const LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX); - const ICON_SELECTION_SYNTAX_PATTERN = Dt; // eslint-disable-line no-useless-escape + const ICON_SELECTION_SYNTAX_PATTERN = p; // eslint-disable-line no-useless-escape const LAYERS_TEXT_CLASSNAME = 'fa-layers-text'; - const FONT_FAMILY_PATTERN = Kt; - const _FONT_WEIGHT_TO_PREFIX = { ...et$1 - }; + const FONT_FAMILY_PATTERN = g; + const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G); const FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX); const ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask']; - const DUOTONE_CLASSES = t$1; - const prefixes = new Set(); - Object.keys(STYLE_TO_PREFIX[a]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[r]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[o]).map(prefixes.add.bind(prefixes)); - const RESERVED_CLASSES = [...Ct, ...yo]; + const DUOTONE_CLASSES = A; + const RESERVED_CLASSES = [...At, ...Fo]; const initial = WINDOW.FontAwesomeConfig || {}; - function getAttrConfig(attr) { var element = DOCUMENT.querySelector('script[' + attr + ']'); - if (element) { return element.getAttribute(attr); } } - function coerce(val) { // Getting an empty string will occur if the attribute is set on the HTML tag but without a value // We'll assume that this is an indication that it should be toggled to true @@ -3276,22 +3682,19 @@ if (val === 'true') return true; return val; } - if (DOCUMENT && typeof DOCUMENT.querySelector === 'function') { const attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']]; attrs.forEach(_ref => { let [attr, key] = _ref; const val = coerce(getAttrConfig(attr)); - if (val !== undefined && val !== null) { initial[key] = val; } }); } - const _default = { styleDefault: 'solid', - familyDefault: 'classic', + familyDefault: s, cssPrefix: DEFAULT_CSS_PREFIX, replacementClass: DEFAULT_REPLACEMENT_CLASS, autoReplaceSvg: true, @@ -3303,15 +3706,13 @@ keepOriginalSource: true, measurePerformance: false, showMissingIcons: true - }; // familyPrefix is deprecated but we must still support it if present + }; + // familyPrefix is deprecated but we must still support it if present if (initial.familyPrefix) { initial.cssPrefix = initial.familyPrefix; } - - const _config = { ..._default, - ...initial - }; + const _config = _objectSpread2(_objectSpread2({}, _default), initial); if (!_config.autoReplaceSvg) _config.observeMutations = false; const config = {}; Object.keys(_default).forEach(key => { @@ -3319,20 +3720,19 @@ enumerable: true, set: function (val) { _config[key] = val; - _onChangeCb.forEach(cb => cb(config)); }, get: function () { return _config[key]; } }); - }); // familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0 + }); + // familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0 Object.defineProperty(config, 'familyPrefix', { enumerable: true, set: function (val) { _config.cssPrefix = val; - _onChangeCb.forEach(cb => cb(config)); }, get: function () { @@ -3343,7 +3743,6 @@ const _onChangeCb = []; function onChange(cb) { _onChangeCb.push(cb); - return () => { _onChangeCb.splice(_onChangeCb.indexOf(cb), 1); }; @@ -3363,7 +3762,6 @@ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - fn(...args); } catch (e) { if (!PRODUCTION) { @@ -3375,22 +3773,18 @@ if (!css || !IS_DOM) { return; } - const style = DOCUMENT.createElement('style'); style.setAttribute('type', 'text/css'); style.innerHTML = css; const headChildren = DOCUMENT.head.childNodes; let beforeChild = null; - for (let i = headChildren.length - 1; i > -1; i--) { const child = headChildren[i]; const tagName = (child.tagName || '').toUpperCase(); - if (['STYLE', 'LINK'].indexOf(tagName) > -1) { beforeChild = child; } } - DOCUMENT.head.insertBefore(style, beforeChild); return css; } @@ -3398,20 +3792,16 @@ function nextUniqueId() { let size = 12; let id = ''; - while (size-- > 0) { id += idPool[Math.random() * 62 | 0]; } - return id; } function toArray(obj) { const array = []; - for (let i = (obj || []).length >>> 0; i--;) { array[i] = obj[i]; } - return array; } function classArray(node) { @@ -3469,7 +3859,6 @@ startCentered = false } = _ref2; let val = ''; - if (startCentered && IS_IE) { val += "translate(".concat(transform.x / d$2 - width / 2, "em, ").concat(transform.y / d$2 - height / 2, "em) "); } else if (startCentered) { @@ -3477,13 +3866,12 @@ } else { val += "translate(".concat(transform.x / d$2, "em, ").concat(transform.y / d$2, "em) "); } - val += "scale(".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), ") "); val += "rotate(".concat(transform.rotate, "deg) "); return val; } - var baseStyles = ":host,:root{--fa-font-solid:normal 900 1em/1 \"Font Awesome 6 Free\";--fa-font-regular:normal 400 1em/1 \"Font Awesome 6 Free\";--fa-font-light:normal 300 1em/1 \"Font Awesome 6 Pro\";--fa-font-thin:normal 100 1em/1 \"Font Awesome 6 Pro\";--fa-font-duotone:normal 900 1em/1 \"Font Awesome 6 Duotone\";--fa-font-brands:normal 400 1em/1 \"Font Awesome 6 Brands\";--fa-font-sharp-solid:normal 900 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-regular:normal 400 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-light:normal 300 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-thin:normal 100 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-duotone-solid:normal 900 1em/1 \"Font Awesome 6 Sharp Duotone\"}svg:not(:host).svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible;box-sizing:content-box}.svg-inline--fa{display:var(--fa-display,inline-block);height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.0714285705em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);overflow:hidden;padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:top right}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom right}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);right:auto;top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom left}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top right}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top left}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.0833333337em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.0714285718em;vertical-align:.0535714295em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.0416666682em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:var(--fa-li-margin,2.5em);padding-left:0}.fa-ul>li{position:relative}.fa-li{left:calc(-1 * var(--fa-li-width,2em));position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{animation-delay:-1ms;animation-duration:1ms;animation-iteration-count:1;transition-delay:0s;transition-duration:0s}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1,1) translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1,1) translateY(0)}100%{transform:scale(1,1) translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}24%,8%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}100%,40%{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{display:inline-block;vertical-align:middle;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;z-index:var(--fa-stack-z-index,auto)}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:var(--fa-inverse,#fff)}.fa-sr-only,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fa-sr-only-focusable:not(:focus),.sr-only-focusable:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}.fa-duotone.fa-inverse,.fad.fa-inverse{color:var(--fa-inverse,#fff)}"; + var baseStyles = ":host,:root{--fa-font-solid:normal 900 1em/1 \"Font Awesome 6 Free\";--fa-font-regular:normal 400 1em/1 \"Font Awesome 6 Free\";--fa-font-light:normal 300 1em/1 \"Font Awesome 6 Pro\";--fa-font-thin:normal 100 1em/1 \"Font Awesome 6 Pro\";--fa-font-duotone:normal 900 1em/1 \"Font Awesome 6 Duotone\";--fa-font-duotone-regular:normal 400 1em/1 \"Font Awesome 6 Duotone\";--fa-font-duotone-light:normal 300 1em/1 \"Font Awesome 6 Duotone\";--fa-font-duotone-thin:normal 100 1em/1 \"Font Awesome 6 Duotone\";--fa-font-brands:normal 400 1em/1 \"Font Awesome 6 Brands\";--fa-font-sharp-solid:normal 900 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-regular:normal 400 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-light:normal 300 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-thin:normal 100 1em/1 \"Font Awesome 6 Sharp\";--fa-font-sharp-duotone-solid:normal 900 1em/1 \"Font Awesome 6 Sharp Duotone\";--fa-font-sharp-duotone-regular:normal 400 1em/1 \"Font Awesome 6 Sharp Duotone\";--fa-font-sharp-duotone-light:normal 300 1em/1 \"Font Awesome 6 Sharp Duotone\";--fa-font-sharp-duotone-thin:normal 100 1em/1 \"Font Awesome 6 Sharp Duotone\"}svg:not(:host).svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible;box-sizing:content-box}.svg-inline--fa{display:var(--fa-display,inline-block);height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.0714285705em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);overflow:hidden;padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:top right}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom right}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);right:auto;top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom left}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top right}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top left}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.0833333337em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.0714285718em;vertical-align:.0535714295em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.0416666682em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:var(--fa-li-margin,2.5em);padding-left:0}.fa-ul>li{position:relative}.fa-li{left:calc(-1 * var(--fa-li-width,2em));position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{animation-delay:-1ms;animation-duration:1ms;animation-iteration-count:1;transition-delay:0s;transition-duration:0s}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1,1) translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1,1) translateY(0)}100%{transform:scale(1,1) translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}24%,8%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}100%,40%{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{display:inline-block;vertical-align:middle;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;z-index:var(--fa-stack-z-index,auto)}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:var(--fa-inverse,#fff)}.fa-sr-only,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fa-sr-only-focusable:not(:focus),.sr-only-focusable:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}"; function css() { const dcp = DEFAULT_CSS_PREFIX; @@ -3491,26 +3879,21 @@ const fp = config.cssPrefix; const rc = config.replacementClass; let s = baseStyles; - if (fp !== dcp || rc !== drc) { const dPatt = new RegExp("\\.".concat(dcp, "\\-"), 'g'); const customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), 'g'); const rPatt = new RegExp("\\.".concat(drc), 'g'); s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc)); } - return s; } - let _cssInserted = false; - function ensureCss() { if (config.autoAddCss && !_cssInserted) { insertCss(css()); _cssInserted = true; } } - var InjectCSS = { mixout() { return { @@ -3520,44 +3903,36 @@ } }; }, - hooks() { return { beforeDOMElementCreation() { ensureCss(); }, - beforeI2svg() { ensureCss(); } - }; } - }; - const w$1 = WINDOW || {}; - if (!w$1[NAMESPACE_IDENTIFIER]) w$1[NAMESPACE_IDENTIFIER] = {}; - if (!w$1[NAMESPACE_IDENTIFIER].styles) w$1[NAMESPACE_IDENTIFIER].styles = {}; - if (!w$1[NAMESPACE_IDENTIFIER].hooks) w$1[NAMESPACE_IDENTIFIER].hooks = {}; - if (!w$1[NAMESPACE_IDENTIFIER].shims) w$1[NAMESPACE_IDENTIFIER].shims = []; - var namespace = w$1[NAMESPACE_IDENTIFIER]; + const w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; const functions = []; - const listener = function () { DOCUMENT.removeEventListener('DOMContentLoaded', listener); loaded = 1; functions.map(fn => fn()); }; - let loaded = false; - if (IS_DOM) { loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState); if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener); } - function domready (fn) { if (!IS_DOM) return; loaded ? setTimeout(fn, 0) : functions.push(fn); @@ -3569,7 +3944,6 @@ attributes = {}, children = [] } = abstractNodes; - if (typeof abstractNodes === 'string') { return htmlEscape(abstractNodes); } else { @@ -3591,7 +3965,6 @@ * Internal helper to bind a function known to have 4 arguments * to a given context. */ - var bindInternal4 = function bindInternal4(func, thisContext) { return function (a, b, c, d) { return func.call(thisContext, a, b, c, d); @@ -3609,16 +3982,13 @@ * @param {Object} thisContext The context for the reducer. * @return {mixed} The final result. */ - - var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) { var keys = Object.keys(subject), - length = keys.length, - iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn, - i, - key, - result; - + length = keys.length, + iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn, + i, + key, + result; if (initialValue === undefined) { i = 1; result = subject[keys[0]]; @@ -3626,12 +3996,10 @@ i = 0; result = initialValue; } - for (; i < length; i++) { key = keys[i]; result = iterator(result, subject[key], key, subject); } - return result; }; @@ -3659,17 +4027,15 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + function ucs2decode(string) { const output = []; let counter = 0; const length = string.length; - while (counter < length) { const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // eslint-disable-line eqeqeq output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); @@ -3681,10 +4047,8 @@ output.push(value); } } - return output; } - function toHex(unicode) { const decoded = ucs2decode(unicode); return decoded.length === 1 ? decoded[0].toString(16) : null; @@ -3693,15 +4057,12 @@ const size = string.length; let first = string.charCodeAt(index); let second; - if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) { second = string.charCodeAt(index + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; } } - return first; } @@ -3709,74 +4070,72 @@ return Object.keys(icons).reduce((acc, iconName) => { const icon = icons[iconName]; const expanded = !!icon.icon; - if (expanded) { acc[icon.iconName] = icon.icon; } else { acc[iconName] = icon; } - return acc; }, {}); } - function defineIcons(prefix, icons) { let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { skipHooks = false } = params; const normalized = normalizeIcons(icons); - if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { namespace.hooks.addPack(prefix, normalizeIcons(icons)); } else { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...normalized - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized); } + /** * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction * of new styles we needed to differentiate between them. Prefix `fa` is now an alias * for `fas` so we'll ease the upgrade process for our users by automatically defining * this as well. */ - - if (prefix === 'fas') { defineIcons('fa', icons); } } + const duotonePathRe = [/*#__PURE__*/_wrapRegExp(/path d="([^"]+)".*path d="([^"]+)"/, { + d1: 1, + d2: 2 + }), /*#__PURE__*/_wrapRegExp(/path class="([^"]+)".*d="([^"]+)".*path class="([^"]+)".*d="([^"]+)"/, { + cls1: 1, + d1: 2, + cls2: 3, + d2: 4 + }), /*#__PURE__*/_wrapRegExp(/path class="([^"]+)".*d="([^"]+)"/, { + cls1: 1, + d1: 2 + })]; + const { styles, shims } = namespace; - const LONG_STYLE = { - [a]: Object.values(PREFIX_TO_LONG_STYLE[a]), - [r]: Object.values(PREFIX_TO_LONG_STYLE[r]), - [o]: Object.values(PREFIX_TO_LONG_STYLE[o]) - }; + const FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE); + const PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce((acc, familyId) => { + acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]); + return acc; + }, {}); let _defaultUsablePrefix = null; let _byUnicode = {}; let _byLigature = {}; let _byOldName = {}; let _byOldUnicode = {}; let _byAlias = {}; - const PREFIXES = { - [a]: Object.keys(PREFIX_TO_STYLE[a]), - [r]: Object.keys(PREFIX_TO_STYLE[r]), - [o]: Object.keys(PREFIX_TO_STYLE[o]) - }; - function isReserved(name) { return ~RESERVED_CLASSES.indexOf(name); } - function getIconName(cssPrefix, cls) { const parts = cls.split('-'); const prefix = parts[0]; const iconName = parts.slice(1).join('-'); - if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) { return iconName; } else { @@ -3790,12 +4149,10 @@ return o$$1; }, {}); }; - _byUnicode = lookup((acc, icon, iconName) => { if (icon[3]) { acc[icon[3]] = iconName; } - if (icon[2]) { const aliases = icon[2].filter(a$$1 => { return typeof a$$1 === 'number'; @@ -3804,12 +4161,10 @@ acc[alias.toString(16)] = iconName; }); } - return acc; }); _byLigature = lookup((acc, icon, iconName) => { acc[iconName] = iconName; - if (icon[2]) { const aliases = icon[2].filter(a$$1 => { return typeof a$$1 === 'string'; @@ -3818,7 +4173,6 @@ acc[alias] = iconName; }); } - return acc; }); _byAlias = lookup((acc, icon, iconName) => { @@ -3828,33 +4182,30 @@ acc[alias] = iconName; }); return acc; - }); // If we have a Kit, we can't determine if regular is available since we - // could be auto-fetching it. We'll have to assume that it is available. + }); + // If we have a Kit, we can't determine if regular is available since we + // could be auto-fetching it. We'll have to assume that it is available. const hasRegular = 'far' in styles || config.autoFetchSvg; const shimLookups = reduce(shims, (acc, shim) => { const maybeNameMaybeUnicode = shim[0]; let prefix = shim[1]; const iconName = shim[2]; - if (prefix === 'far' && !hasRegular) { prefix = 'fas'; } - if (typeof maybeNameMaybeUnicode === 'string') { acc.names[maybeNameMaybeUnicode] = { prefix, iconName }; } - if (typeof maybeNameMaybeUnicode === 'number') { acc.unicodes[maybeNameMaybeUnicode.toString(16)] = { prefix, iconName }; } - return acc; }, { names: {}, @@ -3908,103 +4259,146 @@ rest: [] }; }; + function getFamilyId(values) { + let family = s; + const famProps = FAMILY_NAMES.reduce((acc, familyId) => { + acc[familyId] = "".concat(config.cssPrefix, "-").concat(familyId); + return acc; + }, {}); + L.forEach(familyId => { + if (values.includes(famProps[familyId]) || values.some(v$$1 => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) { + family = familyId; + } + }); + return family; + } function getCanonicalPrefix(styleOrPrefix) { let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { - family = a + family = s } = params; const style = PREFIX_TO_STYLE[family][styleOrPrefix]; + + // handles the exception of passing in only a family of 'duotone' with no style + if (family === t && !styleOrPrefix) { + return 'fad'; + } const prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style]; const defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null; const result = prefix || defined || null; return result; } - const PREFIXES_FOR_FAMILY = { - [a]: Object.keys(PREFIX_TO_LONG_STYLE[a]), - [r]: Object.keys(PREFIX_TO_LONG_STYLE[r]), - [o]: Object.keys(PREFIX_TO_LONG_STYLE[o]) - }; + function moveNonFaClassesToRest(classNames) { + let rest = []; + let iconName = null; + classNames.forEach(cls => { + const result = getIconName(config.cssPrefix, cls); + if (result) { + iconName = result; + } else if (cls) { + rest.push(cls); + } + }); + return { + iconName, + rest + }; + } + function sortedUniqueValues(arr) { + return arr.sort().filter((value, index, arr) => { + return arr.indexOf(value) === index; + }); + } function getCanonicalIcon(values) { let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { skipLookups = false } = params; - const famProps = { - [a]: "".concat(config.cssPrefix, "-").concat(a), - [r]: "".concat(config.cssPrefix, "-").concat(r), - [o]: "".concat(config.cssPrefix, "-").concat(o) - }; let givenPrefix = null; - let family = a; - const nonDuotoneFamilyIds = c.filter(familyId => familyId !== t); - nonDuotoneFamilyIds.forEach(familyId => { - if (values.includes(famProps[familyId]) || values.some(v$$1 => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) { - family = familyId; - } + const faCombinedClasses = xo.concat(bt$1); + const faStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => faCombinedClasses.includes(cls))); + const nonStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => !xo.includes(cls))); + const faStyles = faStyleOrFamilyClasses.filter(cls => { + givenPrefix = cls; + return !P.includes(cls); }); - const canonical = values.reduce((acc, cls) => { - const iconName = getIconName(config.cssPrefix, cls); - - if (styles[cls]) { - cls = LONG_STYLE[family].includes(cls) ? LONG_STYLE_TO_PREFIX[family][cls] : cls; - givenPrefix = cls; - acc.prefix = cls; - } else if (PREFIXES[family].indexOf(cls) > -1) { - givenPrefix = cls; - acc.prefix = getCanonicalPrefix(cls, { - family - }); - } else if (iconName) { - acc.iconName = iconName; - } else if (cls !== config.replacementClass && !nonDuotoneFamilyIds.some(familyName => cls === famProps[familyName])) { - acc.rest.push(cls); - } - - if (!skipLookups && acc.prefix && acc.iconName) { - const shim = givenPrefix === 'fa' ? byOldName(acc.iconName) : {}; - const aliasIconName = byAlias(acc.prefix, acc.iconName); - - if (shim.prefix) { - givenPrefix = null; - } - - acc.iconName = shim.iconName || aliasIconName || acc.iconName; - acc.prefix = shim.prefix || acc.prefix; - - if (acc.prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) { - // Allow a fallback from the regular style to solid if regular is not available - // but only if we aren't auto-fetching SVGs - acc.prefix = 'fas'; - } - } - - return acc; - }, emptyCanonicalIcon()); - - if (values.includes('fa-brands') || values.includes('fab')) { - canonical.prefix = 'fab'; + const [styleFromValues = null] = faStyles; + const family = getFamilyId(faStyleOrFamilyClasses); + const canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, { + prefix: getCanonicalPrefix(styleFromValues, { + family + }) + }); + return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({ + values, + family, + styles, + config, + canonical, + givenPrefix + })), applyShimAndAlias(skipLookups, givenPrefix, canonical)); + } + function applyShimAndAlias(skipLookups, givenPrefix, canonical) { + let { + prefix, + iconName + } = canonical; + if (skipLookups || !prefix || !iconName) { + return { + prefix, + iconName + }; } - - if (values.includes('fa-duotone') || values.includes('fad')) { + const shim = givenPrefix === 'fa' ? byOldName(iconName) : {}; + const aliasIconName = byAlias(prefix, iconName); + iconName = shim.iconName || aliasIconName || iconName; + prefix = shim.prefix || prefix; + if (prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) { + // Allow a fallback from the regular style to solid if regular is not available + // but only if we aren't auto-fetching SVGs + prefix = 'fas'; + } + return { + prefix, + iconName + }; + } + const newCanonicalFamilies = L.filter(familyId => { + return familyId !== s || familyId !== t; + }); + const newCanonicalStyles = Object.keys(co).filter(key => key !== s).map(key => Object.keys(co[key])).flat(); + function getDefaultCanonicalPrefix(prefixOptions) { + const { + values, + family, + canonical, + givenPrefix = '', + styles = {}, + config: config$$1 = {} + } = prefixOptions; + const isDuotoneFamily = family === t; + const valuesHasDuotone = values.includes('fa-duotone') || values.includes('fad'); + const defaultFamilyIsDuotone = config$$1.familyDefault === 'duotone'; + const canonicalPrefixIsDuotone = canonical.prefix === 'fad' || canonical.prefix === 'fa-duotone'; + if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) { canonical.prefix = 'fad'; } - - if (!canonical.prefix && family === r && (styles['fass'] || config.autoFetchSvg)) { - canonical.prefix = 'fass'; - canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName; + if (values.includes('fa-brands') || values.includes('fab')) { + canonical.prefix = 'fab'; } - - if (!canonical.prefix && family === o && (styles['fasds'] || config.autoFetchSvg)) { - canonical.prefix = 'fasds'; - canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName; + if (!canonical.prefix && newCanonicalFamilies.includes(family)) { + const validPrefix = Object.keys(styles).find(key => newCanonicalStyles.includes(key)); + if (validPrefix || config$$1.autoFetchSvg) { + const defaultPrefix = pt.get(family).defaultShortPrefixId; + canonical.prefix = defaultPrefix; + canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName; + } } - if (canonical.prefix === 'fa' || givenPrefix === 'fa') { // The fa prefix is not canonical. So if it has made it through until this point // we will shift it to the correct prefix. canonical.prefix = getDefaultUsablePrefix() || 'fas'; } - return canonical; } @@ -4012,29 +4406,24 @@ constructor() { this.definitions = {}; } - add() { for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) { definitions[_key] = arguments[_key]; } - const additions = definitions.reduce(this._pullDefinitions, {}); Object.keys(additions).forEach(key => { - this.definitions[key] = { ...(this.definitions[key] || {}), - ...additions[key] - }; - defineIcons(key, additions[key]); // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change + this.definitions[key] = _objectSpread2(_objectSpread2({}, this.definitions[key] || {}), additions[key]); + defineIcons(key, additions[key]); - const longPrefix = PREFIX_TO_LONG_STYLE[a][key]; + // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change + const longPrefix = PREFIX_TO_LONG_STYLE[s][key]; if (longPrefix) defineIcons(longPrefix, additions[key]); build(); }); } - reset() { this.definitions = {}; } - _pullDefinitions(additions, definition) { const normalized = definition.prefix && definition.iconName && definition.icon ? { 0: definition @@ -4047,7 +4436,6 @@ } = normalized[key]; const aliases = icon[2]; if (!additions[prefix]) additions[prefix] = {}; - if (aliases.length > 0) { aliases.forEach(alias => { if (typeof alias === 'string') { @@ -4055,12 +4443,10 @@ } }); } - additions[prefix][iconName] = icon; }); return additions; } - } let _plugins = []; @@ -4078,48 +4464,40 @@ delete providers[k]; } }); - _plugins.forEach(plugin => { const mixout = plugin.mixout ? plugin.mixout() : {}; Object.keys(mixout).forEach(tk => { if (typeof mixout[tk] === 'function') { obj[tk] = mixout[tk]; } - if (typeof mixout[tk] === 'object') { Object.keys(mixout[tk]).forEach(sk => { if (!obj[tk]) { obj[tk] = {}; } - obj[tk][sk] = mixout[tk][sk]; }); } }); - if (plugin.hooks) { const hooks = plugin.hooks(); Object.keys(hooks).forEach(hook => { if (!_hooks[hook]) { _hooks[hook] = []; } - _hooks[hook].push(hooks[hook]); }); } - if (plugin.provides) { plugin.provides(providers); } }); - return obj; } function chainHooks(hook, accumulator) { for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } - const hookFns = _hooks[hook] || []; hookFns.forEach(hookFn => { accumulator = hookFn.apply(null, [accumulator, ...args]); // eslint-disable-line no-useless-call @@ -4130,7 +4508,6 @@ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } - const hookFns = _hooks[hook] || []; hookFns.forEach(hookFn => { hookFn.apply(null, args); @@ -4147,7 +4524,6 @@ if (iconLookup.prefix === 'fa') { iconLookup.prefix = 'fas'; } - let { iconName } = iconLookup; @@ -4165,7 +4541,6 @@ const dom = { i2svg: function () { let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - if (IS_DOM) { callHooks('beforeI2svg', params); callProvided('pseudoElements2svg', params); @@ -4179,11 +4554,9 @@ const { autoReplaceSvgRoot } = params; - if (config.autoReplaceSvg === false) { config.autoReplaceSvg = true; } - config.observeMutations = true; domready(() => { autoReplace({ @@ -4198,14 +4571,12 @@ if (icon === null) { return null; } - if (typeof icon === 'object' && icon.prefix && icon.iconName) { return { prefix: icon.prefix, iconName: byAlias(icon.prefix, icon.iconName) || icon.iconName }; } - if (Array.isArray(icon) && icon.length === 2) { const iconName = icon[1].indexOf('fa-') === 0 ? icon[1].slice(3) : icon[1]; const prefix = getCanonicalPrefix(icon[0]); @@ -4214,7 +4585,6 @@ iconName: byAlias(prefix, iconName) || iconName }; } - if (typeof icon === 'string' && (icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || icon.match(ICON_SELECTION_SYNTAX_PATTERN))) { const canonicalIcon = getCanonicalIcon(icon.split(' '), { skipLookups: true @@ -4224,7 +4594,6 @@ iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName }; } - if (typeof icon === 'string') { const prefix = getDefaultUsablePrefix(); return { @@ -4243,7 +4612,6 @@ findIconDefinition, toHtml }; - const autoReplace = function () { let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; const { @@ -4253,33 +4621,26 @@ node: autoReplaceSvgRoot }); }; - function bootstrap(plugins) { if (IS_BROWSER) { if (!WINDOW.FontAwesome) { WINDOW.FontAwesome = api; } - domready(() => { autoReplace(); callHooks('bootstrap'); }); } - - namespace.hooks = { ...namespace.hooks, + namespace.hooks = _objectSpread2(_objectSpread2({}, namespace.hooks), {}, { addPack: (prefix, icons) => { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...icons - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), icons); build(); autoReplace(); }, addPacks: packs => { packs.forEach(_ref => { let [prefix, icons] = _ref; - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...icons - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), icons); }); build(); autoReplace(); @@ -4289,7 +4650,7 @@ build(); autoReplace(); } - }; + }); } function domVariants(val, abstractCreator) { @@ -4321,7 +4682,6 @@ styles, transform } = _ref; - if (transformIsMeaningful(transform) && main.found && !mask.found) { const { width, @@ -4331,11 +4691,10 @@ x: width / height / 2, y: 0.5 }; - attributes['style'] = joinStyles({ ...styles, + attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, { 'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em") - }); + })); } - return [{ tag: 'svg', attributes, @@ -4359,9 +4718,9 @@ }, children: [{ tag: 'symbol', - attributes: { ...attributes, + attributes: _objectSpread2(_objectSpread2({}, attributes), {}, { id - }, + }), children }] }]; @@ -4387,27 +4746,25 @@ width, height } = mask.found ? mask : main; - const isUploadedIcon = prefix === 'fak'; - const attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(c => extra.classes.indexOf(c) === -1).filter(c => c !== '' || !!c).concat(extra.classes).join(' '); + const isUploadedIcon = Lt.includes(prefix); + const attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(c$$1 => extra.classes.indexOf(c$$1) === -1).filter(c$$1 => c$$1 !== '' || !!c$$1).concat(extra.classes).join(' '); let content = { children: [], - attributes: { ...extra.attributes, + attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, { 'data-prefix': prefix, 'data-icon': iconName, 'class': attrClass, 'role': extra.attributes.role || 'img', 'xmlns': 'http://www.w3.org/2000/svg', 'viewBox': "0 0 ".concat(width, " ").concat(height) - } + }) }; const uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? { width: "".concat(width / height * 16 * 0.0625, "em") } : {}; - if (watchable) { content.attributes[DATA_FA_I2SVG] = ''; } - if (title) { content.children.push({ tag: 'title', @@ -4418,8 +4775,7 @@ }); delete content.attributes.title; } - - const args = { ...content, + const args = _objectSpread2(_objectSpread2({}, content), {}, { prefix, iconName, main, @@ -4427,10 +4783,8 @@ maskId, transform, symbol, - styles: { ...uploadedIconWidthStyle, - ...extra.styles - } - }; + styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles) + }); const { children, attributes @@ -4443,7 +4797,6 @@ }; args.children = children; args.attributes = attributes; - if (symbol) { return asSymbol(args); } else { @@ -4460,20 +4813,15 @@ extra, watchable = false } = params; - const attributes = { ...extra.attributes, - ...(title ? { - 'title': title - } : {}), + const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? { + 'title': title + } : {}), {}, { 'class': extra.classes.join(' ') - }; - + }); if (watchable) { attributes[DATA_FA_I2SVG] = ''; } - - const styles = { ...extra.styles - }; - + const styles = _objectSpread2({}, extra.styles); if (transformIsMeaningful(transform)) { styles['transform'] = transformForCss({ transform, @@ -4483,20 +4831,16 @@ }); styles['-webkit-transform'] = styles['transform']; } - const styleString = joinStyles(styles); - if (styleString.length > 0) { attributes['style'] = styleString; } - const val = []; val.push({ tag: 'span', attributes, children: [content] }); - if (title) { val.push({ tag: 'span', @@ -4506,7 +4850,6 @@ children: [title] }); } - return val; } function makeLayersCounterAbstract(params) { @@ -4515,25 +4858,21 @@ title, extra } = params; - const attributes = { ...extra.attributes, - ...(title ? { - 'title': title - } : {}), + const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? { + 'title': title + } : {}), {}, { 'class': extra.classes.join(' ') - }; + }); const styleString = joinStyles(extra.styles); - if (styleString.length > 0) { attributes['style'] = styleString; } - const val = []; val.push({ tag: 'span', attributes, children: [content] }); - if (title) { val.push({ tag: 'span', @@ -4543,7 +4882,6 @@ children: [title] }); } - return val; } @@ -4555,7 +4893,6 @@ const height = icon[1]; const [vectorData] = icon.slice(4); let element = null; - if (Array.isArray(vectorData)) { element = { tag: 'g', @@ -4587,7 +4924,6 @@ } }; } - return { found: true, width, @@ -4600,106 +4936,86 @@ width: 512, height: 512 }; - function maybeNotifyMissing(iconName, prefix) { if (!PRODUCTION && !config.showMissingIcons && iconName) { console.error("Icon with name \"".concat(iconName, "\" and prefix \"").concat(prefix, "\" is missing.")); } } - function findIcon(iconName, prefix) { let givenPrefix = prefix; - if (prefix === 'fa' && config.styleDefault !== null) { prefix = getDefaultUsablePrefix(); } - return new Promise((resolve, reject) => { if (givenPrefix === 'fa') { const shim = byOldName(iconName) || {}; iconName = shim.iconName || iconName; prefix = shim.prefix || prefix; } - if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) { const icon = styles$1[prefix][iconName]; return resolve(asFoundIcon(icon)); } - maybeNotifyMissing(iconName, prefix); - resolve({ ...missingIconResolutionMixin, + resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, { icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {} - }); + })); }); } const noop$1 = () => {}; - const p$2 = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$1, measure: noop$1 }; - const preamble = "FA \"6.6.0\""; - + const preamble = "FA \"6.7.1\""; const begin = name => { p$2.mark("".concat(preamble, " ").concat(name, " begins")); return () => end(name); }; - const end = name => { p$2.mark("".concat(preamble, " ").concat(name, " ends")); p$2.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends")); }; - var perf = { begin, end }; const noop$2 = () => {}; - function isWatched(node) { const i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null; return typeof i2svg === 'string'; } - function hasPrefixAndIcon(node) { const prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null; const icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null; return prefix && icon; } - function hasBeenReplaced(node) { return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass); } - function getMutator() { if (config.autoReplaceSvg === true) { return mutators.replace; } - const mutator = mutators[config.autoReplaceSvg]; return mutator || mutators.replace; } - function createElementNS(tag) { return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag); } - function createElement(tag) { return DOCUMENT.createElement(tag); } - function convertSVG(abstractObj) { let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { ceFn = abstractObj.tag === 'svg' ? createElementNS : createElement } = params; - if (typeof abstractObj === 'string') { return DOCUMENT.createTextNode(abstractObj); } - const tag = ceFn(abstractObj.tag); Object.keys(abstractObj.attributes || []).forEach(function (key) { tag.setAttribute(key, abstractObj.attributes[key]); @@ -4712,26 +5028,20 @@ }); return tag; } - function nodeAsComment(node) { let comment = " ".concat(node.outerHTML, " "); /* BEGIN.ATTRIBUTION */ - comment = "".concat(comment, "Font Awesome fontawesome.com "); /* END.ATTRIBUTION */ - return comment; } - const mutators = { replace: function (mutation) { const node = mutation[0]; - if (node.parentNode) { mutation[1].forEach(abstract => { node.parentNode.insertBefore(convertSVG(abstract), node); }); - if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) { let comment = DOCUMENT.createComment(nodeAsComment(node)); node.parentNode.replaceChild(comment, node); @@ -4742,16 +5052,15 @@ }, nest: function (mutation) { const node = mutation[0]; - const abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it. - // Short-circuit to the standard replacement + const abstract = mutation[1]; + // If we already have a replaced node we do not want to continue nesting within it. + // Short-circuit to the standard replacement if (~classArray(node).indexOf(config.replacementClass)) { return mutators.replace(mutation); } - const forSvg = new RegExp("".concat(config.cssPrefix, "-.*")); delete abstract[0].attributes.id; - if (abstract[0].attributes.class) { const splitClasses = abstract[0].attributes.class.split(' ').reduce((acc, cls) => { if (cls === config.replacementClass || cls.match(forSvg)) { @@ -4759,43 +5068,35 @@ } else { acc.toNode.push(cls); } - return acc; }, { toNode: [], toSvg: [] }); abstract[0].attributes.class = splitClasses.toSvg.join(' '); - if (splitClasses.toNode.length === 0) { node.removeAttribute('class'); } else { node.setAttribute('class', splitClasses.toNode.join(' ')); } } - const newInnerHTML = abstract.map(a => toHtml(a)).join('\n'); node.setAttribute(DATA_FA_I2SVG, ''); node.innerHTML = newInnerHTML; } }; - function performOperationSync(op) { op(); } - function perform(mutations, callback) { const callbackFunction = typeof callback === 'function' ? callback : noop$2; - if (mutations.length === 0) { callbackFunction(); } else { let frame = performOperationSync; - if (config.mutateApproach === MUTATION_APPROACH_ASYNC) { frame = WINDOW.requestAnimationFrame || performOperationSync; } - frame(() => { const mutator = getMutator(); const mark = perf.begin('mutate'); @@ -4817,11 +5118,9 @@ if (!MUTATION_OBSERVER) { return; } - if (!config.observeMutations) { return; } - const { treeCallback = noop$2, nodeCallback = noop$2, @@ -4836,14 +5135,11 @@ if (config.searchPseudoElements) { pseudoElementsCallback(mutationRecord.target); } - treeCallback(mutationRecord.target); } - if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) { pseudoElementsCallback(mutationRecord.target.parentNode); } - if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) { if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) { const { @@ -4874,21 +5170,17 @@ function styleParser (node) { const style = node.getAttribute('style'); let val = []; - if (style) { val = style.split(';').reduce((acc, style) => { const styles = style.split(':'); const prop = styles[0]; const value = styles.slice(1); - if (prop && value.length > 0) { acc[prop] = value.join(':').trim(); } - return acc; }, {}); } - return val; } @@ -4897,28 +5189,22 @@ const existingIconName = node.getAttribute('data-icon'); const innerText = node.innerText !== undefined ? node.innerText.trim() : ''; let val = getCanonicalIcon(classArray(node)); - if (!val.prefix) { val.prefix = getDefaultUsablePrefix(); } - if (existingPrefix && existingIconName) { val.prefix = existingPrefix; val.iconName = existingIconName; } - if (val.iconName && val.prefix) { return val; } - if (val.prefix && innerText.length > 0) { val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText)); } - if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) { val.iconName = node.firstChild.data; } - return val; } @@ -4927,12 +5213,10 @@ if (acc.name !== 'class' && acc.name !== 'style') { acc[attr.name] = attr.value; } - return acc; }, {}); const title = node.getAttribute('title'); const titleId = node.getAttribute('data-fa-title-id'); - if (config.autoA11y) { if (title) { extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId()); @@ -4941,7 +5225,6 @@ extraAttributes['focusable'] = 'false'; } } - return extraAttributes; } @@ -4978,7 +5261,7 @@ const extraAttributes = attributesParser(node); const pluginMeta = chainHooks('parseNodeAttributes', {}, node); let extraStyles = parser.styleParser ? styleParser(node) : []; - return { + return _objectSpread2({ iconName, title: node.getAttribute('title'), titleId: node.getAttribute('data-fa-title-id'), @@ -4995,76 +5278,56 @@ classes: extraClasses, styles: extraStyles, attributes: extraAttributes - }, - ...pluginMeta - }; + } + }, pluginMeta); } const { styles: styles$2 } = namespace; - function generateMutation(node) { const nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, { styleParser: false }) : parseMeta(node); - if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) { return callProvided('generateLayersText', node, nodeMeta); } else { return callProvided('generateSvgReplacementMutation', node, nodeMeta); } } - - let knownPrefixes = new Set(); - FAMILIES.map(family => { - knownPrefixes.add("fa-".concat(family)); - }); - Object.keys(PREFIX_TO_STYLE[a]).map(knownPrefixes.add.bind(knownPrefixes)); - Object.keys(PREFIX_TO_STYLE[r]).map(knownPrefixes.add.bind(knownPrefixes)); - Object.keys(PREFIX_TO_STYLE[o]).map(knownPrefixes.add.bind(knownPrefixes)); - knownPrefixes = [...knownPrefixes]; - + function getKnownPrefixes() { + return [...Ft, ...xo]; + } function onTree(root) { let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; if (!IS_DOM) return Promise.resolve(); const htmlClassList = DOCUMENT.documentElement.classList; - const hclAdd = suffix => htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix)); - const hclRemove = suffix => htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix)); - - const prefixes = config.autoFetchSvg ? knownPrefixes : FAMILIES.map(f$$1 => "fa-".concat(f$$1)).concat(Object.keys(styles$2)); - + const prefixes = config.autoFetchSvg ? getKnownPrefixes() : P.concat(Object.keys(styles$2)); if (!prefixes.includes('fa')) { prefixes.push('fa'); } - const prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(p$$1 => ".".concat(p$$1, ":not([").concat(DATA_FA_I2SVG, "])"))).join(', '); - if (prefixesDomQuery.length === 0) { return Promise.resolve(); } - let candidates = []; - try { candidates = toArray(root.querySelectorAll(prefixesDomQuery)); - } catch (e$$1) {// noop + } catch (e$$1) { + // noop } - if (candidates.length > 0) { hclAdd('pending'); hclRemove('complete'); } else { return Promise.resolve(); } - const mark = perf.begin('onTree'); const mutations = candidates.reduce((acc, node) => { try { const mutation = generateMutation(node); - if (mutation) { acc.push(mutation); } @@ -5075,7 +5338,6 @@ } } } - return acc; }, []); return new Promise((resolve, reject) => { @@ -5094,7 +5356,6 @@ }); }); } - function onNode(node) { let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; generateMutation(node).then(mutation => { @@ -5103,7 +5364,6 @@ } }); } - function resolveIcons(next) { return function (maybeIconDefinition) { let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; @@ -5111,17 +5371,14 @@ let { mask } = params; - if (mask) { mask = (mask || {}).icon ? mask : findIconDefinition(mask || {}); } - - return next(iconDefinition, { ...params, + return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, { mask - }); + })); }; } - const render = function (iconDefinition) { let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { @@ -5141,15 +5398,13 @@ iconName, icon } = iconDefinition; - return domVariants({ - type: 'icon', - ...iconDefinition - }, () => { + return domVariants(_objectSpread2({ + type: 'icon' + }, iconDefinition), () => { callHooks('beforeDOMElementCreation', { iconDefinition, params }); - if (config.autoA11y) { if (title) { attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId()); @@ -5158,7 +5413,6 @@ attributes['focusable'] = 'false'; } } - return makeInlineSvgAbstract({ icons: { main: asFoundIcon(icon), @@ -5171,9 +5425,7 @@ }, prefix, iconName, - transform: { ...meaninglessTransform, - ...transform - }, + transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform), symbol, title, maskId, @@ -5192,7 +5444,6 @@ icon: resolveIcons(render) }; }, - hooks() { return { mutationObserverCallbacks(accumulator) { @@ -5200,10 +5451,8 @@ accumulator.nodeCallback = onNode; return accumulator; } - }; }, - provides(providers$$1) { providers$$1.i2svg = function (params) { const { @@ -5212,7 +5461,6 @@ } = params; return onTree(node, callback); }; - providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) { const { iconName, @@ -5251,7 +5499,6 @@ }).catch(reject); }); }; - providers$$1.generateAbstractIcon = function (_ref2) { let { children, @@ -5261,13 +5508,10 @@ styles } = _ref2; const styleString = joinStyles(styles); - if (styleString.length > 0) { attributes['style'] = styleString; } - let nextChild; - if (transformIsMeaningful(transform)) { nextChild = callProvided('generateAbstractTransformGrouping', { main, @@ -5276,7 +5520,6 @@ iconWidth: main.width }); } - children.push(nextChild || main.icon); return { children, @@ -5284,7 +5527,6 @@ }; }; } - }; var Layers = { @@ -5317,10 +5559,8 @@ }]; }); } - }; } - }; var LayersCounter = { @@ -5353,10 +5593,8 @@ }); }); } - }; } - }; var LayersText = { @@ -5381,9 +5619,7 @@ }); return makeLayersTextAbstract({ content, - transform: { ...meaninglessTransform, - ...transform - }, + transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform), title, extra: { attributes, @@ -5393,10 +5629,8 @@ }); }); } - }; }, - provides(providers$$1) { providers$$1.generateLayersText = function (node, nodeMeta) { const { @@ -5406,18 +5640,15 @@ } = nodeMeta; let width = null; let height = null; - if (IS_IE) { const computedFontSize = parseInt(getComputedStyle(node).fontSize, 10); const boundingClientRect = node.getBoundingClientRect(); width = boundingClientRect.width / computedFontSize; height = boundingClientRect.height / computedFontSize; } - if (config.autoA11y && !title) { extra.attributes['aria-hidden'] = 'true'; } - return Promise.resolve([node, makeLayersTextAbstract({ content: node.innerHTML, width, @@ -5429,21 +5660,16 @@ })]); }; } - }; const CLEAN_CONTENT_PATTERN = new RegExp('\u{22}', 'ug'); const SECONDARY_UNICODE_RANGE = [1105920, 1112319]; - const _FONT_FAMILY_WEIGHT_TO_PREFIX = { ...{ - FontAwesome: { - normal: 'fas', - 400: 'fas' - } - }, - ...eo, - ...ao, - ...mo - }; + const _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + FontAwesome: { + normal: 'fas', + 400: 'fas' + } + }), lt), ko), Yt); const FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, key) => { acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key]; return acc; @@ -5469,7 +5695,6 @@ const fontWeightSanitized = isNaN(fontWeightInteger) ? 'normal' : fontWeightInteger; return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized]; } - function replaceForPosition(node, position) { const pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-')); return new Promise((resolve, reject) => { @@ -5477,15 +5702,13 @@ // This node is already being processed return resolve(); } - const children = toArray(node.children); - const alreadyProcessedPseudoElement = children.filter(c => c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0]; + const alreadyProcessedPseudoElement = children.filter(c$$1 => c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0]; const styles = WINDOW.getComputedStyle(node, position); const fontFamily = styles.getPropertyValue('font-family'); const fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN); const fontWeight = styles.getPropertyValue('font-weight'); const content = styles.getPropertyValue('content'); - if (alreadyProcessedPseudoElement && !fontFamilyMatch) { // If we've already processed it but the current computed style does not result in a font-family, // that probably means that a class name that was previously present to make the icon has been @@ -5502,33 +5725,29 @@ const isV4 = fontFamilyMatch[0].startsWith('FontAwesome'); let iconName = byUnicode(prefix, hexValue); let iconIdentifier = iconName; - if (isV4) { const iconName4 = byOldUnicode(hexValue); - if (iconName4.iconName && iconName4.prefix) { iconName = iconName4.iconName; prefix = iconName4.prefix; } - } // Only convert the pseudo element in this ::before/::after position into an icon if we haven't - // already done so with the same prefix and iconName - + } + // Only convert the pseudo element in this ::before/::after position into an icon if we haven't + // already done so with the same prefix and iconName if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) { node.setAttribute(pendingAttribute, iconIdentifier); - if (alreadyProcessedPseudoElement) { // Delete the old one, since we're replacing it with a new one node.removeChild(alreadyProcessedPseudoElement); } - const meta = blankMeta(); const { extra } = meta; extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position; findIcon(iconName, prefix).then(main => { - const abstract = makeInlineSvgAbstract({ ...meta, + const abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, { icons: { main, mask: emptyCanonicalIcon() @@ -5537,16 +5756,14 @@ iconName: iconIdentifier, extra, watchable: true - }); + })); const element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg'); - if (position === '::before') { node.insertBefore(element, node.firstChild); } else { node.appendChild(element); } - - element.outerHTML = abstract.map(a => toHtml(a)).join('\n'); + element.outerHTML = abstract.map(a$$1 => toHtml(a$$1)).join('\n'); node.removeAttribute(pendingAttribute); resolve(); }).catch(reject); @@ -5558,15 +5775,12 @@ } }); } - function replace(node) { return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]); } - function processable(node) { return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg'); } - function searchPseudoElements(root) { if (!IS_DOM) return; return new Promise((resolve, reject) => { @@ -5584,7 +5798,6 @@ }); }); } - var PseudoElements = { hooks() { return { @@ -5592,22 +5805,18 @@ accumulator.pseudoElementsCallback = searchPseudoElements; return accumulator; } - }; }, - provides(providers) { providers.pseudoElements2svg = function (params) { const { node = DOCUMENT } = params; - if (config.searchPseudoElements) { searchPseudoElements(node); } }; } - }; let _unwatched = false; @@ -5619,26 +5828,21 @@ disableObservation(); _unwatched = true; } - } }; }, - hooks() { return { bootstrap() { observe(chainHooks('mutationObserverCallbacks', {})); }, - noAuto() { disconnect(); }, - watch(params) { const { observeMutationsRoot } = params; - if (_unwatched) { enableObservation(); } else { @@ -5647,10 +5851,8 @@ })); } } - }; } - }; const parseTransformString = transformString => { @@ -5666,53 +5868,41 @@ const parts = n.toLowerCase().split('-'); const first = parts[0]; let rest = parts.slice(1).join('-'); - if (first && rest === 'h') { acc.flipX = true; return acc; } - if (first && rest === 'v') { acc.flipY = true; return acc; } - rest = parseFloat(rest); - if (isNaN(rest)) { return acc; } - switch (first) { case 'grow': acc.size = acc.size + rest; break; - case 'shrink': acc.size = acc.size - rest; break; - case 'left': acc.x = acc.x - rest; break; - case 'right': acc.x = acc.x + rest; break; - case 'up': acc.y = acc.y - rest; break; - case 'down': acc.y = acc.y + rest; break; - case 'rotate': acc.rotate = acc.rotate + rest; break; } - return acc; }, transform); }; @@ -5726,22 +5916,17 @@ } }; }, - hooks() { return { parseNodeAttributes(accumulator, node) { const transformString = node.getAttribute('data-fa-transform'); - if (transformString) { accumulator.transform = parseTransformString(transformString); } - return accumulator; } - }; }, - provides(providers) { providers.generateAbstractTransformGrouping = function (_ref) { let { @@ -5769,24 +5954,19 @@ }; return { tag: 'g', - attributes: { ...operations.outer - }, + attributes: _objectSpread2({}, operations.outer), children: [{ tag: 'g', - attributes: { ...operations.inner - }, + attributes: _objectSpread2({}, operations.inner), children: [{ tag: main.icon.tag, children: main.icon.children, - attributes: { ...main.icon.attributes, - ...operations.path - } + attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path) }] }] }; }; } - }; const ALL_SPACE = { @@ -5795,17 +5975,13 @@ width: '100%', height: '100%' }; - function fillBlack(abstract) { let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - if (abstract.attributes && (abstract.attributes.fill || force)) { abstract.attributes.fill = 'black'; } - return abstract; } - function deGroup(abstract) { if (abstract.tag === 'g') { return abstract.children; @@ -5813,26 +5989,21 @@ return [abstract]; } } - var Masks = { hooks() { return { parseNodeAttributes(accumulator, node) { const maskData = node.getAttribute('data-fa-mask'); const mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(i => i.trim())); - if (!mask.prefix) { mask.prefix = getDefaultUsablePrefix(); } - accumulator.mask = mask; accumulator.maskId = node.getAttribute('data-fa-mask-id'); return accumulator; } - }; }, - provides(providers) { providers.generateAbstractMask = function (_ref) { let { @@ -5858,40 +6029,35 @@ }); const maskRect = { tag: 'rect', - attributes: { ...ALL_SPACE, + attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, { fill: 'white' - } + }) }; const maskInnerGroupChildrenMixin = mainPath.children ? { children: mainPath.children.map(fillBlack) } : {}; const maskInnerGroup = { tag: 'g', - attributes: { ...trans.inner - }, - children: [fillBlack({ + attributes: _objectSpread2({}, trans.inner), + children: [fillBlack(_objectSpread2({ tag: mainPath.tag, - attributes: { ...mainPath.attributes, - ...trans.path - }, - ...maskInnerGroupChildrenMixin - })] + attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path) + }, maskInnerGroupChildrenMixin))] }; const maskOuterGroup = { tag: 'g', - attributes: { ...trans.outer - }, + attributes: _objectSpread2({}, trans.outer), children: [maskInnerGroup] }; const maskId = "mask-".concat(explicitMaskId || nextUniqueId()); const clipId = "clip-".concat(explicitMaskId || nextUniqueId()); const maskTag = { tag: 'mask', - attributes: { ...ALL_SPACE, + attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, { id: maskId, maskUnits: 'userSpaceOnUse', maskContentUnits: 'userSpaceOnUse' - }, + }), children: [maskRect, maskOuterGroup] }; const defs = { @@ -5906,12 +6072,11 @@ }; children.push(defs, { tag: 'rect', - attributes: { + attributes: _objectSpread2({ fill: 'currentColor', 'clip-path': "url(#".concat(clipId, ")"), - mask: "url(#".concat(maskId, ")"), - ...ALL_SPACE - } + mask: "url(#".concat(maskId, ")") + }, ALL_SPACE) }); return { children, @@ -5919,17 +6084,14 @@ }; }; } - }; var MissingIconIndicator = { provides(providers) { let reduceMotion = false; - if (WINDOW.matchMedia) { reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches; } - providers.missingIconAbstract = function () { const gChildren = []; const FILL = { @@ -5939,74 +6101,71 @@ attributeType: 'XML', repeatCount: 'indefinite', dur: '2s' - }; // Ring + }; + // Ring gChildren.push({ tag: 'path', - attributes: { ...FILL, + attributes: _objectSpread2(_objectSpread2({}, FILL), {}, { d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' - } + }) }); - const OPACITY_ANIMATE = { ...ANIMATION_BASE, + const OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, { attributeName: 'opacity' - }; + }); const dot = { tag: 'circle', - attributes: { ...FILL, + attributes: _objectSpread2(_objectSpread2({}, FILL), {}, { cx: '256', cy: '364', r: '28' - }, + }), children: [] }; - if (!reduceMotion) { dot.children.push({ tag: 'animate', - attributes: { ...ANIMATION_BASE, + attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, { attributeName: 'r', values: '28;14;28;28;14;28;' - } + }) }, { tag: 'animate', - attributes: { ...OPACITY_ANIMATE, + attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: '1;0;1;1;0;1;' - } + }) }); } - gChildren.push(dot); gChildren.push({ tag: 'path', - attributes: { ...FILL, + attributes: _objectSpread2(_objectSpread2({}, FILL), {}, { opacity: '1', d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' - }, + }), children: reduceMotion ? [] : [{ tag: 'animate', - attributes: { ...OPACITY_ANIMATE, + attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: '1;0;0;0;0;1;' - } + }) }] }); - if (!reduceMotion) { // Exclamation gChildren.push({ tag: 'path', - attributes: { ...FILL, + attributes: _objectSpread2(_objectSpread2({}, FILL), {}, { opacity: '0', d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' - }, + }), children: [{ tag: 'animate', - attributes: { ...OPACITY_ANIMATE, + attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, { values: '0;0;1;1;0;0;' - } + }) }] }); } - return { tag: 'g', attributes: { @@ -6016,7 +6175,6 @@ }; }; } - }; var SvgSymbols = { @@ -6028,10 +6186,8 @@ accumulator['symbol'] = symbol; return accumulator; } - }; } - }; var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols]; diff --git a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.min.js b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.min.js index c6549fdc6..f1b9e0912 100644 --- a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.min.js +++ b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/all.min.js @@ -1,6 +1,6 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ -!function(){"use strict";let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}const{userAgent:s=""}=c.navigator||{};var z=c,a=l,e=(z.document,!a.documentElement||!a.head||"function"!=typeof a.addEventListener||a.createElement,~s.indexOf("MSIE")||s.indexOf("Trident/"),"classic"),L={fak:"kit","fa-kit":"kit"},M={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},t={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},r={kit:"fak"},m={"kit-duotone":"fakd"},a="___FONT_AWESOME___";const C=(()=>{try{return!0}catch(c){return!1}})();function i(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[e]}})}const o={...t};o[e]={...t[e],...L,...M};i(o);const n={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};n[e]={...n[e],...r,...m};m=i(n);const f={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};f[e]={...f[e],fak:"fa-kit"};i(f);const h={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};h[e]={...h[e],"fa-kit":"fak"};i(h),i({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}});const d=new Set;Object.keys(m[e]).map(d.add.bind(d)),Object.keys(m.sharp).map(d.add.bind(d)),Object.keys(m["sharp-duotone"]).map(d.add.bind(d));const u=z||{};u[a]||(u[a]={}),u[a].styles||(u[a].styles={}),u[a].hooks||(u[a].hooks={}),u[a].shims||(u[a].shims=[]);var v=u[a];function p(z){return Object.keys(z).reduce((c,l)=>{var s=z[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function g(c,l,s){var{skipHooks:z=!1}=2{g("fab",b),g("fa-brands",b)})}(),function(){"use strict";let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}const{userAgent:s=""}=c.navigator||{};var z=c,a=l,e=(z.document,!a.documentElement||!a.head||"function"!=typeof a.addEventListener||a.createElement,~s.indexOf("MSIE")||s.indexOf("Trident/"),"classic"),L={fak:"kit","fa-kit":"kit"},M={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},t={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},r={kit:"fak"},m={"kit-duotone":"fakd"},a="___FONT_AWESOME___";const C=(()=>{try{return!0}catch(c){return!1}})();function i(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[e]}})}const o={...t};o[e]={...t[e],...L,...M};i(o);const n={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};n[e]={...n[e],...r,...m};m=i(n);const f={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};f[e]={...f[e],fak:"fa-kit"};i(f);const h={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};h[e]={...h[e],"fa-kit":"fak"};i(h),i({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}});const d=new Set;Object.keys(m[e]).map(d.add.bind(d)),Object.keys(m.sharp).map(d.add.bind(d)),Object.keys(m["sharp-duotone"]).map(d.add.bind(d));const u=z||{};u[a]||(u[a]={}),u[a].styles||(u[a].styles={}),u[a].hooks||(u[a].hooks={}),u[a].shims||(u[a].shims=[]);var v=u[a];function p(z){return Object.keys(z).reduce((c,l)=>{var s=z[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function g(c,l,s){var{skipHooks:z=!1}=2{g("far",b),g("fa-regular",b)})}(),function(){"use strict";let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}const{userAgent:s=""}=c.navigator||{};var z=c,a=l,e=(z.document,!a.documentElement||!a.head||"function"!=typeof a.addEventListener||a.createElement,~s.indexOf("MSIE")||s.indexOf("Trident/"),"classic"),L={fak:"kit","fa-kit":"kit"},M={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},t={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},r={kit:"fak"},m={"kit-duotone":"fakd"},a="___FONT_AWESOME___";const C=(()=>{try{return!0}catch(c){return!1}})();function i(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[e]}})}const o={...t};o[e]={...t[e],...L,...M};i(o);const n={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};n[e]={...n[e],...r,...m};m=i(n);const f={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};f[e]={...f[e],fak:"fa-kit"};i(f);const h={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};h[e]={...h[e],"fa-kit":"fak"};i(h),i({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}});const d=new Set;Object.keys(m[e]).map(d.add.bind(d)),Object.keys(m.sharp).map(d.add.bind(d)),Object.keys(m["sharp-duotone"]).map(d.add.bind(d));const u=z||{};u[a]||(u[a]={}),u[a].styles||(u[a].styles={}),u[a].hooks||(u[a].hooks={}),u[a].shims||(u[a].shims=[]);var v=u[a];function p(z){return Object.keys(z).reduce((c,l)=>{var s=z[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function g(c,l,s){var{skipHooks:z=!1}=2{g("fas",b),g("fa-solid",b)})}(),function(){"use strict";var c=()=>{};let l={},s={},z=null,a={mark:c,measure:c};try{"undefined"!=typeof window&&(l=window),"undefined"!=typeof document&&(s=document),"undefined"!=typeof MutationObserver&&(z=MutationObserver),"undefined"!=typeof performance&&(a=performance)}catch(c){}const{userAgent:e=""}=l.navigator||{},g=l,b=s,t=z;var L=a;const M=!!g.document,m=!!b.documentElement&&!!b.head&&"function"==typeof b.addEventListener&&"function"==typeof b.createElement,C=~e.indexOf("MSIE")||~e.indexOf("Trident/");var r="classic",i="duotone",o="sharp",n="sharp-duotone",f=[r,i,o,n],h={fak:"kit","fa-kit":"kit"},d={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},u={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},v=[1,2,3,4,5,6,7,8,9,10],p=v.concat([11,12,13,14,15,16,17,18,19,20]),H={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},V=[...Object.keys({classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",H.GROUP,H.SWAP_OPACITY,H.PRIMARY,H.SECONDARY].concat(v.map(c=>"".concat(c,"x"))).concat(p.map(c=>"w-".concat(c))),c={kit:"fak"},v={"kit-duotone":"fakd"},p="___FONT_AWESOME___";const k=16,w="svg-inline--fa",y="data-fa-i2svg",A="data-fa-pseudo-element",S="data-fa-pseudo-element-pending",x="data-prefix",q="data-icon",Z="fontawesome-i2svg",j="async",O=["HTML","HEAD","STYLE","SCRIPT"],N=(()=>{try{return!0}catch(c){return!1}})(),P=[r,o,n];function E(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[r]}})}const F={...u};F[r]={...u[r],...h,...d};const I=E(F),T={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};T[r]={...T[r],...c,...v};const R=E(T),D={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};D[r]={...D[r],fak:"fa-kit"};const _=E(D),Y={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};Y[r]={...Y[r],"fa-kit":"fak"};const W=E(Y),B=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,U="fa-layers-text",X=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;E({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}});const G=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Q=H,K=new Set;Object.keys(R[r]).map(K.add.bind(K)),Object.keys(R[o]).map(K.add.bind(K)),Object.keys(R[n]).map(K.add.bind(K));const J=["kit",...V],$=g.FontAwesomeConfig||{};if(b&&"function"==typeof b.querySelector){const U2=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];U2.forEach(c=>{var[l,c]=c,l=""===(l=function(c){var l=b.querySelector("script["+c+"]");if(l)return l.getAttribute(c)}(l))||"false"!==l&&("true"===l||l);null!=l&&($[c]=l)})}v={styleDefault:"solid",familyDefault:"classic",cssPrefix:"fa",replacementClass:w,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};$.familyPrefix&&($.cssPrefix=$.familyPrefix);const c1={...v,...$};c1.autoReplaceSvg||(c1.observeMutations=!1);const l1={};Object.keys(v).forEach(l=>{Object.defineProperty(l1,l,{enumerable:!0,set:function(c){c1[l]=c,s1.forEach(c=>c(l1))},get:function(){return c1[l]}})}),Object.defineProperty(l1,"familyPrefix",{enumerable:!0,set:function(c){c1.cssPrefix=c,s1.forEach(c=>c(l1))},get:function(){return c1.cssPrefix}}),g.FontAwesomeConfig=l1;const s1=[];const z1=k,a1={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};const e1="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function L1(){let c=12,l="";for(;0>>0;c--;)s[c]=l[c];return s}function t1(c){return c.classList?M1(c.classList):(c.getAttribute("class")||"").split(" ").filter(c=>c)}function r1(c){return"".concat(c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function m1(s){return Object.keys(s||{}).reduce((c,l)=>c+"".concat(l,": ").concat(s[l].trim(),";"),"")}function C1(c){return c.size!==a1.size||c.x!==a1.x||c.y!==a1.y||c.rotate!==a1.rotate||c.flipX||c.flipY}function i1(){var c,l,s=w,z=l1.cssPrefix,a=l1.replacementClass;let e=':host,:root{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone"}svg:not(:host).svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible;box-sizing:content-box}.svg-inline--fa{display:var(--fa-display,inline-block);height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.0714285705em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);overflow:hidden;padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:top right}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom right}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);right:auto;top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom left}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top right}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top left}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.0833333337em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.0714285718em;vertical-align:.0535714295em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.0416666682em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:var(--fa-li-margin,2.5em);padding-left:0}.fa-ul>li{position:relative}.fa-li{left:calc(-1 * var(--fa-li-width,2em));position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{animation-delay:-1ms;animation-duration:1ms;animation-iteration-count:1;transition-delay:0s;transition-duration:0s}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1,1) translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1,1) translateY(0)}100%{transform:scale(1,1) translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}24%,8%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}100%,40%{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{display:inline-block;vertical-align:middle;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;z-index:var(--fa-stack-z-index,auto)}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:var(--fa-inverse,#fff)}.fa-sr-only,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fa-sr-only-focusable:not(:focus),.sr-only-focusable:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}.fa-duotone.fa-inverse,.fad.fa-inverse{color:var(--fa-inverse,#fff)}';return"fa"===z&&a===s||(c=new RegExp("\\.".concat("fa","\\-"),"g"),l=new RegExp("\\--".concat("fa","\\-"),"g"),s=new RegExp("\\.".concat(s),"g"),e=e.replace(c,".".concat(z,"-")).replace(l,"--".concat(z,"-")).replace(s,".".concat(a))),e}let o1=!1;function n1(){l1.autoAddCss&&!o1&&(function(c){if(c&&m){const a=b.createElement("style");a.setAttribute("type","text/css"),a.innerHTML=c;var s=b.head.childNodes;let l=null;for(let c=s.length-1;-1c())}const u1=[];let v1=!1;function p1(c){m&&(v1?setTimeout(c,0):u1.push(c))}function g1(c){const{tag:l,attributes:s={},children:z=[]}=c;return"string"==typeof c?r1(c):"<".concat(l," ").concat((a=s,Object.keys(a||{}).reduce((c,l)=>c+"".concat(l,'="').concat(r1(a[l]),'" '),"").trim()),">").concat(z.map(g1).join(""),"");var a}function b1(c,l,s){if(c&&c[l]&&c[l][s])return{prefix:l,iconName:s,icon:c[l][s]}}m&&(v1=(b.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(b.readyState),v1||b.addEventListener("DOMContentLoaded",d1));function H1(c,l,s,z){for(var a,e,L=Object.keys(c),M=L.length,t=void 0!==z?V1(l,z):l,r=void 0===s?(a=1,c[L[0]]):(a=0,s);a{var s=z[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function y1(c,l,s){var{skipHooks:z=!1}=2{var c=z=>H1(A1,(c,l,s)=>(c[s]=H1(l,z,{}),c),{});Z1=c((l,c,s)=>{if(c[3]&&(l[c[3]]=s),c[2]){const z=c[2].filter(c=>"number"==typeof c);z.forEach(c=>{l[c.toString(16)]=s})}return l}),j1=c((l,c,s)=>{if(l[s]=s,c[2]){const z=c[2].filter(c=>"string"==typeof c);z.forEach(c=>{l[c]=s})}return l}),P1=c((l,c,s)=>{const z=c[2];return l[s]=s,z.forEach(c=>{l[c]=s}),l});const a="far"in A1||l1.autoFetchSvg;c=H1(S1,(c,l)=>{const s=l[0];let z=l[1];l=l[2];return"far"!==z||a||(z="fas"),"string"==typeof s&&(c.names[s]={prefix:z,iconName:l}),"number"==typeof s&&(c.unicodes[s.toString(16)]={prefix:z,iconName:l}),c},{names:{},unicodes:{}});O1=c.names,N1=c.unicodes,q1=Y1(l1.styleDefault,{family:l1.familyDefault})};function T1(c,l){return(Z1[c]||{})[l]}function R1(c,l){return(P1[c]||{})[l]}function D1(c){return O1[c]||{prefix:null,iconName:null}}V=c=>{q1=Y1(c.styleDefault,{family:l1.familyDefault})},s1.push(V),I1();const _1=()=>({prefix:null,iconName:null,rest:[]});function Y1(c,l){var{family:s=r}=1c!==i);t.forEach(l=>{(c.includes(e[l])||c.some(c=>W1[l].includes(c)))&&(M=l)});const s=c.reduce((c,l)=>{var s,z=F1(l1.cssPrefix,l);return A1[l]?(l=x1[M].includes(l)?W[M][l]:l,L=l,c.prefix=l):-1l===e[c])||c.rest.push(l),!a&&c.prefix&&c.iconName&&(s="fa"===L?D1(c.iconName):{},z=R1(c.prefix,c.iconName),s.prefix&&(L=null),c.iconName=s.iconName||z||c.iconName,c.prefix=s.prefix||c.prefix,"far"!==c.prefix||A1.far||!A1.fas||l1.autoFetchSvg||(c.prefix="fas")),c},_1());return(c.includes("fa-brands")||c.includes("fab"))&&(s.prefix="fab"),(c.includes("fa-duotone")||c.includes("fad"))&&(s.prefix="fad"),s.prefix||M!==o||!A1.fass&&!l1.autoFetchSvg||(s.prefix="fass",s.iconName=R1(s.prefix,s.iconName)||s.iconName),s.prefix||M!==n||!A1.fasds&&!l1.autoFetchSvg||(s.prefix="fasds",s.iconName=R1(s.prefix,s.iconName)||s.iconName),"fa"!==s.prefix&&"fa"!==L||(s.prefix=q1||"fas"),s}let U1=[],X1={};const G1={},Q1=Object.keys(G1);function K1(c,l){for(var s=arguments.length,z=new Array(2{l=c.apply(null,[l,...z])}),l}function J1(c){for(var l=arguments.length,s=new Array(1{c.apply(null,s)})}function $1(c){var l=c,c=Array.prototype.slice.call(arguments,1);return G1[l]?G1[l].apply(null,c):void 0}function c2(c){"fa"===c.prefix&&(c.prefix="fas");let l=c["iconName"];c=c.prefix||q1;if(l)return l=R1(c,l)||l,b1(l2.definitions,c,l)||b1(h1.styles,c,l)}const l2=new class{constructor(){this.definitions={}}add(){for(var c=arguments.length,l=new Array(c),s=0;s{this.definitions[c]={...this.definitions[c]||{},...z[c]},y1(c,z[c]);var l=_[r][c];l&&y1(l,z[c]),I1()})}reset(){this.definitions={}}_pullDefinitions(e,c){const L=c.prefix&&c.iconName&&c.icon?{0:c}:c;return Object.keys(L).map(c=>{const{prefix:l,iconName:s,icon:z}=L[c],a=z[2];e[l]||(e[l]={}),0{"string"==typeof c&&(e[l][c]=z)}),e[l][s]=z}),e}};const s2={noAuto:()=>{l1.autoReplaceSvg=!1,l1.observeMutations=!1,J1("noAuto")},config:l1,dom:{i2svg:function(){var c=0{z2({autoReplaceSvgRoot:l}),J1("watch",c)})}},parse:{icon:c=>{if(null===c)return null;if("object"==typeof c&&c.prefix&&c.iconName)return{prefix:c.prefix,iconName:R1(c.prefix,c.iconName)||c.iconName};if(Array.isArray(c)&&2===c.length){var l=0===c[1].indexOf("fa-")?c[1].slice(3):c[1],s=Y1(c[0]);return{prefix:s,iconName:R1(s,l)||l}}if("string"==typeof c&&(-1g1(c))}}),Object.defineProperty(l,"node",{get:function(){if(m){const c=b.createElement("div");return c.innerHTML=l.html,c.children}}}),l}function e2(c){const{icons:{main:l,mask:s},prefix:z,iconName:a,transform:e,symbol:L,title:M,maskId:t,titleId:r,extra:m,watchable:C=!1}=c;var{width:i,height:o}=s.found?s:l,n="fak"===z,c=[l1.replacementClass,a?"".concat(l1.cssPrefix,"-").concat(a):""].filter(c=>-1===m.classes.indexOf(c)).filter(c=>""!==c||!!c).concat(m.classes).join(" ");let f={children:[],attributes:{...m.attributes,"data-prefix":z,"data-icon":a,class:c,role:m.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(i," ").concat(o)}};i=n&&!~m.classes.indexOf("fa-fw")?{width:"".concat(i/o*16*.0625,"em")}:{};C&&(f.attributes[y]=""),M&&(f.children.push({tag:"title",attributes:{id:f.attributes["aria-labelledby"]||"title-".concat(r||L1())},children:[M]}),delete f.attributes.title);const h={...f,prefix:z,iconName:a,main:l,mask:s,maskId:t,transform:e,symbol:L,styles:{...i,...m.styles}};var{children:o,attributes:i}=s.found&&l.found?$1("generateAbstractMask",h)||{children:[],attributes:{}}:$1("generateAbstractIcon",h)||{children:[],attributes:{}};return h.children=o,h.attributes=i,(L?function(c){var{prefix:l,iconName:s,children:z,attributes:a,symbol:c}=c,c=!0===c?"".concat(l,"-").concat(l1.cssPrefix,"-").concat(s):c;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:{...a,id:c},children:z}]}]}:function(c){let{children:l,main:s,mask:z,attributes:a,styles:e,transform:L}=c;if(C1(L)&&s.found&&!z.found){var{width:M,height:c}=s;const t=M/c/2,r=.5;a.style=m1({...e,"transform-origin":"".concat(t+L.x/16,"em ").concat(r+L.y/16,"em")})}return[{tag:"svg",attributes:a,children:l}]})(h)}function L2(c){const{content:l,width:s,height:z,transform:a,title:e,extra:L,watchable:M=!1}=c,t={...L.attributes,...e?{title:e}:{},class:L.classes.join(" ")};M&&(t[y]="");const r={...L.styles};C1(a)&&(r.transform=function(c){var{transform:l,width:s=k,height:z=k,startCentered:c=!1}=c;let a="";return c&&C?a+="translate(".concat(l.x/z1-s/2,"em, ").concat(l.y/z1-z/2,"em) "):a+=c?"translate(calc(-50% + ".concat(l.x/z1,"em), calc(-50% + ").concat(l.y/z1,"em)) "):"translate(".concat(l.x/z1,"em, ").concat(l.y/z1,"em) "),a+="scale(".concat(l.size/z1*(l.flipX?-1:1),", ").concat(l.size/z1*(l.flipY?-1:1),") "),a+="rotate(".concat(l.rotate,"deg) "),a}({transform:a,startCentered:!0,width:s,height:z}),r["-webkit-transform"]=r.transform);c=m1(r);0{var s,z;if("fa"===L&&(z=D1(a)||{},a=z.iconName||a,e=z.prefix||e),a&&e&&M2[e]&&M2[e][a])return c(t2(M2[e][a]));s=a,z=e,N||l1.showMissingIcons||!s||console.error('Icon with name "'.concat(s,'" and prefix "').concat(z,'" is missing.')),c({...r2,icon:l1.showMissingIcons&&a&&$1("missingIconAbstract")||{}})})}v=()=>{};const C2=l1.measurePerformance&&L&&L.mark&&L.measure?L:{mark:v,measure:v},i2='FA "6.6.0"';const o2=c=>{C2.mark("".concat(i2," ").concat(c," ends")),C2.measure("".concat(i2," ").concat(c),"".concat(i2," ").concat(c," begins"),"".concat(i2," ").concat(c," ends"))};var n2={begin:c=>(C2.mark("".concat(i2," ").concat(c," begins")),()=>o2(c)),end:o2};const f2=()=>{};function h2(c){return"string"==typeof(c.getAttribute?c.getAttribute(y):null)}function d2(l,c){const{ceFn:s="svg"===l.tag?function(c){return b.createElementNS("http://www.w3.org/2000/svg",c)}:function(c){return b.createElement(c)}}=1{l.parentNode.insertBefore(d2(c),l)}),null===l.getAttribute(y)&&l1.keepOriginalSource?(c=b.createComment((c=l,c=" ".concat(c.outerHTML," "),c="".concat(c,"Font Awesome fontawesome.com "))),l.parentNode.replaceChild(c,l)):l.remove())},nest:function(c){const l=c[0],s=c[1];if(~t1(l).indexOf(l1.replacementClass))return u2.replace(c);const z=new RegExp("".concat(l1.cssPrefix,"-.*"));if(delete s[0].attributes.id,s[0].attributes.class){const a=s[0].attributes.class.split(" ").reduce((c,l)=>((l===l1.replacementClass||l.match(z)?c.toSvg:c.toNode).push(l),c),{toNode:[],toSvg:[]});s[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?l.removeAttribute("class"):l.setAttribute("class",a.toNode.join(" "))}c=s.map(c=>g1(c)).join("\n");l.setAttribute(y,""),l.innerHTML=c}};function v2(c){c()}function p2(s,c){const z="function"==typeof c?c:f2;if(0===s.length)z();else{let c=v2;l1.mutateApproach===j&&(c=g.requestAnimationFrame||v2),c(()=>{var c=!0!==l1.autoReplaceSvg&&u2[l1.autoReplaceSvg]||u2.replace;const l=n2.begin("mutate");s.map(c),l(),z()})}}let g2=!1;function b2(){g2=!0}function H2(){g2=!1}let V2=null;function k2(c){if(!t)return;if(!l1.observeMutations)return;const{treeCallback:e=f2,nodeCallback:L=f2,pseudoElementsCallback:M=f2,observeMutationsRoot:l=b}=c;V2=new t(c=>{if(!g2){const a=q1;M1(c).forEach(c=>{var l,s,z;"childList"===c.type&&0("class"!==c.name&&"style"!==c.name&&(c[l.name]=l.value),c),{});var s=c.getAttribute("title"),c=c.getAttribute("data-fa-title-id");return l1.autoA11y&&(s?l["aria-labelledby"]="".concat(l1.replacementClass,"-title-").concat(c||L1()):(l["aria-hidden"]="true",l.focusable="false")),l}(c),l=K1("parseNodeAttributes",{},c),s=s.styleParser?function(c){const l=c.getAttribute("style");let s=[];return l&&(s=l.split(";").reduce((c,l)=>{const s=l.split(":");l=s[0];const z=s.slice(1);return l&&0l.add("".concat(Z,"-").concat(c)),e=c=>l.remove("".concat(Z,"-").concat(c)),s=l1.autoFetchSvg?x2:P.map(c=>"fa-".concat(c)).concat(Object.keys(A2));s.includes("fa")||s.push("fa");var L=[".".concat(U,":not([").concat(y,"])")].concat(s.map(c=>".".concat(c,":not([").concat(y,"])"))).join(", ");if(0===L.length)return Promise.resolve();let M=[];try{M=M1(c.querySelectorAll(L))}catch(c){}if(!(0{try{var s=S2(l);s&&c.push(s)}catch(c){N||"MissingIcon"===c.name&&console.error(c)}return c},[]);return new Promise((l,s)=>{Promise.all(r).then(c=>{p2(c,()=>{a("active"),a("complete"),e("pending"),"function"==typeof z&&z(),t(),l()})}).catch(c=>{t(),s(c)})})}function Z2(c){let l=1{c&&p2([c],l)})}P.map(c=>{x2.add("fa-".concat(c))}),Object.keys(I[r]).map(x2.add.bind(x2)),Object.keys(I[o]).map(x2.add.bind(x2)),Object.keys(I[n]).map(x2.add.bind(x2)),x2=[...x2];function j2(c){let l=1(J1("beforeDOMElementCreation",{iconDefinition:c,params:l}),l1.autoA11y&&(L?r["aria-labelledby"]="".concat(l1.replacementClass,"-title-").concat(M||L1()):(r["aria-hidden"]="true",r.focusable="false")),e2({icons:{main:t2(o),mask:a?t2(a.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:i,transform:{...a1,...s},symbol:z,title:L,maskId:e,titleId:M,extra:{attributes:r,styles:m,classes:t}})))}}p={mixout(){return{icon:(z=j2,function(c){var l=1{}}=c;return q2(l,c)},c.generateSvgReplacementMutation=function(z,c){const{iconName:a,title:e,titleId:L,prefix:M,transform:t,symbol:r,mask:l,maskId:m,extra:C}=c;return new Promise((s,c)=>{Promise.all([m2(a,M),l.iconName?m2(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(c=>{var[l,c]=c;s([z,e2({icons:{main:l,mask:c},prefix:M,iconName:a,transform:t,symbol:r,maskId:m,title:e,titleId:L,extra:C,watchable:!0})])}).catch(c)})},c.generateAbstractIcon=function(c){let{children:l,attributes:s,main:z,transform:a,styles:e}=c;c=m1(e);0{J1("beforeDOMElementCreation",{assembler:c,params:s});let l=[];return c(c=>{Array.isArray(c)?c.map(c=>{l=l.concat(c.abstract)}):l=l.concat(c.abstract)}),[{tag:"span",attributes:{class:["".concat(l1.cssPrefix,"-layers"),...z].join(" ")},children:l}]})}}}},L={mixout(){return{counter(c){let l=1(J1("beforeDOMElementCreation",{content:c,params:l}),function(c){const{content:l,title:s,extra:z}=c,a={...z.attributes,...s?{title:s}:{},class:z.classes.join(" ")};0<(c=m1(z.styles)).length&&(a.style=c);const e=[];return e.push({tag:"span",attributes:a,children:[l]}),s&&e.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),e}({content:c.toString(),title:s,extra:{attributes:a,styles:e,classes:["".concat(l1.cssPrefix,"-layers-counter"),...z]}})))}}}},v={mixout(){return{text(c){let l=1(J1("beforeDOMElementCreation",{content:c,params:l}),L2({content:c,transform:{...a1,...s},title:z,extra:{attributes:e,styles:L,classes:["".concat(l1.cssPrefix,"-layers-text"),...a]}})))}}},provides(c){c.generateLayersText=function(c,l){const{title:s,transform:z,extra:a}=l;let e=null,L=null;var M;return C&&(M=parseInt(getComputedStyle(c).fontSize,10),l=c.getBoundingClientRect(),e=l.width/M,L=l.height/M),l1.autoA11y&&!s&&(a.attributes["aria-hidden"]="true"),Promise.resolve([c,L2({content:c.innerHTML,width:e,height:L,transform:z,title:s,extra:a,watchable:!0})])}}};const O2=new RegExp('"',"ug"),N2=[1105920,1112319],P2={FontAwesome:{normal:"fas",400:"fas"},"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"},"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"},"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},E2=Object.keys(P2).reduce((c,l)=>(c[l.toLowerCase()]=P2[l],c),{}),F2=Object.keys(E2).reduce((c,l)=>{var s=E2[l];return c[l]=s[900]||[...Object.entries(s)][0][1],c},{});function I2(u,v){const p="".concat(S).concat(v.replace(":","-"));return new Promise((e,l)=>{if(null!==u.getAttribute(p))return e();const c=M1(u.children),s=c.filter(c=>c.getAttribute(A)===v)[0],L=g.getComputedStyle(u,v),M=L.getPropertyValue("font-family"),t=M.match(X);var r,m,C=L.getPropertyValue("font-weight");const i=L.getPropertyValue("content");if(s&&!t)return u.removeChild(s),e();if(t&&"none"!==i&&""!==i){const i=L.getPropertyValue("content");let z=(r=M,m=C,r=r.replace(/^['"]|['"]$/g,"").toLowerCase(),m=parseInt(m),m=isNaN(m)?"normal":m,(E2[r]||{})[m]||F2[r]);var{value:o,isSecondary:n}=(f=i,o=f.replace(O2,""),C=0,r=(m=o).length,f=(n=55296<=(f=m.charCodeAt(C))&&f<=56319&&C+1=N2[0]&&n<=N2[1],{value:k1((n=2===o.length&&o[0]===o[1])?o[0]:o),isSecondary:f||n}),f=t[0].startsWith("FontAwesome");let c=T1(z,o),a=c;if(f&&(f=o,o=N1[f],f=T1("fas",f),(f=o||(f?{prefix:"fas",iconName:f}:null)||{prefix:null,iconName:null}).iconName&&f.prefix&&(c=f.iconName,z=f.prefix)),!c||n||s&&s.getAttribute(x)===z&&s.getAttribute(q)===a)e();else{u.setAttribute(p,a),s&&u.removeChild(s);const h={iconName:null,title:null,titleId:null,prefix:null,transform:a1,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},d=h["extra"];d.attributes[A]=v,m2(c,z).then(c=>{const l=e2({...h,icons:{main:c,mask:_1()},prefix:z,iconName:a,extra:d,watchable:!0}),s=b.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===v?u.insertBefore(s,u.firstChild):u.appendChild(s),s.outerHTML=l.map(c=>g1(c)).join("\n"),u.removeAttribute(p),e()}).catch(l)}}else e()})}function T2(c){return Promise.all([I2(c,"::before"),I2(c,"::after")])}function R2(c){return!(c.parentNode===document.head||~O.indexOf(c.tagName.toUpperCase())||c.getAttribute(A)||c.parentNode&&"svg"===c.parentNode.tagName)}function D2(a){if(m)return new Promise((c,l)=>{var s=M1(a.querySelectorAll("*")).filter(R2).map(T2);const z=n2.begin("searchPseudoElements");b2(),Promise.all(s).then(()=>{z(),H2(),c()}).catch(()=>{z(),H2(),l()})})}let _2=!1;const Y2=c=>{return c.toLowerCase().split(" ").reduce((c,l)=>{const s=l.toLowerCase().split("-");l=s[0];let z=s.slice(1).join("-");if(l&&"h"===z)return c.flipX=!0,c;if(l&&"v"===z)return c.flipY=!0,c;if(z=parseFloat(z),isNaN(z))return c;switch(l){case"grow":c.size=c.size+z;break;case"shrink":c.size=c.size-z;break;case"left":c.x=c.x-z;break;case"right":c.x=c.x+z;break;case"up":c.y=c.y-z;break;case"down":c.y=c.y+z;break;case"rotate":c.rotate=c.rotate+z}return c},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},W2={x:0,y:0,width:"100%",height:"100%"};function B2(c){return c.attributes&&(c.attributes.fill||(!(1{-1===Q1.indexOf(c)&&delete G1[c]}),U1.forEach(c=>{const s=c.mixout?c.mixout():{};if(Object.keys(s).forEach(l=>{"function"==typeof s[l]&&(z[l]=s[l]),"object"==typeof s[l]&&Object.keys(s[l]).forEach(c=>{z[l]||(z[l]={}),z[l][c]=s[l][c]})}),c.hooks){const l=c.hooks();Object.keys(l).forEach(c=>{X1[c]||(X1[c]=[]),X1[c].push(l[c])})}c.provides&&c.provides(G1)}),z}([H,p,V,L,v,{hooks(){return{mutationObserverCallbacks(c){return c.pseudoElementsCallback=D2,c}}},provides(c){c.pseudoElements2svg=function(c){var{node:c=b}=c;l1.searchPseudoElements&&D2(c)}}},{mixout(){return{dom:{unwatch(){b2(),_2=!0}}}},hooks(){return{bootstrap(){k2(K1("mutationObserverCallbacks",{}))},noAuto(){V2&&V2.disconnect()},watch(c){c=c.observeMutationsRoot;_2?H2():k2(K1("mutationObserverCallbacks",{observeMutationsRoot:c}))}}}},{mixout(){return{parse:{transform:c=>Y2(c)}}},hooks(){return{parseNodeAttributes(c,l){l=l.getAttribute("data-fa-transform");return l&&(c.transform=Y2(l)),c}}},provides(c){c.generateAbstractTransformGrouping=function(c){var{main:l,transform:s,containerWidth:z,iconWidth:a}=c,e={transform:"translate(".concat(z/2," 256)")},c="translate(".concat(32*s.x,", ").concat(32*s.y,") "),z="scale(".concat(s.size/16*(s.flipX?-1:1),", ").concat(s.size/16*(s.flipY?-1:1),") "),s="rotate(".concat(s.rotate," 0 0)");const L=e,M={transform:"".concat(c," ").concat(z," ").concat(s)},t={transform:"translate(".concat(a/2*-1," -256)")};return{tag:"g",attributes:{...L},children:[{tag:"g",attributes:{...M},children:[{tag:l.icon.tag,children:l.icon.children,attributes:{...l.icon.attributes,...t}}]}]}}}},{hooks(){return{parseNodeAttributes(c,l){const s=l.getAttribute("data-fa-mask"),z=s?B1(s.split(" ").map(c=>c.trim())):_1();return z.prefix||(z.prefix=q1),c.mask=z,c.maskId=l.getAttribute("data-fa-mask-id"),c}}},provides(c){c.generateAbstractMask=function(c){let{children:l,attributes:s,main:z,mask:a,maskId:e,transform:L}=c;const{width:M,icon:t}=z;var{width:r,icon:m}=a,C=function(c){var{transform:l,containerWidth:s,iconWidth:z}=c,a={transform:"translate(".concat(s/2," 256)")},c="translate(".concat(32*l.x,", ").concat(32*l.y,") "),s="scale(".concat(l.size/16*(l.flipX?-1:1),", ").concat(l.size/16*(l.flipY?-1:1),") "),l="rotate(".concat(l.rotate," 0 0)");return{outer:a,inner:{transform:"".concat(c," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(z/2*-1," -256)")}}}({transform:L,containerWidth:r,iconWidth:M}),i={tag:"rect",attributes:{...W2,fill:"white"}},c=t.children?{children:t.children.map(B2)}:{},r={tag:"g",attributes:{...C.inner},children:[B2({tag:t.tag,attributes:{...t.attributes,...C.path},...c})]},c={tag:"g",attributes:{...C.outer},children:[r]},C="mask-".concat(e||L1()),r="clip-".concat(e||L1()),c={tag:"mask",attributes:{...W2,id:C,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"},children:[i,c]},c={tag:"defs",children:[{tag:"clipPath",attributes:{id:r},children:"g"===(m=m).tag?m.children:[m]},c]};return l.push(c,{tag:"rect",attributes:{fill:"currentColor","clip-path":"url(#".concat(r,")"),mask:"url(#".concat(C,")"),...W2}}),{children:l,attributes:s}}}},{provides(c){let e=!1;g.matchMedia&&(e=g.matchMedia("(prefers-reduced-motion: reduce)").matches),c.missingIconAbstract=function(){const c=[];var l={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};c.push({tag:"path",attributes:{...l,d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}});var z={...s,attributeName:"opacity"};const a={tag:"circle",attributes:{...l,cx:"256",cy:"364",r:"28"},children:[]};return e||a.children.push({tag:"animate",attributes:{...s,attributeName:"r",values:"28;14;28;28;14;28;"}},{tag:"animate",attributes:{...z,values:"1;0;1;1;0;1;"}}),c.push(a),c.push({tag:"path",attributes:{...l,opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"},children:e?[]:[{tag:"animate",attributes:{...z,values:"1;0;0;0;0;1;"}}]}),e||c.push({tag:"path",attributes:{...l,opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"},children:[{tag:"animate",attributes:{...z,values:"0;0;1;1;0;0;"}}]}),{tag:"g",attributes:{class:"missing"},children:c}}}},{hooks(){return{parseNodeAttributes(c,l){l=l.getAttribute("data-fa-symbol");return c.symbol=null!==l&&(""===l||l),c}}}}],{mixoutsTo:s2}),function(c){try{for(var l=arguments.length,s=new Array(1{z2(),J1("bootstrap")})),h1.hooks={...h1.hooks,addPack:(c,l)=>{h1.styles[c]={...h1.styles[c]||{},...l},I1(),z2()},addPacks:c=>{c.forEach(c=>{var[l,c]=c;h1.styles[l]={...h1.styles[l]||{},...c}}),I1(),z2()},addShims:c=>{h1.shims.push(...c),I1(),z2()}}})}(); \ No newline at end of file +{let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var{userAgent:Z1=""}=c.navigator||{},O1=c,j1=l;function n(c,l,s){(l=(c=>"symbol"==typeof(c=((c,l)=>{if("object"!=typeof c||!c)return c;var s=c[Symbol.toPrimitive];if(void 0===s)return("string"===l?String:Number)(c);if("object"!=typeof(s=s.call(c,l||"default")))return s;throw new TypeError("@@toPrimitive must return a primitive value.")})(c,"string"))?c:c+"")(l))in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s}function h(l,c){var s,a=Object.keys(l);return Object.getOwnPropertySymbols&&(s=Object.getOwnPropertySymbols(l),c&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),a.push.apply(a,s)),a}function e(l){for(var c=1;c{try{return!0}catch(c){return!1}})();function a(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[s]}})}var F1,L=((F1=e({},j1))[s]=e(e(e(e({},{"fa-duotone":"duotone"}),j1[s]),Z1),P1),a(F1),(j1=e({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}}))[s]=e(e(e(e({},{duotone:"fad"}),j1[s]),N1),E1),a(j1),(Z1=e({},{classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}}))[s]=e(e({},Z1[s]),{fak:"fa-kit"}),a(Z1),(P1=e({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}}))[s]=e(e({},P1[s]),{"fa-kit":"fak"}),a(P1),a(e({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),(F1=O1||{})[I1]||(F1[I1]={}),F1[I1].styles||(F1[I1].styles={}),F1[I1].hooks||(F1[I1].hooks={}),F1[I1].shims||(F1[I1].shims=[]),F1[I1]);function d(a){return Object.keys(a).reduce((c,l)=>{var s=a[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function u(c,l,s){var{skipHooks:s=!1}=2{u("fab",v),u("fa-brands",v)})}{let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var{userAgent:N1=""}=c.navigator||{},E1=c,j1=l;function p(c,l,s){(l=(c=>"symbol"==typeof(c=((c,l)=>{if("object"!=typeof c||!c)return c;var s=c[Symbol.toPrimitive];if(void 0===s)return("string"===l?String:Number)(c);if("object"!=typeof(s=s.call(c,l||"default")))return s;throw new TypeError("@@toPrimitive must return a primitive value.")})(c,"string"))?c:c+"")(l))in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s}function g(l,c){var s,a=Object.keys(l);return Object.getOwnPropertySymbols&&(s=Object.getOwnPropertySymbols(l),c&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),a.push.apply(a,s)),a}function t(l){for(var c=1;c{try{return!0}catch(c){return!1}})();function r(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[M]}})}(I1=t({},j1))[M]=t(t(t(t({},{"fa-duotone":"duotone"}),j1[M]),N1),Z1),r(I1),(j1=t({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}}))[M]=t(t(t(t({},{duotone:"fad"}),j1[M]),P1),O1),r(j1),(N1=t({},{classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}}))[M]=t(t({},N1[M]),{fak:"fa-kit"}),r(N1),(Z1=t({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}}))[M]=t(t({},Z1[M]),{"fa-kit":"fak"}),r(Z1),r(t({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),(I1=E1||{})[F1]||(I1[F1]={}),I1[F1].styles||(I1[F1].styles={}),I1[F1].hooks||(I1[F1].hooks={}),I1[F1].shims||(I1[F1].shims=[]);var m=I1[F1];function b(a){return Object.keys(a).reduce((c,l)=>{var s=a[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function H(c,l,s){var{skipHooks:s=!1}=2{H("far",V),H("fa-regular",V)})}{let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var{userAgent:P1=""}=c.navigator||{},O1=c,j1=l;function w(c,l,s){(l=(c=>"symbol"==typeof(c=((c,l)=>{if("object"!=typeof c||!c)return c;var s=c[Symbol.toPrimitive];if(void 0===s)return("string"===l?String:Number)(c);if("object"!=typeof(s=s.call(c,l||"default")))return s;throw new TypeError("@@toPrimitive must return a primitive value.")})(c,"string"))?c:c+"")(l))in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s}function y(l,c){var s,a=Object.keys(l);return Object.getOwnPropertySymbols&&(s=Object.getOwnPropertySymbols(l),c&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),a.push.apply(a,s)),a}function f(l){for(var c=1;c{try{return!0}catch(c){return!1}})();function C(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[i]}})}(F1=f({},j1))[i]=f(f(f(f({},{"fa-duotone":"duotone"}),j1[i]),P1),N1),C(F1),(j1=f({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}}))[i]=f(f(f(f({},{duotone:"fad"}),j1[i]),Z1),E1),C(j1),(P1=f({},{classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}}))[i]=f(f({},P1[i]),{fak:"fa-kit"}),C(P1),(N1=f({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}}))[i]=f(f({},N1[i]),{"fa-kit":"fak"}),C(N1),C(f({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),(F1=O1||{})[I1]||(F1[I1]={}),F1[I1].styles||(F1[I1].styles={}),F1[I1].hooks||(F1[I1].hooks={}),F1[I1].shims||(F1[I1].shims=[]);var o=F1[I1];function k(a){return Object.keys(a).reduce((c,l)=>{var s=a[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function S(c,l,s){var{skipHooks:s=!1}=2{S("fas",A),S("fa-solid",A)})}{function s2(c,l,s){(l=(c=>"symbol"==typeof(c=((c,l)=>{if("object"!=typeof c||!c)return c;var s=c[Symbol.toPrimitive];if(void 0===s)return("string"===l?String:Number)(c);if("object"!=typeof(s=s.call(c,l||"default")))return s;throw new TypeError("@@toPrimitive must return a primitive value.")})(c,"string"))?c:c+"")(l))in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s}function a2(l,c){var s,a=Object.keys(l);return Object.getOwnPropertySymbols&&(s=Object.getOwnPropertySymbols(l),c&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),a.push.apply(a,s)),a}function D1(l){for(var c=1;c{},measure:Z1};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document),"undefined"!=typeof MutationObserver&&(N=MutationObserver),"undefined"!=typeof performance&&(E=performance)}catch(c){}var{userAgent:Z1=""}=c.navigator||{};let z=c,h=l,I=N,F=(E1=E,!!z.document),r=!!h.documentElement&&!!h.head&&"function"==typeof h.addEventListener&&"function"==typeof h.createElement,D=~Z1.indexOf("MSIE")||~Z1.indexOf("Trident/");var Z1={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},z2=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],T1="classic",R1="duotone",e2=[T1,R1,"sharp","sharp-duotone"],L2=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),t2=["fak","fa-kit","fakd","fa-kit-duotone"],j1={fak:"kit","fa-kit":"kit"},P1={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},M2=["fak","fakd"],N1={kit:"fak"},O1={"kit-duotone":"fakd"},F1={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},r2=["fak","fa-kit","fakd","fa-kit-duotone"],m2={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},f2=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],_1=(I1=[1,2,3,4,5,6,7,8,9,10]).concat([11,12,13,14,15,16,17,18,19,20]),F1=[...Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",F1.GROUP,F1.SWAP_OPACITY,F1.PRIMARY,F1.SECONDARY].concat(I1.map(c=>"".concat(c,"x"))).concat(_1.map(c=>"w-".concat(c))),I1="___FONT_AWESOME___";let M=16,T="svg-inline--fa",d="data-fa-i2svg",u="data-fa-pseudo-element",R="data-fa-pseudo-element-pending",v="data-prefix",p="data-icon",_="fontawesome-i2svg",Y="async",W=["HTML","HEAD","STYLE","SCRIPT"],m=(()=>{try{return!0}catch(c){return!1}})();function Y1(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[T1]}})}(_1=D1({},Z1))[T1]=D1(D1(D1(D1({},{"fa-duotone":"duotone"}),Z1[T1]),j1),P1);let U=Y1(_1),B=((Z1=D1({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}}))[T1]=D1(D1(D1(D1({},{duotone:"fad"}),Z1[T1]),N1),O1),Y1(Z1)),e=((j1=D1({},m2))[T1]=D1(D1({},j1[T1]),{fak:"fa-kit"}),Y1(j1)),X=((P1=D1({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}}))[T1]=D1(D1({},P1[T1]),{"fa-kit":"fak"}),Y1(P1),/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/),G="fa-layers-text",Q=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,K=(Y1(D1({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"]),L={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},J=["kit",...F1],s=z.FontAwesomeConfig||{},a=(h&&"function"==typeof h.querySelector&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(c=>{var[c,l]=c,c=""===(c=(c=>{var l=h.querySelector("script["+c+"]");if(l)return l.getAttribute(c)})(c))||"false"!==c&&("true"===c||c);null!=c&&(s[l]=c)}),_1={styleDefault:"solid",familyDefault:T1,cssPrefix:"fa",replacementClass:T,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},s.familyPrefix&&(s.cssPrefix=s.familyPrefix),D1(D1({},_1),s)),g=(a.autoReplaceSvg||(a.observeMutations=!1),{}),t=(Object.keys(_1).forEach(l=>{Object.defineProperty(g,l,{enumerable:!0,set:function(c){a[l]=c,t.forEach(c=>c(g))},get:function(){return a[l]}})}),Object.defineProperty(g,"familyPrefix",{enumerable:!0,set:function(c){a.cssPrefix=c,t.forEach(c=>c(g))},get:function(){return a.cssPrefix}}),z.FontAwesomeConfig=g,[]),f=M,b={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1},$="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function W1(){let c=12,l="";for(;0>>0;c--;)s[c]=l[c];return s}function i2(c){return c.classList?U1(c.classList):(c.getAttribute("class")||"").split(" ").filter(c=>c)}function C2(c){return"".concat(c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function B1(s){return Object.keys(s||{}).reduce((c,l)=>c+"".concat(l,": ").concat(s[l].trim(),";"),"")}function o2(c){return c.size!==b.size||c.x!==b.x||c.y!==b.y||c.rotate!==b.rotate||c.flipX||c.flipY}function n2(){var c,l,s=T,a=g.cssPrefix,z=g.replacementClass;let e=':host,:root{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-regular:normal 400 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-light:normal 300 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-thin:normal 100 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-regular:normal 400 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-light:normal 300 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-thin:normal 100 1em/1 "Font Awesome 6 Sharp Duotone"}svg:not(:host).svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible;box-sizing:content-box}.svg-inline--fa{display:var(--fa-display,inline-block);height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.0714285705em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);overflow:hidden;padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:top right}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom right}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);right:auto;top:auto;transform:scale(var(--fa-layers-scale,.25));transform-origin:bottom left}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top right}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:top left}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.0833333337em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.0714285718em;vertical-align:.0535714295em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.0416666682em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:var(--fa-li-margin,2.5em);padding-left:0}.fa-ul>li{position:relative}.fa-li{left:calc(-1 * var(--fa-li-width,2em));position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{animation-delay:-1ms;animation-duration:1ms;animation-iteration-count:1;transition-delay:0s;transition-duration:0s}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1,1) translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1,1) translateY(0)}100%{transform:scale(1,1) translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}24%,8%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}100%,40%{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scale(-1,1)}.fa-flip-vertical{transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1,-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{display:inline-block;vertical-align:middle;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;z-index:var(--fa-stack-z-index,auto)}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:var(--fa-inverse,#fff)}.fa-sr-only,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fa-sr-only-focusable:not(:focus),.sr-only-focusable:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}';return"fa"===a&&z===s||(c=new RegExp("\\.".concat("fa","\\-"),"g"),l=new RegExp("\\--".concat("fa","\\-"),"g"),s=new RegExp("\\.".concat(s),"g"),e=e.replace(c,".".concat(a,"-")).replace(l,"--".concat(a,"-")).replace(s,".".concat(z))),e}let c1=!1;function h2(){if(g.autoAddCss&&!c1){var c=n2();if(c&&r){var s=h.createElement("style"),a=(s.setAttribute("type","text/css"),s.innerHTML=c,h.head.childNodes);let l=null;for(let c=a.length-1;-1c())}let l1=[],i=!1;function u2(c){r&&(i?setTimeout(c,0):l1.push(c))}function G1(c){var s,{tag:l,attributes:a={},children:z=[]}=c;return"string"==typeof c?C2(c):"<".concat(l," ").concat((s=a,Object.keys(s||{}).reduce((c,l)=>c+"".concat(l,'="').concat(C2(s[l]),'" '),"").trim()),">").concat(z.map(G1).join(""),"")}function v2(c,l,s){if(c&&c[l]&&c[l][s])return{prefix:l,iconName:s,icon:c[l][s]}}function p2(c,l,s,a){for(var z,e,L=Object.keys(c),t=L.length,M=void 0!==a?g2(l,a):l,r=void 0===s?(z=1,c[L[0]]):(z=0,s);z{var l=[];let s=0;for(var a=c.length;s{var s=a[l];return!!s.icon?c[s.iconName]=s.icon:c[l]=s,c},{})}function V2(c,l,s){var{skipHooks:s=!1}=2(c[l]=Object.keys(e[l]),c),{}),o=null,e1={},L1={},t1={},M1={},r1={};function w2(c,l){var l=l.split("-"),s=l[0],l=l.slice(1).join("-");return s!==c||""===l||(s=l,~J.indexOf(s))?null:l}let n=()=>{var c=a=>p2(C,(c,l,s)=>(c[s]=p2(l,a,{}),c),{});e1=c((l,c,s)=>(c[3]&&(l[c[3]]=s),c[2]&&c[2].filter(c=>"number"==typeof c).forEach(c=>{l[c.toString(16)]=s}),l)),L1=c((l,c,s)=>(l[s]=s,c[2]&&c[2].filter(c=>"string"==typeof c).forEach(c=>{l[c]=s}),l)),r1=c((l,c,s)=>{c=c[2];return l[s]=s,c.forEach(c=>{l[c]=s}),l});let z="far"in C||g.autoFetchSvg;c=p2(s1,(c,l)=>{var s=l[0];let a=l[1];l=l[2];return"far"!==a||z||(a="fas"),"string"==typeof s&&(c.names[s]={prefix:a,iconName:l}),"number"==typeof s&&(c.unicodes[s.toString(16)]={prefix:a,iconName:l}),c},{names:{},unicodes:{}});t1=c.names,M1=c.unicodes,o=K1(g.styleDefault,{family:g.familyDefault})};function y2(c,l){return(e1[c]||{})[l]}function Q1(c,l){return(r1[c]||{})[l]}function k2(c){return t1[c]||{prefix:null,iconName:null}}Z1=c=>{o=K1(c.styleDefault,{family:g.familyDefault})},t.push(Z1),n();let m1=()=>({prefix:null,iconName:null,rest:[]});function K1(c,l){var{family:l=T1}=1s.indexOf(c)===l)}function J1(c,l){var{skipLookups:l=!1}=1a.includes(c))),e=S2(c.filter(c=>!f2.includes(c))),[L=null]=z.filter(c=>(s=c,!z2.includes(c))),z=(c=>{let s=T1,a=a1.reduce((c,l)=>(c[l]="".concat(g.cssPrefix,"-").concat(l),c),{});return e2.forEach(l=>{(c.includes(a[l])||c.some(c=>z1[l].includes(c)))&&(s=l)}),s})(z),e=D1(D1({},(c=>{let s=[],a=null;return c.forEach(c=>{var l=w2(g.cssPrefix,c);l?a=l:c&&s.push(c)}),{iconName:a,rest:s}})(e)),{},{prefix:K1(L,{family:z})});return D1(D1(D1({},e),(c=>{var{values:c,family:l,canonical:s,givenPrefix:a="",styles:z={},config:e={}}=c,L=l===R1,t=c.includes("fa-duotone")||c.includes("fad"),M="duotone"===e.familyDefault,r="fad"===s.prefix||"fa-duotone"===s.prefix;return!L&&(t||M||r)&&(s.prefix="fad"),(c.includes("fa-brands")||c.includes("fab"))&&(s.prefix="fab"),!s.prefix&&f1.includes(l)&&(Object.keys(z).find(c=>i1.includes(c))||e.autoFetchSvg)&&(L=L2.get(l).defaultShortPrefixId,s.prefix=L,s.iconName=Q1(s.prefix,s.iconName)||s.iconName),"fa"!==s.prefix&&"fa"!==a||(s.prefix=o||"fas"),s})({values:c,family:z,styles:C,config:g,canonical:e,givenPrefix:s})),((c,l,s)=>{let{prefix:a,iconName:z}=s;return!c&&a&&z&&(s="fa"===l?k2(z):{},c=Q1(a,z),z=s.iconName||c||z,"far"!==(a=s.prefix||a)||C.far||!C.fas||g.autoFetchSvg||(a="fas")),{prefix:a,iconName:z}})(l,s,e))}let f1=e2.filter(c=>c!==T1||c!==R1),i1=Object.keys(m2).filter(c=>c!==T1).map(c=>Object.keys(m2[c])).flat(),C1=[],H={},V={},o1=Object.keys(V);function A2(c,l){for(var s=arguments.length,a=new Array(2{l=c.apply(null,[l,...a])}),l}function $1(c){for(var l=arguments.length,s=new Array(1{c.apply(null,s)})}function c2(c){var l=Array.prototype.slice.call(arguments,1);return V[c]?V[c].apply(null,l):void 0}function x2(c){"fa"===c.prefix&&(c.prefix="fas");var l=c.iconName,c=c.prefix||o;if(l)return l=Q1(c,l)||l,v2(n1.definitions,c,l)||v2(X1.styles,c,l)}let n1=new class{constructor(){this.definitions={}}add(){for(var c=arguments.length,l=new Array(c),s=0;s{this.definitions[c]=D1(D1({},this.definitions[c]||{}),a[c]),V2(c,a[c]);var l=e[T1][c];l&&V2(l,a[c]),n()})}reset(){this.definitions={}}_pullDefinitions(z,c){let e=c.prefix&&c.iconName&&c.icon?{0:c}:c;return Object.keys(e).map(c=>{let{prefix:l,iconName:s,icon:a}=e[c];c=a[2];z[l]||(z[l]={}),0{"string"==typeof c&&(z[l][c]=a)}),z[l][s]=a}),z}},w={noAuto:()=>{g.autoReplaceSvg=!1,g.observeMutations=!1,$1("noAuto")},config:g,dom:{i2svg:function(){var c=0{y({autoReplaceSvgRoot:l}),$1("watch",c)})}},parse:{icon:c=>{var l,s;return null===c?null:"object"==typeof c&&c.prefix&&c.iconName?{prefix:c.prefix,iconName:Q1(c.prefix,c.iconName)||c.iconName}:Array.isArray(c)&&2===c.length?(l=0===c[1].indexOf("fa-")?c[1].slice(3):c[1],{prefix:s=K1(c[0]),iconName:Q1(s,l)||l}):"string"==typeof c&&(-1G1(c))}}),Object.defineProperty(l,"node",{get:function(){var c;if(r)return(c=h.createElement("div")).innerHTML=l.html,c.children}}),l}function q2(c){let{icons:{main:l,mask:s},prefix:a,iconName:z,transform:e,symbol:L,title:t,maskId:M,titleId:r,extra:m,watchable:f=!1}=c;var i,C,{width:c,height:o}=s.found?s:l,n=M2.includes(a),h=[g.replacementClass,z?"".concat(g.cssPrefix,"-").concat(z):""].filter(c=>-1===m.classes.indexOf(c)).filter(c=>""!==c||!!c).concat(m.classes).join(" "),h={children:[],attributes:D1(D1({},m.attributes),{},{"data-prefix":a,"data-icon":z,class:h,role:m.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(c," ").concat(o)})},n=n&&!~m.classes.indexOf("fa-fw")?{width:"".concat(c/o*16*.0625,"em")}:{},c=(f&&(h.attributes[d]=""),t&&(h.children.push({tag:"title",attributes:{id:h.attributes["aria-labelledby"]||"title-".concat(r||W1())},children:[t]}),delete h.attributes.title),D1(D1({},h),{},{prefix:a,iconName:z,main:l,mask:s,maskId:M,transform:e,symbol:L,styles:D1(D1({},n),m.styles)})),{children:o,attributes:h}=s.found&&l.found?c2("generateAbstractMask",c)||{children:[],attributes:{}}:c2("generateAbstractIcon",c)||{children:[],attributes:{}};return c.children=o,c.attributes=h,L?({prefix:n,iconName:o,children:h,attributes:C,symbol:i}=n=c,n=!0===i?"".concat(n,"-").concat(g.cssPrefix,"-").concat(o):i,[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:D1(D1({},C),{},{id:n}),children:h}]}]):({children:o,main:i,mask:C,attributes:n,styles:h,transform:c}=o=c,o2(c)&&i.found&&!C.found&&({width:C,height:i}=i,C={x:C/i/2,y:.5},n.style=B1(D1(D1({},h),{},{"transform-origin":"".concat(C.x+c.x/16,"em ").concat(C.y+c.y/16,"em")}))),[{tag:"svg",attributes:n,children:o}])}function Z2(c){var{content:c,width:l,height:s,transform:a,title:z,extra:e,watchable:L=!1}=c,t=D1(D1(D1({},e.attributes),z?{title:z}:{}),{},{class:e.classes.join(" ")}),L=(L&&(t[d]=""),D1({},e.styles)),e=(o2(a)&&(L.transform=(c=>{var{transform:c,width:l=M,height:s=M,startCentered:a=!1}=c;let z="";return a&&D?z+="translate(".concat(c.x/f-l/2,"em, ").concat(c.y/f-s/2,"em) "):z+=a?"translate(calc(-50% + ".concat(c.x/f,"em), calc(-50% + ").concat(c.y/f,"em)) "):"translate(".concat(c.x/f,"em, ").concat(c.y/f,"em) "),z=(z+="scale(".concat(c.size/f*(c.flipX?-1:1),", ").concat(c.size/f*(c.flipY?-1:1),") "))+"rotate(".concat(c.rotate,"deg) ")})({transform:a,startCentered:!0,width:l,height:s}),L["-webkit-transform"]=L.transform),B1(L)),a=(0{var s,a;if("fa"===L&&(s=k2(z)||{},z=s.iconName||z,e=s.prefix||e),z&&e&&k[e]&&k[e][z])return c(O2(k[e][z]));s=z,a=e,m||g.showMissingIcons||!s||console.error('Icon with name "'.concat(s,'" and prefix "').concat(a,'" is missing.')),c(D1(D1({},h1),{},{icon:g.showMissingIcons&&z&&c2("missingIconAbstract")||{}}))})}j1=()=>{};let S=g.measurePerformance&&E1&&E1.mark&&E1.measure?E1:{mark:j1,measure:j1},A='FA "6.7.1"',d1=c=>{S.mark("".concat(A," ").concat(c," ends")),S.measure("".concat(A," ").concat(c),"".concat(A," ").concat(c," begins"),"".concat(A," ").concat(c," ends"))};var P2={begin:c=>(S.mark("".concat(A," ").concat(c," begins")),()=>d1(c)),end:d1};let x=()=>{};function N2(c){return"string"==typeof(c.getAttribute?c.getAttribute(d):null)}function E2(l,c){let{ceFn:s="svg"===l.tag?function(c){return h.createElementNS("http://www.w3.org/2000/svg",c)}:function(c){return h.createElement(c)}}=1{l.parentNode.insertBefore(E2(c),l)}),null===l.getAttribute(d)&&g.keepOriginalSource?(c=h.createComment((c=l,c=" ".concat(c.outerHTML," "),"".concat(c,"Font Awesome fontawesome.com "))),l.parentNode.replaceChild(c,l)):l.remove())},nest:function(c){var l=c[0],s=c[1];if(~i2(l).indexOf(g.replacementClass))return q.replace(c);let a=new RegExp("".concat(g.cssPrefix,"-.*"));delete s[0].attributes.id,s[0].attributes.class&&(c=s[0].attributes.class.split(" ").reduce((c,l)=>((l===g.replacementClass||l.match(a)?c.toSvg:c.toNode).push(l),c),{toNode:[],toSvg:[]}),s[0].attributes.class=c.toSvg.join(" "),0===c.toNode.length?l.removeAttribute("class"):l.setAttribute("class",c.toNode.join(" ")));c=s.map(c=>G1(c)).join("\n");l.setAttribute(d,""),l.innerHTML=c}};function I2(c){c()}function F2(s,c){let a="function"==typeof c?c:x;if(0===s.length)a();else{let c=I2;(c=g.mutateApproach===Y?z.requestAnimationFrame||I2:c)(()=>{var c=!0!==g.autoReplaceSvg&&q[g.autoReplaceSvg]||q.replace,l=P2.begin("mutate");s.map(c),l(),a()})}}let Z=!1;function D2(){Z=!0}function T2(){Z=!1}let O=null;function R2(c){if(!I)return;if(!g.observeMutations)return;let{treeCallback:z=x,nodeCallback:e=x,pseudoElementsCallback:L=x,observeMutationsRoot:l=h}=c;O=new I(c=>{if(!Z){let a=o;U1(c).forEach(c=>{var l,s;"childList"===c.type&&0("class"!==c.name&&"style"!==c.name&&(c[l.name]=l.value),c),{}),e=L.getAttribute("title"),L=L.getAttribute("data-fa-title-id"),g.autoA11y&&(e?t["aria-labelledby"]="".concat(g.replacementClass,"-title-").concat(L||W1()):(t["aria-hidden"]="true",t.focusable="false")),t),L=A2("parseNodeAttributes",{},c),t=l.styleParser?(c=>{c=c.getAttribute("style");let l=[];return l=c?c.split(";").reduce((c,l)=>{var l=l.split(":"),s=l[0],l=l.slice(1);return s&&0l.add("".concat(_,"-").concat(c)),e=c=>l.remove("".concat(_,"-").concat(c));var s=g.autoFetchSvg?[...t2,...f2]:z2.concat(Object.keys(u1)),s=(s.includes("fa")||s.push("fa"),[".".concat(G,":not([").concat(d,"])")].concat(s.map(c=>".".concat(c,":not([").concat(d,"])"))).join(", "));if(0===s.length)return Promise.resolve();let L=[];try{L=U1(c.querySelectorAll(s))}catch(c){}if(!(0{try{var s=W2(l);s&&c.push(s)}catch(c){m||"MissingIcon"===c.name&&console.error(c)}return c},[]);return new Promise((l,s)=>{Promise.all(M).then(c=>{F2(c,()=>{z("active"),z("complete"),e("pending"),"function"==typeof a&&a(),t(),l()})}).catch(c=>{t(),s(c)})})}function B2(c){let l=1{c&&F2([c],l)})}function X2(a){let z=1($1("beforeDOMElementCreation",{iconDefinition:a,params:z}),g.autoA11y&&(r?i["aria-labelledby"]="".concat(g.replacementClass,"-title-").concat(m||W1()):(i["aria-hidden"]="true",i.focusable="false")),q2({icons:{main:O2(s),mask:t?O2(t.icon):{found:!1,width:null,height:null,icon:{}}},prefix:c,iconName:l,transform:D1(D1({},b),e),symbol:L,title:r,maskId:M,titleId:m,extra:{attributes:i,styles:C,classes:f}})))}}let v1={mixout(){return{icon:(a=X2,function(c){var l=1{}}=c;return U2(c,l)},c.generateSvgReplacementMutation=function(a,c){let{iconName:z,title:e,titleId:L,prefix:t,transform:M,symbol:r,mask:l,maskId:m,extra:f}=c;return new Promise((s,c)=>{Promise.all([j2(z,t),l.iconName?j2(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(c=>{var[c,l]=c;s([a,q2({icons:{main:c,mask:l},prefix:t,iconName:z,transform:M,symbol:r,maskId:m,title:e,titleId:L,extra:f,watchable:!0})])}).catch(c)})},c.generateAbstractIcon=function(c){var{children:c,attributes:l,main:s,transform:a,styles:z}=c,z=B1(z);0{$1("beforeDOMElementCreation",{assembler:c,params:s});let l=[];return c(c=>{Array.isArray(c)?c.map(c=>{l=l.concat(c.abstract)}):l=l.concat(c.abstract)}),[{tag:"span",attributes:{class:["".concat(g.cssPrefix,"-layers"),...a].join(" ")},children:l}]})}}}},g1={mixout(){return{counter(z){let e=1{$1("beforeDOMElementCreation",{content:z,params:e});var{content:c,title:l,extra:s}=c={content:z.toString(),title:L,extra:{attributes:M,styles:r,classes:["".concat(g.cssPrefix,"-layers-counter"),...t]}},a=D1(D1(D1({},s.attributes),l?{title:l}:{}),{},{class:s.classes.join(" ")});return 0<(s=B1(s.styles)).length&&(a.style=s),(s=[]).push({tag:"span",attributes:a,children:[c]}),l&&s.push({tag:"span",attributes:{class:"sr-only"},children:[l]}),s})}}}},b1={mixout(){return{text(c){let l=1($1("beforeDOMElementCreation",{content:c,params:l}),Z2({content:c,transform:D1(D1({},b),s),title:a,extra:{attributes:e,styles:L,classes:["".concat(g.cssPrefix,"-layers-text"),...z]}})))}}},provides(c){c.generateLayersText=function(c,l){var s,a,{title:l,transform:z,extra:e}=l;let L=null,t=null;return D&&(s=parseInt(getComputedStyle(c).fontSize,10),a=c.getBoundingClientRect(),L=a.width/s,t=a.height/s),g.autoA11y&&!l&&(e.attributes["aria-hidden"]="true"),Promise.resolve([c,Z2({content:c.innerHTML,width:L,height:t,transform:z,title:l,extra:e,watchable:!0})])}}},H1=new RegExp('"',"ug"),V1=[1105920,1112319],w1=D1(D1(D1(D1({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),j=Object.keys(w1).reduce((c,l)=>(c[l.toLowerCase()]=w1[l],c),{}),y1=Object.keys(j).reduce((c,l)=>{var s=j[l];return c[l]=s[900]||[...Object.entries(s)][0][1],c},{});function G2(C,o){let n="".concat(R).concat(o.replace(":","-"));return new Promise((L,t)=>{if(null!==C.getAttribute(n))return L();var s,M=U1(C.children).filter(c=>c.getAttribute(u)===o)[0],a=z.getComputedStyle(C,o),r=a.getPropertyValue("font-family"),m=r.match(Q),f=a.getPropertyValue("font-weight");let c=a.getPropertyValue("content");if(M&&!m)return C.removeChild(M),L();if(m&&"none"!==c&&""!==c){let c=a.getPropertyValue("content"),z=(a=f,f=(f=r).replace(/^['"]|['"]$/g,"").toLowerCase(),a=parseInt(a),a=isNaN(a)?"normal":a,(j[f]||{})[a]||y1[f]);r=(r=c).replace(H1,""),a=0,s=(f=r).length,f=55296<=(i=f.charCodeAt(a))&&i<=56319&&a+1=V1[0]&&f<=V1[1];var{value:i,isSecondary:f}={value:b2((s=2===r.length&&r[0]===r[1])?r[0]:r),isSecondary:a||s},r=m[0].startsWith("FontAwesome");let l=y2(z,i),e=l;if(r&&(a=i,s=M1[a],a=y2("fas",a),(m=s||(a?{prefix:"fas",iconName:a}:null)||{prefix:null,iconName:null}).iconName)&&m.prefix&&(l=m.iconName,z=m.prefix),!l||f||M&&M.getAttribute(v)===z&&M.getAttribute(p)===e)L();else{C.setAttribute(n,e),M&&C.removeChild(M);let s={iconName:null,title:null,titleId:null,prefix:null,transform:b,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},a=s.extra;a.attributes[u]=o,j2(l,z).then(c=>{var c=q2(D1(D1({},s),{},{icons:{main:c,mask:m1()},prefix:z,iconName:e,extra:a,watchable:!0})),l=h.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===o?C.insertBefore(l,C.firstChild):C.appendChild(l),l.outerHTML=c.map(c=>G1(c)).join("\n"),C.removeAttribute(n),L()}).catch(t)}}else L()})}function Q2(c){return Promise.all([G2(c,"::before"),G2(c,"::after")])}function K2(c){return!(c.parentNode===document.head||~W.indexOf(c.tagName.toUpperCase())||c.getAttribute(u)||c.parentNode&&"svg"===c.parentNode.tagName)}function J2(z){if(r)return new Promise((c,l)=>{var s=U1(z.querySelectorAll("*")).filter(K2).map(Q2);let a=P2.begin("searchPseudoElements");D2(),Promise.all(s).then(()=>{a(),T2(),c()}).catch(()=>{a(),T2(),l()})})}let k1={hooks(){return{mutationObserverCallbacks(c){return c.pseudoElementsCallback=J2,c}}},provides(c){c.pseudoElements2svg=function(c){var{node:c=h}=c;g.searchPseudoElements&&J2(c)}}},S1=!1,A1={mixout(){return{dom:{unwatch(){D2(),S1=!0}}}},hooks(){return{bootstrap(){R2(A2("mutationObserverCallbacks",{}))},noAuto(){O&&O.disconnect()},watch(c){c=c.observeMutationsRoot;S1?T2():R2(A2("mutationObserverCallbacks",{observeMutationsRoot:c}))}}}},x1=c=>c.toLowerCase().split(" ").reduce((c,l)=>{var l=l.toLowerCase().split("-"),s=l[0],a=l.slice(1).join("-");if(s&&"h"===a)c.flipX=!0;else if(s&&"v"===a)c.flipY=!0;else if(a=parseFloat(a),!isNaN(a))switch(s){case"grow":c.size=c.size+a;break;case"shrink":c.size=c.size-a;break;case"left":c.x=c.x-a;break;case"right":c.x=c.x+a;break;case"up":c.y=c.y-a;break;case"down":c.y=c.y+a;break;case"rotate":c.rotate=c.rotate+a}return c},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0}),q1={mixout(){return{parse:{transform:c=>x1(c)}}},hooks(){return{parseNodeAttributes(c,l){l=l.getAttribute("data-fa-transform");return l&&(c.transform=x1(l)),c}}},provides(c){c.generateAbstractTransformGrouping=function(c){var{main:c,transform:l,containerWidth:s,iconWidth:a}=c,s={transform:"translate(".concat(s/2," 256)")},z="translate(".concat(32*l.x,", ").concat(32*l.y,") "),e="scale(".concat(l.size/16*(l.flipX?-1:1),", ").concat(l.size/16*(l.flipY?-1:1),") "),l="rotate(".concat(l.rotate," 0 0)"),s={outer:s,inner:{transform:"".concat(z," ").concat(e," ").concat(l)},path:{transform:"translate(".concat(a/2*-1," -256)")}};return{tag:"g",attributes:D1({},s.outer),children:[{tag:"g",attributes:D1({},s.inner),children:[{tag:c.icon.tag,children:c.icon.children,attributes:D1(D1({},c.icon.attributes),s.path)}]}]}}}},P={x:0,y:0,width:"100%",height:"100%"};function $2(c){return c.attributes&&(c.attributes.fill||(!(1c.trim())):m1();return s.prefix||(s.prefix=o),c.mask=s,c.maskId=l.getAttribute("data-fa-mask-id"),c}}},provides(c){c.generateAbstractMask=function(c){var{children:c,attributes:l,main:s,mask:a,maskId:z,transform:e}=c,{width:s,icon:L}=s,{width:a,icon:t}=a,e=(c=>{var{transform:c,containerWidth:l,iconWidth:s}=c,l={transform:"translate(".concat(l/2," 256)")},a="translate(".concat(32*c.x,", ").concat(32*c.y,") "),z="scale(".concat(c.size/16*(c.flipX?-1:1),", ").concat(c.size/16*(c.flipY?-1:1),") "),c="rotate(".concat(c.rotate," 0 0)");return{outer:l,inner:{transform:"".concat(a," ").concat(z," ").concat(c)},path:{transform:"translate(".concat(s/2*-1," -256)")}}})({transform:e,containerWidth:a,iconWidth:s}),a={tag:"rect",attributes:D1(D1({},P),{},{fill:"white"})},s=L.children?{children:L.children.map($2)}:{},L={tag:"g",attributes:D1({},e.inner),children:[$2(D1({tag:L.tag,attributes:D1(D1({},L.attributes),e.path)},s))]},s={tag:"g",attributes:D1({},e.outer),children:[L]},e="mask-".concat(z||W1()),L="clip-".concat(z||W1()),z={tag:"mask",attributes:D1(D1({},P),{},{id:e,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[a,s]},s={tag:"defs",children:[{tag:"clipPath",attributes:{id:L},children:"g"===(a=t).tag?a.children:[a]},z]};return c.push(s,{tag:"rect",attributes:D1({fill:"currentColor","clip-path":"url(#".concat(L,")"),mask:"url(#".concat(e,")")},P)}),{children:c,attributes:l}}}},{provides(c){let e=!1;z.matchMedia&&(e=z.matchMedia("(prefers-reduced-motion: reduce)").matches),c.missingIconAbstract=function(){var c=[],l={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},a=(c.push({tag:"path",attributes:D1(D1({},l),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})}),D1(D1({},s),{},{attributeName:"opacity"})),z={tag:"circle",attributes:D1(D1({},l),{},{cx:"256",cy:"364",r:"28"}),children:[]};return e||z.children.push({tag:"animate",attributes:D1(D1({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:D1(D1({},a),{},{values:"1;0;1;1;0;1;"})}),c.push(z),c.push({tag:"path",attributes:D1(D1({},l),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:e?[]:[{tag:"animate",attributes:D1(D1({},a),{},{values:"1;0;0;0;0;1;"})}]}),e||c.push({tag:"path",attributes:D1(D1({},l),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:D1(D1({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:c}}}},{hooks(){return{parseNodeAttributes(c,l){l=l.getAttribute("data-fa-symbol");return c.symbol=null!==l&&(""===l||l),c}}}}];{F1=P1;let a=(_1={mixoutsTo:w}).mixoutsTo;C1=F1,H={},Object.keys(V).forEach(c=>{-1===o1.indexOf(c)&&delete V[c]}),C1.forEach(c=>{let s=c.mixout?c.mixout():{};if(Object.keys(s).forEach(l=>{"function"==typeof s[l]&&(a[l]=s[l]),"object"==typeof s[l]&&Object.keys(s[l]).forEach(c=>{a[l]||(a[l]={}),a[l][c]=s[l][c]})}),c.hooks){let l=c.hooks();Object.keys(l).forEach(c=>{H[c]||(H[c]=[]),H[c].push(l[c])})}c.provides&&c.provides(V)}),a}!function(c){try{for(var l=arguments.length,s=new Array(1{y(),$1("bootstrap")})),X1.hooks=D1(D1({},X1.hooks),{},{addPack:(c,l)=>{X1.styles[c]=D1(D1({},X1.styles[c]||{}),l),n(),y()},addPacks:c=>{c.forEach(c=>{var[c,l]=c;X1.styles[c]=D1(D1({},X1.styles[c]||{}),l)}),n(),y()},addShims:c=>{X1.shims.push(...c),n(),y()}})})} \ No newline at end of file diff --git a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.js b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.js index 8531e7e79..0ff8a832f 100644 --- a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.js +++ b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.js @@ -1,5 +1,5 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ @@ -8,12 +8,10 @@ let _WINDOW = {}; let _DOCUMENT = {}; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -23,152 +21,243 @@ const IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function'; const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); - var a = "classic", - r = "sharp", - o = "sharp-duotone"; - - var et$1 = { - classic: { - 900: "fas", - 400: "far", - normal: "far", - 300: "fal", - 100: "fat" - }, - sharp: { - 900: "fass", - 400: "fasr", - 300: "fasl", - 100: "fast" - }, - "sharp-duotone": { - 900: "fasds" - } - }; - var bt = { - kit: { - fak: "kit", - "fa-kit": "kit" - }, - "kit-duotone": { - fakd: "kit-duotone", - "fa-kit-duotone": "kit-duotone" - } - }; - var lo = { - classic: { - "fa-brands": "fab", - "fa-duotone": "fad", - "fa-light": "fal", - "fa-regular": "far", - "fa-solid": "fas", - "fa-thin": "fat" - }, - sharp: { - "fa-solid": "fass", - "fa-regular": "fasr", - "fa-light": "fasl", - "fa-thin": "fast" - }, - "sharp-duotone": { - "fa-solid": "fasds" - } - }, - no = { - classic: { - fab: "fa-brands", - fad: "fa-duotone", - fal: "fa-light", - far: "fa-regular", - fas: "fa-solid", - fat: "fa-thin" - }, - sharp: { - fass: "fa-solid", - fasr: "fa-regular", - fasl: "fa-light", - fast: "fa-thin" - }, - "sharp-duotone": { - fasds: "fa-solid" + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); } - }, - fo = { - classic: { - solid: "fas", - regular: "far", - light: "fal", - thin: "fat", - duotone: "fad", - brands: "fab" - }, - sharp: { - solid: "fass", - regular: "fasr", - light: "fasl", - thin: "fast" - }, - "sharp-duotone": { - solid: "fasds" + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); } - }, - ho = { - classic: { - fa: "solid", - fas: "solid", - "fa-solid": "solid", - far: "regular", - "fa-regular": "regular", - fal: "light", - "fa-light": "light", - fat: "thin", - "fa-thin": "thin", - fad: "duotone", - "fa-duotone": "duotone", - fab: "brands", - "fa-brands": "brands" - }, - sharp: { - fa: "solid", - fass: "solid", - "fa-solid": "solid", - fasr: "regular", - "fa-regular": "regular", - fasl: "light", - "fa-light": "light", - fast: "thin", - "fa-thin": "thin" - }, - "sharp-duotone": { - fa: "solid", - fasds: "solid", - "fa-solid": "solid" + return e; + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); } - }; - var Io = { + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + + var S = { + classic: { + fa: "solid", + fas: "solid", + "fa-solid": "solid", + far: "regular", + "fa-regular": "regular", + fal: "light", + "fa-light": "light", + fat: "thin", + "fa-thin": "thin", + fab: "brands", + "fa-brands": "brands" + }, + duotone: { + fa: "solid", + fad: "solid", + "fa-solid": "solid", + "fa-duotone": "solid", + fadr: "regular", + "fa-regular": "regular", + fadl: "light", + "fa-light": "light", + fadt: "thin", + "fa-thin": "thin" + }, + sharp: { + fa: "solid", + fass: "solid", + "fa-solid": "solid", + fasr: "regular", + "fa-regular": "regular", + fasl: "light", + "fa-light": "light", + fast: "thin", + "fa-thin": "thin" + }, + "sharp-duotone": { + fa: "solid", + fasds: "solid", + "fa-solid": "solid", + fasdr: "regular", + "fa-regular": "regular", + fasdl: "light", + "fa-light": "light", + fasdt: "thin", + "fa-thin": "thin" + } + }; + var s = "classic"; + var G = { + classic: { + 900: "fas", + 400: "far", + normal: "far", + 300: "fal", + 100: "fat" + }, + duotone: { + 900: "fad", + 400: "fadr", + 300: "fadl", + 100: "fadt" + }, + sharp: { + 900: "fass", + 400: "fasr", + 300: "fasl", + 100: "fast" + }, + "sharp-duotone": { + 900: "fasds", + 400: "fasdr", + 300: "fasdl", + 100: "fasdt" + } + }; + var xt = { + classic: { + solid: "fas", + regular: "far", + light: "fal", + thin: "fat", + brands: "fab" + }, + duotone: { + solid: "fad", + regular: "fadr", + light: "fadl", + thin: "fadt" + }, + sharp: { + solid: "fass", + regular: "fasr", + light: "fasl", + thin: "fast" + }, + "sharp-duotone": { + solid: "fasds", + regular: "fasdr", + light: "fasdl", + thin: "fasdt" + } + }; + var St = { + kit: { + fak: "kit", + "fa-kit": "kit" + }, + "kit-duotone": { + fakd: "kit-duotone", + "fa-kit-duotone": "kit-duotone" + } + }; + var Ct = { kit: { "fa-kit": "fak" }, "kit-duotone": { "fa-kit-duotone": "fakd" } - }, - Fo = { - kit: { - fak: "fa-kit" - }, - "kit-duotone": { - fakd: "fa-kit-duotone" - } - }, - So = { - kit: { - kit: "fak" - }, - "kit-duotone": { - "kit-duotone": "fakd" - } }; + var Wt = { + kit: { + fak: "fa-kit" + }, + "kit-duotone": { + fakd: "fa-kit-duotone" + } + }; + var Et = { + kit: { + kit: "fak" + }, + "kit-duotone": { + "kit-duotone": "fakd" + } + }; + + var po = { + classic: { + "fa-brands": "fab", + "fa-duotone": "fad", + "fa-light": "fal", + "fa-regular": "far", + "fa-solid": "fas", + "fa-thin": "fat" + }, + duotone: { + "fa-regular": "fadr", + "fa-light": "fadl", + "fa-thin": "fadt" + }, + sharp: { + "fa-solid": "fass", + "fa-regular": "fasr", + "fa-light": "fasl", + "fa-thin": "fast" + }, + "sharp-duotone": { + "fa-solid": "fasds", + "fa-regular": "fasdr", + "fa-light": "fasdl", + "fa-thin": "fasdt" + } + }, + co = { + classic: { + fab: "fa-brands", + fad: "fa-duotone", + fal: "fa-light", + far: "fa-regular", + fas: "fa-solid", + fat: "fa-thin" + }, + duotone: { + fadr: "fa-regular", + fadl: "fa-light", + fadt: "fa-thin" + }, + sharp: { + fass: "fa-solid", + fasr: "fa-regular", + fasl: "fa-light", + fast: "fa-thin" + }, + "sharp-duotone": { + fasds: "fa-solid", + fasdr: "fa-regular", + fasdl: "fa-light", + fasdt: "fa-thin" + } + }; const NAMESPACE_IDENTIFIER = '___FONT_AWESOME___'; const PRODUCTION = (() => { @@ -178,57 +267,45 @@ return false; } })(); - function familyProxy(obj) { // Defaults to the classic family if family is not available return new Proxy(obj, { get(target, prop) { - return prop in target ? target[prop] : target[a]; + return prop in target ? target[prop] : target[s]; } - }); } + const _PREFIX_TO_STYLE = _objectSpread2({}, S); - const _PREFIX_TO_STYLE = { ...ho - }; - _PREFIX_TO_STYLE[a] = { ...ho[a], - ...bt['kit'], - ...bt['kit-duotone'] - }; + // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding + // {'fa-duotone': 'duotone'} + _PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + 'fa-duotone': 'duotone' + }), S[s]), St['kit']), St['kit-duotone']); const PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE); - const _STYLE_TO_PREFIX = { ...fo - }; - _STYLE_TO_PREFIX[a] = { ..._STYLE_TO_PREFIX[a], - ...So['kit'], - ...So['kit-duotone'] - }; + const _STYLE_TO_PREFIX = _objectSpread2({}, xt); + + // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any + // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'} + _STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, { + duotone: 'fad' + }), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']); const STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX); - const _PREFIX_TO_LONG_STYLE = { ...no - }; - _PREFIX_TO_LONG_STYLE[a] = { ..._PREFIX_TO_LONG_STYLE[a], - ...Fo['kit'] - }; + const _PREFIX_TO_LONG_STYLE = _objectSpread2({}, co); + _PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']); const PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE); - const _LONG_STYLE_TO_PREFIX = { ...lo - }; - _LONG_STYLE_TO_PREFIX[a] = { ..._LONG_STYLE_TO_PREFIX[a], - ...Io['kit'] - }; + const _LONG_STYLE_TO_PREFIX = _objectSpread2({}, po); + _LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']); const LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX); - const _FONT_WEIGHT_TO_PREFIX = { ...et$1 - }; + const _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G); const FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX); - const prefixes = new Set(); - Object.keys(STYLE_TO_PREFIX[a]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[r]).map(prefixes.add.bind(prefixes)); - Object.keys(STYLE_TO_PREFIX[o]).map(prefixes.add.bind(prefixes)); function bunker(fn) { try { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - fn(...args); } catch (e) { if (!PRODUCTION) { @@ -237,50 +314,43 @@ } } - const w$1 = WINDOW || {}; - if (!w$1[NAMESPACE_IDENTIFIER]) w$1[NAMESPACE_IDENTIFIER] = {}; - if (!w$1[NAMESPACE_IDENTIFIER].styles) w$1[NAMESPACE_IDENTIFIER].styles = {}; - if (!w$1[NAMESPACE_IDENTIFIER].hooks) w$1[NAMESPACE_IDENTIFIER].hooks = {}; - if (!w$1[NAMESPACE_IDENTIFIER].shims) w$1[NAMESPACE_IDENTIFIER].shims = []; - var namespace = w$1[NAMESPACE_IDENTIFIER]; + const w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; function normalizeIcons(icons) { return Object.keys(icons).reduce((acc, iconName) => { const icon = icons[iconName]; const expanded = !!icon.icon; - if (expanded) { acc[icon.iconName] = icon.icon; } else { acc[iconName] = icon; } - return acc; }, {}); } - function defineIcons(prefix, icons) { let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { skipHooks = false } = params; const normalized = normalizeIcons(icons); - if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { namespace.hooks.addPack(prefix, normalizeIcons(icons)); } else { - namespace.styles[prefix] = { ...(namespace.styles[prefix] || {}), - ...normalized - }; + namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized); } + /** * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction * of new styles we needed to differentiate between them. Prefix `fa` is now an alias * for `fas` so we'll ease the upgrade process for our users by automatically defining * this as well. */ - - if (prefix === 'fas') { defineIcons('fa', icons); } @@ -399,6 +469,7 @@ "debian": [448, 512, [], "e60b", "M380.2 245.6c3-7.6 5.5-14 5.2-24.4l-4.3 9c4.4-13.2 4-27.1 3.6-40.4c-.2-6-.3-11.8 0-17.4l-1.8-.5c-1.5-45.2-40.6-93.1-75.3-109.4c-30-13.8-76.1-16.2-97.3-5.8c1.3-1.1 4.2-2 6.8-2.7l.3-.1c3.3-1 6-1.7 4-2.9c-19.2 1.9-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2-3.1zM35.6 110.6c.4 .8 1.4 .5 2.3 .3c1.9-.5 3.6-.9-.1 7.6c-.5 .3-1 .7-1.5 1l0 0 0 0c-1.4 .9-2.8 1.9-3.9 3c1.9-3.8 3.5-7.4 3.2-11.9zM25.3 152.3c-.7 3.7-1.5 7.9-3.4 13.9c.2-1.9 0-3.5-.2-4.9l0-.1c-.4-3.4-.7-6.3 4.3-12.8c-.3 1.2-.5 2.5-.7 3.8v.1z"], "openid": [448, 512, [], "f19b", "M271.5 432l-68 32C88.5 453.7 0 392.5 0 318.2c0-71.5 82.5-131 191.7-144.3v43c-71.5 12.5-124 53-124 101.3 0 51 58.5 93.3 135.7 103v-340l68-33.2v384zM448 291l-131.3-28.5 36.8-20.7c-19.5-11.5-43.5-20-70-24.8v-43c46.2 5.5 87.7 19.5 120.3 39.3l35-19.8L448 291z"], "instalod": [512, 512, [], "e081", "M153.384,480H387.113L502.554,275.765,204.229,333.211ZM504.726,240.078,387.113,32H155.669L360.23,267.9ZM124.386,48.809,7.274,256,123.236,461.154,225.627,165.561Z"], + "files-pinwheel": [512, 512, [], "e69f", "M253.2 246.4L136.9 130.2c-.6-.6-1-1.3-1.4-2s-.5-1.6-.5-2.4s.2-1.6 .5-2.4s.8-1.4 1.4-2L253.3 5.1c.9-.9 2-1.5 3.2-1.7s2.5-.1 3.6 .3s2.1 1.3 2.8 2.3s1.1 2.2 1.1 3.5L264 242c0 1.3-.3 2.5-1 3.6s-1.7 1.9-2.9 2.4s-2.5 .6-3.7 .3s-2.4-.9-3.2-1.9zm40.3-4.4l0-134.4c0-.8 .1-1.6 .5-2.4s.8-1.5 1.3-2.1s1.3-1.1 2-1.4s1.6-.5 2.4-.5l134.4 0c1.2 0 2.5 .4 3.5 1.1s1.8 1.7 2.3 2.8s.6 2.4 .3 3.6s-.9 2.3-1.7 3.2L304 246.4c-.9 .8-2 1.4-3.2 1.6s-2.4 .1-3.5-.4s-2.1-1.3-2.8-2.3s-1.1-2.2-1.1-3.4zm30.6 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 1.1-3.5s1.7-1.8 2.8-2.3s2.4-.6 3.6-.3s2.3 .8 3.2 1.7zM78.7 122.4c0-1.2 .3-2.5 1-3.5s1.7-1.8 2.8-2.3s2.4-.6 3.6-.4s2.3 .8 3.2 1.7L237.8 266.4c.9 .9 1.5 2 1.7 3.2s.1 2.5-.3 3.6s-1.3 2.1-2.3 2.8s-2.2 1.1-3.5 1.1L85 277.1c-1.7 0-3.2-.7-4.4-1.8s-1.8-2.8-1.8-4.4l0-148.4z"], "expeditedssl": [496, 512, [], "f23e", "M248 43.4C130.6 43.4 35.4 138.6 35.4 256S130.6 468.6 248 468.6 460.6 373.4 460.6 256 365.4 43.4 248 43.4zm-97.4 132.9c0-53.7 43.7-97.4 97.4-97.4s97.4 43.7 97.4 97.4v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6c0-82.1-124-82.1-124 0v26.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-26.6zM389.7 380c0 9.7-8 17.7-17.7 17.7H124c-9.7 0-17.7-8-17.7-17.7V238.3c0-9.7 8-17.7 17.7-17.7h248c9.7 0 17.7 8 17.7 17.7V380zm-248-137.3v132.9c0 2.5-1.9 4.4-4.4 4.4h-8.9c-2.5 0-4.4-1.9-4.4-4.4V242.7c0-2.5 1.9-4.4 4.4-4.4h8.9c2.5 0 4.4 1.9 4.4 4.4zm141.7 48.7c0 13-7.2 24.4-17.7 30.4v31.6c0 5-3.9 8.9-8.9 8.9h-17.7c-5 0-8.9-3.9-8.9-8.9v-31.6c-10.5-6.1-17.7-17.4-17.7-30.4 0-19.7 15.8-35.4 35.4-35.4s35.5 15.8 35.5 35.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 478.3C121 486.3 17.7 383 17.7 256S121 25.7 248 25.7 478.3 129 478.3 256 375 486.3 248 486.3z"], "sellcast": [448, 512, [], "f2da", "M353.4 32H94.7C42.6 32 0 74.6 0 126.6v258.7C0 437.4 42.6 480 94.7 480h258.7c52.1 0 94.7-42.6 94.7-94.6V126.6c0-52-42.6-94.6-94.7-94.6zm-50 316.4c-27.9 48.2-89.9 64.9-138.2 37.2-22.9 39.8-54.9 8.6-42.3-13.2l15.7-27.2c5.9-10.3 19.2-13.9 29.5-7.9 18.6 10.8-.1-.1 18.5 10.7 27.6 15.9 63.4 6.3 79.4-21.3 15.9-27.6 6.3-63.4-21.3-79.4-17.8-10.2-.6-.4-18.6-10.6-24.6-14.2-3.4-51.9 21.6-37.5 18.6 10.8-.1-.1 18.5 10.7 48.4 28 65.1 90.3 37.2 138.5zm21.8-208.8c-17 29.5-16.3 28.8-19 31.5-6.5 6.5-16.3 8.7-26.5 3.6-18.6-10.8.1.1-18.5-10.7-27.6-15.9-63.4-6.3-79.4 21.3s-6.3 63.4 21.3 79.4c0 0 18.5 10.6 18.6 10.6 24.6 14.2 3.4 51.9-21.6 37.5-18.6-10.8.1.1-18.5-10.7-48.2-27.8-64.9-90.1-37.1-138.4 27.9-48.2 89.9-64.9 138.2-37.2l4.8-8.4c14.3-24.9 52-3.3 37.7 21.5z"], "square-twitter": [448, 512, ["twitter-square"], "f081", "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM351.3 199.3v0c0 86.7-66 186.6-186.6 186.6c-37.2 0-71.7-10.8-100.7-29.4c5.3 .6 10.4 .8 15.8 .8c30.7 0 58.9-10.4 81.4-28c-28.8-.6-53-19.5-61.3-45.5c10.1 1.5 19.2 1.5 29.6-1.2c-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3c-9-6-16.4-14.1-21.5-23.6s-7.8-20.2-7.7-31c0-12.2 3.2-23.4 8.9-33.1c32.3 39.8 80.8 65.8 135.2 68.6c-9.3-44.5 24-80.6 64-80.6c18.9 0 35.9 7.9 47.9 20.7c14.8-2.8 29-8.3 41.6-15.8c-4.9 15.2-15.2 28-28.8 36.1c13.2-1.4 26-5.1 37.8-10.2c-8.9 13.1-20.1 24.7-32.9 34c.2 2.8 .2 5.7 .2 8.5z"], @@ -429,13 +500,14 @@ "fedora": [448, 512, [], "f798", "M.0413 255.8C.1219 132.2 100.3 32 224 32C347.7 32 448 132.3 448 256C448 379.7 347.8 479.9 224.1 480H50.93C22.84 480 .0832 457.3 .0416 429.2H0V255.8H.0413zM342.6 192.7C342.6 153 307 124.2 269.4 124.2C234.5 124.2 203.6 150.5 199.3 184.1C199.1 187.9 198.9 189.1 198.9 192.6C198.8 213.7 198.9 235.4 198.1 257C199 283.1 199.1 309.1 198.1 333.6C198.1 360.7 178.7 379.1 153.4 379.1C128.1 379.1 107.6 358.9 107.6 333.6C108.1 305.9 130.2 288.3 156.1 287.5H156.3L182.6 287.3V250L156.3 250.2C109.2 249.8 71.72 286.7 70.36 333.6C70.36 379.2 107.9 416.5 153.4 416.5C196.4 416.5 232.1 382.9 236 340.9L236.2 287.4L268.8 287.1C294.1 287.3 293.8 249.3 268.6 249.8L236.2 250.1C236.2 243.7 236.3 237.3 236.3 230.9C236.4 218.2 236.4 205.5 236.2 192.7C236.3 176.2 252 161.5 269.4 161.5C286.9 161.5 305.3 170.2 305.3 192.7C305.3 195.9 305.2 197.8 305 199C303.1 209.5 310.2 219.4 320.7 220.9C331.3 222.4 340.9 214.8 341.9 204.3C342.5 200.1 342.6 196.4 342.6 192.7H342.6z"], "stripe-s": [384, 512, [], "f42a", "M155.3 154.6c0-22.3 18.6-30.9 48.4-30.9 43.4 0 98.5 13.3 141.9 36.7V26.1C298.3 7.2 251.1 0 203.8 0 88.1 0 11 60.4 11 161.4c0 157.9 216.8 132.3 216.8 200.4 0 26.4-22.9 34.9-54.7 34.9-47.2 0-108.2-19.5-156.1-45.5v128.5a396.09 396.09 0 0 0 156 32.4c118.6 0 200.3-51 200.3-153.6 0-170.2-218-139.7-218-203.9z"], "meta": [640, 512, [], "e49b", "M640 317.9C640 409.2 600.6 466.4 529.7 466.4C467.1 466.4 433.9 431.8 372.8 329.8L341.4 277.2C333.1 264.7 326.9 253 320.2 242.2C300.1 276 273.1 325.2 273.1 325.2C206.1 441.8 168.5 466.4 116.2 466.4C43.42 466.4 0 409.1 0 320.5C0 177.5 79.78 42.4 183.9 42.4C234.1 42.4 277.7 67.08 328.7 131.9C365.8 81.8 406.8 42.4 459.3 42.4C558.4 42.4 640 168.1 640 317.9H640zM287.4 192.2C244.5 130.1 216.5 111.7 183 111.7C121.1 111.7 69.22 217.8 69.22 321.7C69.22 370.2 87.7 397.4 118.8 397.4C149 397.4 167.8 378.4 222 293.6C222 293.6 246.7 254.5 287.4 192.2V192.2zM531.2 397.4C563.4 397.4 578.1 369.9 578.1 322.5C578.1 198.3 523.8 97.08 454.9 97.08C421.7 97.08 393.8 123 360 175.1C369.4 188.9 379.1 204.1 389.3 220.5L426.8 282.9C485.5 377 500.3 397.4 531.2 397.4L531.2 397.4z"], - "laravel": [512, 512, [], "f3bd", "M504.4,115.83a5.72,5.72,0,0,0-.28-.68,8.52,8.52,0,0,0-.53-1.25,6,6,0,0,0-.54-.71,9.36,9.36,0,0,0-.72-.94c-.23-.22-.52-.4-.77-.6a8.84,8.84,0,0,0-.9-.68L404.4,55.55a8,8,0,0,0-8,0L300.12,111h0a8.07,8.07,0,0,0-.88.69,7.68,7.68,0,0,0-.78.6,8.23,8.23,0,0,0-.72.93c-.17.24-.39.45-.54.71a9.7,9.7,0,0,0-.52,1.25c-.08.23-.21.44-.28.68a8.08,8.08,0,0,0-.28,2.08V223.18l-80.22,46.19V63.44a7.8,7.8,0,0,0-.28-2.09c-.06-.24-.2-.45-.28-.68a8.35,8.35,0,0,0-.52-1.24c-.14-.26-.37-.47-.54-.72a9.36,9.36,0,0,0-.72-.94,9.46,9.46,0,0,0-.78-.6,9.8,9.8,0,0,0-.88-.68h0L115.61,1.07a8,8,0,0,0-8,0L11.34,56.49h0a6.52,6.52,0,0,0-.88.69,7.81,7.81,0,0,0-.79.6,8.15,8.15,0,0,0-.71.93c-.18.25-.4.46-.55.72a7.88,7.88,0,0,0-.51,1.24,6.46,6.46,0,0,0-.29.67,8.18,8.18,0,0,0-.28,2.1v329.7a8,8,0,0,0,4,6.95l192.5,110.84a8.83,8.83,0,0,0,1.33.54c.21.08.41.2.63.26a7.92,7.92,0,0,0,4.1,0c.2-.05.37-.16.55-.22a8.6,8.6,0,0,0,1.4-.58L404.4,400.09a8,8,0,0,0,4-6.95V287.88l92.24-53.11a8,8,0,0,0,4-7V117.92A8.63,8.63,0,0,0,504.4,115.83ZM111.6,17.28h0l80.19,46.15-80.2,46.18L31.41,63.44Zm88.25,60V278.6l-46.53,26.79-33.69,19.4V123.5l46.53-26.79Zm0,412.78L23.37,388.5V77.32L57.06,96.7l46.52,26.8V338.68a6.94,6.94,0,0,0,.12.9,8,8,0,0,0,.16,1.18h0a5.92,5.92,0,0,0,.38.9,6.38,6.38,0,0,0,.42,1v0a8.54,8.54,0,0,0,.6.78,7.62,7.62,0,0,0,.66.84l0,0c.23.22.52.38.77.58a8.93,8.93,0,0,0,.86.66l0,0,0,0,92.19,52.18Zm8-106.17-80.06-45.32,84.09-48.41,92.26-53.11,80.13,46.13-58.8,33.56Zm184.52,4.57L215.88,490.11V397.8L346.6,323.2l45.77-26.15Zm0-119.13L358.68,250l-46.53-26.79V131.79l33.69,19.4L392.37,178Zm8-105.28-80.2-46.17,80.2-46.16,80.18,46.15Zm8,105.28V178L455,151.19l33.68-19.4v91.39h0Z"], + "laravel": [512, 512, [], "f3bd", "M107.2 0c2.5 0 4.7 .8 6.7 2l94.3 54.1c2.7 1.5 4.5 3.5 5.4 5.9c.9 2.2 .9 4.3 .9 5.6l0 193.4 69.2-39.7 0-100.3c0-2.6 .6-5 2.2-7.2c1.5-2.1 3.5-3.6 5.7-4.8c0 0 0 0 0 0l94-54c1.6-.9 3.4-1.6 5.5-1.6s4 .7 5.6 1.6l95.8 55.1c2.3 1.3 3.9 3 4.9 5.3c.9 2.1 .9 4.2 .9 5.8l0 107.2c0 2-.2 4.3-1.4 6.4c-1.2 2.2-3 3.7-5.1 4.9l-.1 .1-88 50.5 0 100c0 2.3-.3 4.8-1.6 7c-1.3 2.2-3.3 3.7-5.3 4.9c0 0 0 0-.1 0L208.7 510c-2.2 1.2-4.5 2-7.1 2s-4.9-.9-7.1-2l-.1-.1L7.1 402l-.5-.3c-1.1-.7-2.6-1.7-3.8-2.9C.9 396.9 0 394.6 0 391.6L0 65.9c0-4.8 3-7.9 5.5-9.3L100.5 2c2-1.2 4.3-2 6.8-2zM38.1 67.1l69 39.9 69.2-39.9L107.1 27.4l-69 39.7zm353 93.2l69-39.7-69-39.7-69.1 39.7 69.1 39.7zM189.2 89L120 128.8l0 186.4 69.2-39.9 0-186.4zM94.5 128.9L25.2 89.1l0 294.2 164 94.2 0-79.4-87.3-49.3-.2-.1c-1.3-.8-3.2-1.9-4.6-3.7c-1.7-2.1-2.5-4.7-2.5-7.7l0-208.5zm214.7 92.4l69.3 39.6 0-78.5-69.3-39.9 0 78.8zm94.5 39.6L473 221.2l0-78.8-69.3 39.9 0 78.5zM201.6 376.1l163.8-93.2-69-39.9L133 337.1l68.6 38.9zm12.9 101.5l164-94.2 0-78.8-164 93.6 0 79.4z"], "hotjar": [512, 512, [], "f3b1", "M361.5 0c0 131.6-80.7 176.8-140.2 209.4c-.6 .3-1.1 .6-1.6 .9c-53.8 30.2-88.7 49.8-89.6 122H32C32 200.8 112.7 155.6 172.2 123C227 93.2 262.5 73 262.5 0h98.9zM301 302.6c54.8-29.8 90.3-50 90.3-123h98c0 131.6-80.7 176.7-140.2 209.4c-54.8 29.8-90.3 50-90.3 123h-98c0-131.6 80.7-176.8 140.2-209.4z"], "bluetooth-b": [320, 512, [], "f294", "M196.48 260.023l92.626-103.333L143.125 0v206.33l-86.111-86.111-31.406 31.405 108.061 108.399L25.608 368.422l31.406 31.405 86.111-86.111L145.84 512l148.552-148.644-97.912-103.333zm40.86-102.996l-49.977 49.978-.338-100.295 50.315 50.317zM187.363 313.04l49.977 49.978-50.315 50.316.338-100.294z"], "square-letterboxd": [448, 512, [], "e62e", "M384 32c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H384zM105.1 187C66.4 187 35 218.3 35 257s31.4 70 70.1 70c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1c-12.4-19.8-34.4-32.9-59.5-32.9zM224 187c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1C176.9 313.8 198.9 327 224 327c24.8 0 46.5-12.8 59-32.2l.5-.7-.4-.6c-6.5-10.6-10.2-23.1-10.2-36.5c0-13.6 3.9-26.3 10.6-37.1C271.1 200.2 249.1 187 224 187zm118.9 0c-24.8 0-46.5 12.8-59 32.2l-.5 .7 .4 .6c6.5 10.6 10.2 23.1 10.2 36.5c0 13.6-3.9 26.3-10.6 37.1c12.4 19.8 34.4 32.9 59.5 32.9c38.7 0 70.1-31.3 70.1-70s-31.4-70-70.1-70z"], "sticker-mule": [576, 512, [], "f3f7", "M561.7 199.6c-1.3.3.3 0 0 0zm-6.2-77.4c-7.7-22.3-5.1-7.2-13.4-36.9-1.6-6.5-3.6-14.5-6.2-20-4.4-8.7-4.6-7.5-4.6-9.5 0-5.3 30.7-45.3 19-46.9-5.7-.6-12.2 11.6-20.6 17-8.6 4.2-8 5-10.3 5-2.6 0-5.7-3-6.2-5-2-5.7 1.9-25.9-3.6-25.9-3.6 0-12.3 24.8-17 25.8-5.2 1.3-27.9-11.4-75.1 18-25.3 13.2-86.9 65.2-87 65.3-6.7 4.7-20 4.7-35.5 16-44.4 30.1-109.6 9.4-110.7 9-110.6-26.8-128-15.2-159 11.5-20.8 17.9-23.7 36.5-24.2 38.9-4.2 20.4 5.2 48.3 6.7 64.3 1.8 19.3-2.7 17.7 7.7 98.3.5 1 4.1 0 5.1 1.5 0 8.4-3.8 12.1-4.1 13-1.5 4.5-1.5 10.5 0 16 2.3 8.2 8.2 37.2 8.2 46.9 0 41.8.4 44 2.6 49.4 3.9 10 12.5 9.1 17 12 3.1 3.5-.5 8.5 1 12.5.5 2 3.6 4 6.2 5 9.2 3.6 27 .3 29.9-2.5 1.6-1.5.5-4.5 3.1-5 5.1 0 10.8-.5 14.4-2.5 5.1-2.5 4.1-6 1.5-10.5-.4-.8-7-13.3-9.8-16-2.1-2-5.1-3-7.2-4.5-5.8-4.9-10.3-19.4-10.3-19.5-4.6-19.4-10.3-46.3-4.1-66.8 4.6-17.2 39.5-87.7 39.6-87.8 4.1-6.5 17-11.5 27.3-7 6 1.9 19.3 22 65.4 30.9 47.9 8.7 97.4-2 112.2-2 2.8 2-1.9 13-.5 38.9 0 26.4-.4 13.7-4.1 29.9-2.2 9.7 3.4 23.2-1.5 46.9-1.4 9.8-9.9 32.7-8.2 43.4.5 1 1 2 1.5 3.5.5 4.5 1.5 8.5 4.6 10 7.3 3.6 12-3.5 9.8 11.5-.7 3.1-2.6 12 1.5 15 4.4 3.7 30.6 3.4 36.5.5 2.6-1.5 1.6-4.5 6.4-7.4 1.9-.9 11.3-.4 11.3-6.5.3-1.8-9.2-19.9-9.3-20-2.6-3.5-9.2-4.5-11.3-8-6.9-10.1-1.7-52.6.5-59.4 3-11 5.6-22.4 8.7-32.4 11-42.5 10.3-50.6 16.5-68.3.8-1.8 6.4-23.1 10.3-29.9 9.3-17 21.7-32.4 33.5-47.4 18-22.9 34-46.9 52-69.8 6.1-7 8.2-13.7 18-8 10.8 5.7 21.6 7 31.9 17 14.6 12.8 10.2 18.2 11.8 22.9 1.5 5 7.7 10.5 14.9 9.5 10.4-2 13-2.5 13.4-2.5 2.6-.5 5.7-5 7.2-8 3.1-5.5 7.2-9 7.2-16.5 0-7.7-.4-2.8-20.6-52.9z"], "creative-commons-zero": [496, 512, [], "f4f3", "M247.6 8C389.4 8 496 118.1 496 256c0 147.1-118.5 248-248.4 248C113.6 504 0 394.5 0 256 0 123.1 104.7 8 247.6 8zm.8 44.7C130.2 52.7 44.7 150.6 44.7 256c0 109.8 91.2 202.8 203.7 202.8 103.2 0 202.8-81.1 202.8-202.8.1-113.8-90.2-203.3-202.8-203.3zm-.4 60.5c-81.9 0-102.5 77.3-102.5 142.8 0 65.5 20.6 142.8 102.5 142.8S350.5 321.5 350.5 256c0-65.5-20.6-142.8-102.5-142.8zm0 53.9c3.3 0 6.4.5 9.2 1.2 5.9 5.1 8.8 12.1 3.1 21.9l-54.5 100.2c-1.7-12.7-1.9-25.1-1.9-34.4 0-28.8 2-88.9 44.1-88.9zm40.8 46.2c2.9 15.4 3.3 31.4 3.3 42.7 0 28.9-2 88.9-44.1 88.9-13.5 0-32.6-7.7-20.1-26.4l60.9-105.2z"], "hips": [640, 512, [], "f452", "M251.6 157.6c0-1.9-.9-2.8-2.8-2.8h-40.9c-1.6 0-2.7 1.4-2.7 2.8v201.8c0 1.4 1.1 2.8 2.7 2.8h40.9c1.9 0 2.8-.9 2.8-2.8zM156.5 168c-16.1-11.8-36.3-17.9-60.3-18-18.1-.1-34.6 3.7-49.8 11.4V80.2c0-1.8-.9-2.7-2.8-2.7H2.7c-1.8 0-2.7.9-2.7 2.7v279.2c0 1.9.9 2.8 2.7 2.8h41c1.9 0 2.8-.9 2.8-2.8V223.3c0-.8-2.8-27 45.8-27 48.5 0 45.8 26.1 45.8 27v122.6c0 9 7.3 16.3 16.4 16.3h27.3c1.8 0 2.7-.9 2.7-2.8V223.3c0-23.4-9.3-41.8-28-55.3zm478.4 110.1c-6.8-15.7-18.4-27-34.9-34.1l-57.6-25.3c-8.6-3.6-9.2-11.2-2.6-16.1 7.4-5.5 44.3-13.9 84 6.8 1.7 1 4-.3 4-2.4v-44.7c0-1.3-.6-2.1-1.9-2.6-17.7-6.6-36.1-9.9-55.1-9.9-26.5 0-45.3 5.8-58.5 15.4-.5.4-28.4 20-22.7 53.7 3.4 19.6 15.8 34.2 37.2 43.6l53.6 23.5c11.6 5.1 15.2 13.3 12.2 21.2-3.7 9.1-13.2 13.6-36.5 13.6-24.3 0-44.7-8.9-58.4-19.1-2.1-1.4-4.4.2-4.4 2.3v34.4c0 10.4 4.9 17.3 14.6 20.7 15.6 5.5 31.6 8.2 48.2 8.2 12.7 0 25.8-1.2 36.3-4.3.7-.3 36-8.9 45.6-45.8 3.5-13.5 2.4-26.5-3.1-39.1zM376.2 149.8c-31.7 0-104.2 20.1-104.2 103.5v183.5c0 .8.6 2.7 2.7 2.7h40.9c1.9 0 2.8-.9 2.8-2.7V348c16.5 12.7 35.8 19.1 57.7 19.1 60.5 0 108.7-48.5 108.7-108.7.1-60.3-48.2-108.6-108.6-108.6zm0 170.9c-17.2 0-31.9-6.1-44-18.2-12.2-12.2-18.2-26.8-18.2-44 0-34.5 27.6-62.2 62.2-62.2 34.5 0 62.2 27.6 62.2 62.2.1 34.3-27.3 62.2-62.2 62.2zM228.3 72.5c-15.9 0-28.8 12.9-28.9 28.9 0 15.6 12.7 28.9 28.9 28.9s28.9-13.1 28.9-28.9c0-16.2-13-28.9-28.9-28.9z"], + "css": [448, 512, [], "e6a2", "M376.3 32L0 32 0 408.3c0 19 7.6 37.2 21 50.7s31.7 21 50.7 21l304.6 0c19 0 37.2-7.6 50.7-21s21-31.7 21-50.7l0-304.6c0-19-7.6-37.2-21-50.7s-31.7-21-50.7-21zM332.4 431.4c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.5-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-4-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L351.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.5 12.5c7.5 8.4 11.5 20.3 11.8 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4 27.4-12.3 35.7c-8.2 8.3-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-101 0c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.4-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-3.9-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L250.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.4 12.5c7.6 8.4 11.5 20.3 11.9 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4.1 27.4-12.3 35.7s-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-105.6 1.1c-8.4-7.7-12.5-19.2-12.5-34.5l0-75.4c0-15.2 4.4-26.7 13.2-34.6c8.9-7.8 20.7-11.8 35.2-11.8c14.1 0 25.2 4 33.4 12c8.3 8 12.5 20 12.5 35.9l0 6-33.1 0 0-5.8c0-6.1-1.3-10.7-4-13.6c-1.1-1.5-2.6-2.7-4.3-3.5s-3.5-1.2-5.4-1.1c-5.4 0-9.2 1.8-11.4 5.6c-2.3 5.2-3.3 10.8-3 16.4l0 65.5c0 13.7 4.8 20.6 14.4 20.8c4.5 0 7.9-1.6 10.2-4.8c2.5-4.1 3.7-8.8 3.5-13.6l0-4.9 33.1 0 0 5.1c0 10.6-2.1 19.5-6.2 26.6c-4 6.9-9.9 12.5-17.1 16c-7.7 3.7-16.1 5.5-24.6 5.3c-14.2 0-25.5-3.9-33.8-11.6z"], "behance": [576, 512, [], "f1b4", "M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z"], "reddit": [512, 512, [], "f1a1", "M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"], "discord": [640, 512, [], "f392", "M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"], @@ -569,6 +641,7 @@ "spotify": [496, 512, [], "f1bc", "M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"], "optin-monster": [576, 512, [], "f23c", "M572.6 421.4c5.6-9.5 4.7-15.2-5.4-11.6-3-4.9-7-9.5-11.1-13.8 2.9-9.7-.7-14.2-10.8-9.2-4.6-3.2-10.3-6.5-15.9-9.2 0-15.1-11.6-11.6-17.6-5.7-10.4-1.5-18.7-.3-26.8 5.7.3-6.5.3-13 .3-19.7 12.6 0 40.2-11 45.9-36.2 1.4-6.8 1.6-13.8-.3-21.9-3-13.5-14.3-21.3-25.1-25.7-.8-5.9-7.6-14.3-14.9-15.9s-12.4 4.9-14.1 10.3c-8.5 0-19.2 2.8-21.1 8.4-5.4-.5-11.1-1.4-16.8-1.9 2.7-1.9 5.4-3.5 8.4-4.6 5.4-9.2 14.6-11.4 25.7-11.6V256c19.5-.5 43-5.9 53.8-18.1 12.7-13.8 14.6-37.3 12.4-55.1-2.4-17.3-9.7-37.6-24.6-48.1-8.4-5.9-21.6-.8-22.7 9.5-2.2 19.6 1.2 30-38.6 25.1-10.3-23.8-24.6-44.6-42.7-60C341 49.6 242.9 55.5 166.4 71.7c19.7 4.6 41.1 8.6 59.7 16.5-26.2 2.4-52.7 11.3-76.2 23.2-32.8 17-44 29.9-56.7 42.4 14.9-2.2 28.9-5.1 43.8-3.8-9.7 5.4-18.4 12.2-26.5 20-25.8.9-23.8-5.3-26.2-25.9-1.1-10.5-14.3-15.4-22.7-9.7-28.1 19.9-33.5 79.9-12.2 103.5 10.8 12.2 35.1 17.3 54.9 17.8-.3 1.1-.3 1.9-.3 2.7 10.8.5 19.5 2.7 24.6 11.6 3 1.1 5.7 2.7 8.1 4.6-5.4.5-11.1 1.4-16.5 1.9-3.3-6.6-13.7-8.1-21.1-8.1-1.6-5.7-6.5-12.2-14.1-10.3-6.8 1.9-14.1 10-14.9 15.9-22.5 9.5-30.1 26.8-25.1 47.6 5.3 24.8 33 36.2 45.9 36.2v19.7c-6.6-5-14.3-7.5-26.8-5.7-5.5-5.5-17.3-10.1-17.3 5.7-5.9 2.7-11.4 5.9-15.9 9.2-9.8-4.9-13.6-1.7-11.1 9.2-4.1 4.3-7.8 8.6-11.1 13.8-10.2-3.7-11 2.2-5.4 11.6-1.1 3.5-1.6 7-1.9 10.8-.5 31.6 44.6 64 73.5 65.1 17.3.5 34.6-8.4 43-23.5 113.2 4.9 226.7 4.1 340.2 0 8.1 15.1 25.4 24.3 42.7 23.5 29.2-1.1 74.3-33.5 73.5-65.1.2-3.7-.7-7.2-1.7-10.7zm-73.8-254c1.1-3 2.4-8.4 2.4-14.6 0-5.9 6.8-8.1 14.1-.8 11.1 11.6 14.9 40.5 13.8 51.1-4.1-13.6-13-29-30.3-35.7zm-4.6 6.7c19.5 6.2 28.6 27.6 29.7 48.9-1.1 2.7-3 5.4-4.9 7.6-5.7 5.9-15.4 10-26.2 12.2 4.3-21.3.3-47.3-12.7-63 4.9-.8 10.9-2.4 14.1-5.7zm-24.1 6.8c13.8 11.9 20 39.2 14.1 63.5-4.1.5-8.1.8-11.6.8-1.9-21.9-6.8-44-14.3-64.6 3.7.3 8.1.3 11.8.3zM47.5 203c-1.1-10.5 2.4-39.5 13.8-51.1 7-7.3 14.1-5.1 14.1.8 0 6.2 1.4 11.6 2.4 14.6-17.3 6.8-26.2 22.2-30.3 35.7zm9.7 27.6c-1.9-2.2-3.5-4.9-4.9-7.6 1.4-21.3 10.3-42.7 29.7-48.9 3.2 3.2 9.2 4.9 14.1 5.7-13 15.7-17 41.6-12.7 63-10.8-2.2-20.5-6-26.2-12.2zm47.9 14.6c-4.1 0-8.1-.3-12.7-.8-4.6-18.6-1.9-38.9 5.4-53v.3l12.2-5.1c4.9-1.9 9.7-3.8 14.9-4.9-10.7 19.7-17.4 41.3-19.8 63.5zm184-162.7c41.9 0 76.2 34 76.2 75.9 0 42.2-34.3 76.2-76.2 76.2s-76.2-34-76.2-76.2c0-41.8 34.3-75.9 76.2-75.9zm115.6 174.3c-.3 17.8-7 48.9-23 57-13.2 6.6-6.5-7.5-16.5-58.1 13.3.3 26.6.3 39.5 1.1zm-54-1.6c.8 4.9 3.8 40.3-1.6 41.9-11.6 3.5-40 4.3-51.1-1.1-4.1-3-4.6-35.9-4.3-41.1v.3c18.9-.3 38.1-.3 57 0zM278.3 309c-13 3.5-41.6 4.1-54.6-1.6-6.5-2.7-3.8-42.4-1.9-51.6 19.2-.5 38.4-.5 57.8-.8v.3c1.1 8.3 3.3 51.2-1.3 53.7zm-106.5-51.1c12.2-.8 24.6-1.4 36.8-1.6-2.4 15.4-3 43.5-4.9 52.2-1.1 6.8-4.3 6.8-9.7 4.3-21.9-9.8-27.6-35.2-22.2-54.9zm-35.4 31.3c7.8-1.1 15.7-1.9 23.5-2.7 1.6 6.2 3.8 11.9 7 17.6 10 17 44 35.7 45.1 7 6.2 14.9 40.8 12.2 54.9 10.8 15.7-1.4 23.8-1.4 26.8-14.3 12.4 4.3 30.8 4.1 44 3 11.3-.8 20.8-.5 24.6-8.9 1.1 5.1 1.9 11.6 4.6 16.8 10.8 21.3 37.3 1.4 46.8-31.6 8.6.8 17.6 1.9 26.5 2.7-.4 1.3-3.8 7.3 7.3 11.6-47.6 47-95.7 87.8-163.2 107-63.2-20.8-112.1-59.5-155.9-106.5 9.6-3.4 10.4-8.8 8-12.5zm-21.6 172.5c-3.8 17.8-21.9 29.7-39.7 28.9-19.2-.8-46.5-17-59.2-36.5-2.7-31.1 43.8-61.3 66.2-54.6 14.9 4.3 27.8 30.8 33.5 54 0 3-.3 5.7-.8 8.2zm-8.7-66c-.5-13.5-.5-27-.3-40.5h.3c2.7-1.6 5.7-3.8 7.8-6.5 6.5-1.6 13-5.1 15.1-9.2 3.3-7.1-7-7.5-5.4-12.4 2.7-1.1 5.7-2.2 7.8-3.5 29.2 29.2 58.6 56.5 97.3 77-36.8 11.3-72.4 27.6-105.9 47-1.2-18.6-7.7-35.9-16.7-51.9zm337.6 64.6c-103 3.5-206.2 4.1-309.4 0 0 .3 0 .3-.3.3v-.3h.3c35.1-21.6 72.2-39.2 112.4-50.8 11.6 5.1 23 9.5 34.9 13.2 2.2.8 2.2.8 4.3 0 14.3-4.1 28.4-9.2 42.2-15.4 41.5 11.7 78.8 31.7 115.6 53zm10.5-12.4c-35.9-19.5-73-35.9-111.9-47.6 38.1-20 71.9-47.3 103.5-76.7 2.2 1.4 4.6 2.4 7.6 3.2 0 .8.3 1.9.5 2.4-4.6 2.7-7.8 6.2-5.9 10.3 2.2 3.8 8.6 7.6 15.1 8.9 2.4 2.7 5.1 5.1 8.1 6.8 0 13.8-.3 27.6-.8 41.3l.3-.3c-9.3 15.9-15.5 37-16.5 51.7zm105.9 6.2c-12.7 19.5-40 35.7-59.2 36.5-19.3.9-40.5-13.2-40.5-37 5.7-23.2 18.9-49.7 33.5-54 22.7-6.9 69.2 23.4 66.2 54.5zM372.9 75.2c-3.8-72.1-100.8-79.7-126-23.5 44.6-24.3 90.3-15.7 126 23.5zM74.8 407.1c-15.7 1.6-49.5 25.4-49.5 43.2 0 11.6 15.7 19.5 32.2 14.9 12.2-3.2 31.1-17.6 35.9-27.3 6-11.6-3.7-32.7-18.6-30.8zm215.9-176.2c28.6 0 51.9-21.6 51.9-48.4 0-36.1-40.5-58.1-72.2-44.3 9.5 3 16.5 11.6 16.5 21.6 0 23.3-33.3 32-46.5 11.3-7.3 34.1 19.4 59.8 50.3 59.8zM68 474.1c.5 6.5 12.2 12.7 21.6 9.5 6.8-2.7 14.6-10.5 17.3-16.2 3-7-1.1-20-9.7-18.4-8.9 1.6-29.7 16.7-29.2 25.1zm433.2-67c-14.9-1.9-24.6 19.2-18.9 30.8 4.9 9.7 24.1 24.1 36.2 27.3 16.5 4.6 32.2-3.2 32.2-14.9 0-17.8-33.8-41.6-49.5-43.2zM478.8 449c-8.4-1.6-12.4 11.3-9.5 18.4 2.4 5.7 10.3 13.5 17.3 16.2 9.2 3.2 21.1-3 21.3-9.5.9-8.4-20.2-23.5-29.1-25.1z"], "fly": [384, 512, [], "f417", "M197.8 427.8c12.9 11.7 33.7 33.3 33.2 50.7 0 .8-.1 1.6-.1 2.5-1.8 19.8-18.8 31.1-39.1 31-25-.1-39.9-16.8-38.7-35.8 1-16.2 20.5-36.7 32.4-47.6 2.3-2.1 2.7-2.7 5.6-3.6 3.4 0 3.9.3 6.7 2.8zM331.9 67.3c-16.3-25.7-38.6-40.6-63.3-52.1C243.1 4.5 214-.2 192 0c-44.1 0-71.2 13.2-81.1 17.3C57.3 45.2 26.5 87.2 28 158.6c7.1 82.2 97 176 155.8 233.8 1.7 1.6 4.5 4.5 6.2 5.1l3.3.1c2.1-.7 1.8-.5 3.5-2.1 52.3-49.2 140.7-145.8 155.9-215.7 7-39.2 3.1-72.5-20.8-112.5zM186.8 351.9c-28-51.1-65.2-130.7-69.3-189-3.4-47.5 11.4-131.2 69.3-136.7v325.7zM328.7 180c-16.4 56.8-77.3 128-118.9 170.3C237.6 298.4 275 217 277 158.4c1.6-45.9-9.8-105.8-48-131.4 88.8 18.3 115.5 98.1 99.7 153z"], + "square-bluesky": [448, 512, [], "e6a3", "M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 247.4c14.5-30 54-85.8 90.7-113.3c26.5-19.9 69.3-35.2 69.3 13.7c0 9.8-5.6 82.1-8.9 93.8c-11.4 40.8-53 51.2-90 44.9c64.7 11 81.2 47.5 45.6 84c-67.5 69.3-97-17.4-104.6-39.6c0 0 0 0 0 0l-.3-.9c-.9-2.6-1.4-4.1-1.8-4.1s-.9 1.5-1.8 4.1c-.1 .3-.2 .6-.3 .9c0 0 0 0 0 0c-7.6 22.2-37.1 108.8-104.6 39.6c-35.5-36.5-19.1-73 45.6-84c-37 6.3-78.6-4.1-90-44.9c-3.3-11.7-8.9-84-8.9-93.8c0-48.9 42.9-33.5 69.3-13.7c36.7 27.5 76.2 83.4 90.7 113.3z"], "aviato": [640, 512, [], "f421", "M107.2 283.5l-19-41.8H36.1l-19 41.8H0l62.2-131.4 62.2 131.4h-17.2zm-45-98.1l-19.6 42.5h39.2l-19.6-42.5zm112.7 102.4l-62.2-131.4h17.1l45.1 96 45.1-96h17l-62.1 131.4zm80.6-4.3V156.4H271v127.1h-15.5zm209.1-115.6v115.6h-17.3V167.9h-41.2v-11.5h99.6v11.5h-41.1zM640 218.8c0 9.2-1.7 17.8-5.1 25.8-3.4 8-8.2 15.1-14.2 21.1-6 6-13.1 10.8-21.1 14.2-8 3.4-16.6 5.1-25.8 5.1s-17.8-1.7-25.8-5.1c-8-3.4-15.1-8.2-21.1-14.2-6-6-10.8-13-14.2-21.1-3.4-8-5.1-16.6-5.1-25.8s1.7-17.8 5.1-25.8c3.4-8 8.2-15.1 14.2-21.1 6-6 13-8.4 21.1-11.9 8-3.4 16.6-5.1 25.8-5.1s17.8 1.7 25.8 5.1c8 3.4 15.1 5.8 21.1 11.9 6 6 10.7 13.1 14.2 21.1 3.4 8 5.1 16.6 5.1 25.8zm-15.5 0c0-7.3-1.3-14-3.9-20.3-2.6-6.3-6.2-11.7-10.8-16.3-4.6-4.6-10-8.2-16.2-10.9-6.2-2.7-12.8-4-19.8-4s-13.6 1.3-19.8 4c-6.2 2.7-11.6 6.3-16.2 10.9-4.6 4.6-8.2 10-10.8 16.3-2.6 6.3-3.9 13.1-3.9 20.3 0 7.3 1.3 14 3.9 20.3 2.6 6.3 6.2 11.7 10.8 16.3 4.6 4.6 10 8.2 16.2 10.9 6.2 2.7 12.8 4 19.8 4s13.6-1.3 19.8-4c6.2-2.7 11.6-6.3 16.2-10.9 4.6-4.6 8.2-10 10.8-16.3 2.6-6.3 3.9-13.1 3.9-20.3zm-94.8 96.7v-6.3l88.9-10-242.9 13.4c.6-2.2 1.1-4.6 1.4-7.2.3-2 .5-4.2.6-6.5l64.8-8.1-64.9 1.9c0-.4-.1-.7-.1-1.1-2.8-17.2-25.5-23.7-25.5-23.7l-1.1-26.3h23.8l19 41.8h17.1L348.6 152l-62.2 131.4h17.1l19-41.8h23.6L345 268s-22.7 6.5-25.5 23.7c-.1.3-.1.7-.1 1.1l-64.9-1.9 64.8 8.1c.1 2.3.3 4.4.6 6.5.3 2.6.8 5 1.4 7.2L78.4 299.2l88.9 10v6.3c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4 0-6.2-4.6-11.3-10.5-12.2v-5.8l80.3 9v5.4c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-4.9l28.4 3.2v23.7h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9V323l38.3 4.3c8.1 11.4 19 13.6 19 13.6l-.1 6.7-5.1.2-.1 12.1h4.1l.1-5h5.2l.1 5h4.1l-.1-12.1-5.1-.2-.1-6.7s10.9-2.1 19-13.6l38.3-4.3v23.2h-5.9V360h5.9v-6.6h5v6.6h5.9v-13.8h-5.9v-23.7l28.4-3.2v4.9c-5.7 1.1-9.9 6.2-9.9 12.1 0 6.8 5.6 10.2 12.4 10.2 6.8 0 12.4-3.4 12.4-10.2 0-6-4.3-11-9.9-12.1v-5.4l80.3-9v5.8c-5.9.9-10.5 6-10.5 12.2 0 6.8 5.6 12.4 12.4 12.4 6.8 0 12.4-5.6 12.4-12.4-.2-6.3-4.7-11.4-10.7-12.3zm-200.8-87.6l19.6-42.5 19.6 42.5h-17.9l-1.7-40.3-1.7 40.3h-17.9z"], "itunes": [448, 512, [], "f3b4", "M223.6 80.3C129 80.3 52.5 157 52.5 251.5S129 422.8 223.6 422.8s171.2-76.7 171.2-171.2c0-94.6-76.7-171.3-171.2-171.3zm79.4 240c-3.2 13.6-13.5 21.2-27.3 23.8-12.1 2.2-22.2 2.8-31.9-5-11.8-10-12-26.4-1.4-36.8 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 3.2-3.6 2.2-2 2.2-80.8 0-5.6-2.7-7.1-8.4-6.1-4 .7-91.9 17.1-91.9 17.1-5 1.1-6.7 2.6-6.7 8.3 0 116.1.5 110.8-1.2 118.5-2.1 9-7.6 15.8-14.9 19.6-8.3 4.6-23.4 6.6-31.4 5.2-21.4-4-28.9-28.7-14.4-42.9 8.4-8 20.3-9.6 38-12.8 3-.5 5.6-1.2 7.7-3.7 5-5.7.9-127 2.6-133.7.4-2.6 1.5-4.8 3.5-6.4 2.1-1.7 5.8-2.7 6.7-2.7 101-19 113.3-21.4 115.1-21.4 5.7-.4 9 3 9 8.7-.1 170.6.4 161.4-1 167.6zM345.2 32H102.8C45.9 32 0 77.9 0 134.8v242.4C0 434.1 45.9 480 102.8 480h242.4c57 0 102.8-45.9 102.8-102.8V134.8C448 77.9 402.1 32 345.2 32zM223.6 444c-106.3 0-192.5-86.2-192.5-192.5S117.3 59 223.6 59s192.5 86.2 192.5 192.5S329.9 444 223.6 444z"], "cuttlefish": [440, 512, [], "f38c", "M344 305.5c-17.5 31.6-57.4 54.5-96 54.5-56.6 0-104-47.4-104-104s47.4-104 104-104c38.6 0 78.5 22.9 96 54.5 13.7-50.9 41.7-93.3 87-117.8C385.7 39.1 320.5 8 248 8 111 8 0 119 0 256s111 248 248 248c72.5 0 137.7-31.1 183-80.7-45.3-24.5-73.3-66.9-87-117.8z"], @@ -674,7 +747,7 @@ "apper": [640, 512, [], "f371", "M42.1 239.1c22.2 0 29 2.8 33.5 14.6h.8v-22.9c0-11.3-4.8-15.4-17.9-15.4-11.3 0-14.4 2.5-15.1 12.8H4.8c.3-13.9 1.5-19.1 5.8-24.4C17.9 195 29.5 192 56.7 192c33 0 47.1 5 53.9 18.9 2 4.3 4 15.6 4 23.7v76.3H76.3l1.3-19.1h-1c-5.3 15.6-13.6 20.4-35.5 20.4-30.3 0-41.1-10.1-41.1-37.3 0-25.2 12.3-35.8 42.1-35.8zm17.1 48.1c13.1 0 16.9-3 16.9-13.4 0-9.1-4.3-11.6-19.6-11.6-13.1 0-17.9 3-17.9 12.1-.1 10.4 3.7 12.9 20.6 12.9zm77.8-94.9h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.2 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3H137v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm57.9-60.7h38.3l-1.5 20.6h.8c9.1-17.1 15.9-20.9 37.5-20.9 14.4 0 24.7 3 31.5 9.1 9.8 8.6 12.8 20.4 12.8 48.1 0 30-3 43.1-12.1 52.9-6.8 7.3-16.4 10.1-33.3 10.1-20.4 0-29.2-5.5-33.8-21.2h-.8v70.3h-39.5v-169zm80.9 60.7c0-27.5-3.3-32.5-20.7-32.5-16.9 0-20.7 5-20.7 28.7 0 28 3.5 33.5 21.2 33.5 16.4 0 20.2-5.6 20.2-29.7zm53.8-3.8c0-25.4 3.3-37.8 12.3-45.8 8.8-8.1 22.2-11.3 45.1-11.3 42.8 0 55.7 12.8 55.7 55.7v11.1h-75.3c-.3 2-.3 4-.3 4.8 0 16.9 4.5 21.9 20.1 21.9 13.9 0 17.9-3 17.9-13.9h37.5v2.3c0 9.8-2.5 18.9-6.8 24.7-7.3 9.8-19.6 13.6-44.3 13.6-27.5 0-41.6-3.3-50.6-12.3-8.5-8.5-11.3-21.3-11.3-50.8zm76.4-11.6c-.3-1.8-.3-3.3-.3-3.8 0-12.3-3.3-14.6-19.6-14.6-14.4 0-17.1 3-18.1 15.1l-.3 3.3h38.3zm55.6-45.3h38.3l-1.8 19.9h.7c6.8-14.9 14.4-20.2 29.7-20.2 10.8 0 19.1 3.3 23.4 9.3 5.3 7.3 6.8 14.4 6.8 34 0 1.5 0 5 .2 9.3h-35c.3-1.8.3-3.3.3-4 0-15.4-2-19.4-10.3-19.4-6.3 0-10.8 3.3-13.1 9.3-1 3-1 4.3-1 12.3v68h-38.3V192.3z"], "fort-awesome": [512, 512, [], "f286", "M489.2 287.9h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6V146.2c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32h-36.6v-32c0-6-8-4.6-11.7-4.6v-38c8.3-2 17.1-3.4 25.7-3.4 10.9 0 20.9 4.3 31.4 4.3 4.6 0 27.7-1.1 27.7-8v-60c0-2.6-2-4.6-4.6-4.6-5.1 0-15.1 4.3-24 4.3-9.7 0-20.9-4.3-32.6-4.3-8 0-16 1.1-23.7 2.9v-4.9c5.4-2.6 9.1-8.3 9.1-14.3 0-20.7-31.4-20.8-31.4 0 0 6 3.7 11.7 9.1 14.3v111.7c-3.7 0-11.7-1.4-11.7 4.6v32h-36.6v-32c0-2.6-2-4.6-4.6-4.6h-27.4c-2.6 0-4.6 2-4.6 4.6v32H128v-32c0-2.6-2-4.6-4.6-4.6H96c-2.6 0-4.6 2-4.6 4.6v178.3H54.8v-32c0-2.6-2-4.6-4.6-4.6H22.8c-2.6 0-4.6 2-4.6 4.6V512h182.9v-96c0-72.6 109.7-72.6 109.7 0v96h182.9V292.5c.1-2.6-1.9-4.6-4.5-4.6zm-288.1-4.5c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64zm146.4 0c0 2.6-2 4.6-4.6 4.6h-27.4c-2.6 0-4.6-2-4.6-4.6v-64c0-2.6 2-4.6 4.6-4.6h27.4c2.6 0 4.6 2 4.6 4.6v64z"], "waze": [512, 512, [], "f83f", "M502.17 201.67C516.69 287.53 471.23 369.59 389 409.8c13 34.1-12.4 70.2-48.32 70.2a51.68 51.68 0 0 1-51.57-49c-6.44.19-64.2 0-76.33-.64A51.69 51.69 0 0 1 159 479.92c-33.86-1.36-57.95-34.84-47-67.92-37.21-13.11-72.54-34.87-99.62-70.8-13-17.28-.48-41.8 20.84-41.8 46.31 0 32.22-54.17 43.15-110.26C94.8 95.2 193.12 32 288.09 32c102.48 0 197.15 70.67 214.08 169.67zM373.51 388.28c42-19.18 81.33-56.71 96.29-102.14 40.48-123.09-64.15-228-181.71-228-83.45 0-170.32 55.42-186.07 136-9.53 48.91 5 131.35-68.75 131.35C58.21 358.6 91.6 378.11 127 389.54c24.66-21.8 63.87-15.47 79.83 14.34 14.22 1 79.19 1.18 87.9.82a51.69 51.69 0 0 1 78.78-16.42zM205.12 187.13c0-34.74 50.84-34.75 50.84 0s-50.84 34.74-50.84 0zm116.57 0c0-34.74 50.86-34.75 50.86 0s-50.86 34.75-50.86 0zm-122.61 70.69c-3.44-16.94 22.18-22.18 25.62-5.21l.06.28c4.14 21.42 29.85 44 64.12 43.07 35.68-.94 59.25-22.21 64.11-42.77 4.46-16.05 28.6-10.36 25.47 6-5.23 22.18-31.21 62-91.46 62.9-42.55 0-80.88-27.84-87.9-64.25z"], - "bluesky": [576, 512, [], "e671", "M407.8 294.7c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3zM288 227.1C261.9 176.4 190.9 81.9 124.9 35.3C61.6-9.4 37.5-1.7 21.6 5.5C3.3 13.8 0 41.9 0 58.4S9.1 194 15 213.9c19.5 65.7 89.1 87.9 153.2 80.7c3.3-.5 6.6-.9 10-1.4c-3.3 .5-6.6 1-10 1.4C74.3 308.6-9.1 342.8 100.3 464.5C220.6 589.1 265.1 437.8 288 361.1c22.9 76.7 49.2 222.5 185.6 103.4c102.4-103.4 28.1-156-65.8-169.9c-3.3-.4-6.7-.8-10-1.3c3.4 .4 6.7 .9 10 1.3c64.1 7.1 133.6-15.1 153.2-80.7C566.9 194 576 75 576 58.4s-3.3-44.7-21.6-52.9c-15.8-7.1-40-14.9-103.2 29.8C385.1 81.9 314.1 176.4 288 227.1z"], + "bluesky": [512, 512, [], "e671", "M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z"], "cc-jcb": [576, 512, [], "f24b", "M431.5 244.3V212c41.2 0 38.5.2 38.5.2 7.3 1.3 13.3 7.3 13.3 16 0 8.8-6 14.5-13.3 15.8-1.2.4-3.3.3-38.5.3zm42.8 20.2c-2.8-.7-3.3-.5-42.8-.5v35c39.6 0 40 .2 42.8-.5 7.5-1.5 13.5-8 13.5-17 0-8.7-6-15.5-13.5-17zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM182 192.3h-57c0 67.1 10.7 109.7-35.8 109.7-19.5 0-38.8-5.7-57.2-14.8v28c30 8.3 68 8.3 68 8.3 97.9 0 82-47.7 82-131.2zm178.5 4.5c-63.4-16-165-14.9-165 59.3 0 77.1 108.2 73.6 165 59.2V287C312.9 311.7 253 309 253 256s59.8-55.6 107.5-31.2v-28zM544 286.5c0-18.5-16.5-30.5-38-32v-.8c19.5-2.7 30.3-15.5 30.3-30.2 0-19-15.7-30-37-31 0 0 6.3-.3-120.3-.3v127.5h122.7c24.3.1 42.3-12.9 42.3-33.2z"], "snapchat": [512, 512, [62124, "snapchat-ghost"], "f2ab", "M496.926,366.6c-3.373-9.176-9.8-14.086-17.112-18.153-1.376-.806-2.641-1.451-3.72-1.947-2.182-1.128-4.414-2.22-6.634-3.373-22.8-12.09-40.609-27.341-52.959-45.42a102.889,102.889,0,0,1-9.089-16.12c-1.054-3.013-1-4.724-.248-6.287a10.221,10.221,0,0,1,2.914-3.038c3.918-2.591,7.96-5.22,10.7-6.993,4.885-3.162,8.754-5.667,11.246-7.44,9.362-6.547,15.909-13.5,20-21.278a42.371,42.371,0,0,0,2.1-35.191c-6.2-16.318-21.613-26.449-40.287-26.449a55.543,55.543,0,0,0-11.718,1.24c-1.029.224-2.059.459-3.063.72.174-11.16-.074-22.94-1.066-34.534-3.522-40.758-17.794-62.123-32.674-79.16A130.167,130.167,0,0,0,332.1,36.443C309.515,23.547,283.91,17,256,17S202.6,23.547,180,36.443a129.735,129.735,0,0,0-33.281,26.783c-14.88,17.038-29.152,38.44-32.673,79.161-.992,11.594-1.24,23.435-1.079,34.533-1-.26-2.021-.5-3.051-.719a55.461,55.461,0,0,0-11.717-1.24c-18.687,0-34.125,10.131-40.3,26.449a42.423,42.423,0,0,0,2.046,35.228c4.105,7.774,10.652,14.731,20.014,21.278,2.48,1.736,6.361,4.24,11.246,7.44,2.641,1.711,6.5,4.216,10.28,6.72a11.054,11.054,0,0,1,3.3,3.311c.794,1.624.818,3.373-.36,6.6a102.02,102.02,0,0,1-8.94,15.785c-12.077,17.669-29.363,32.648-51.434,44.639C32.355,348.608,20.2,352.75,15.069,366.7c-3.868,10.528-1.339,22.506,8.494,32.6a49.137,49.137,0,0,0,12.4,9.387,134.337,134.337,0,0,0,30.342,12.139,20.024,20.024,0,0,1,6.126,2.741c3.583,3.137,3.075,7.861,7.849,14.78a34.468,34.468,0,0,0,8.977,9.127c10.019,6.919,21.278,7.353,33.207,7.811,10.776.41,22.989.881,36.939,5.481,5.778,1.91,11.78,5.605,18.736,9.92C194.842,480.951,217.707,495,255.973,495s61.292-14.123,78.118-24.428c6.907-4.24,12.872-7.9,18.489-9.758,13.949-4.613,26.163-5.072,36.939-5.481,11.928-.459,23.187-.893,33.206-7.812a34.584,34.584,0,0,0,10.218-11.16c3.434-5.84,3.348-9.919,6.572-12.771a18.971,18.971,0,0,1,5.753-2.629A134.893,134.893,0,0,0,476.02,408.71a48.344,48.344,0,0,0,13.019-10.193l.124-.149C498.389,388.5,500.708,376.867,496.926,366.6Zm-34.013,18.277c-20.745,11.458-34.533,10.23-45.259,17.137-9.114,5.865-3.72,18.513-10.342,23.076-8.134,5.617-32.177-.4-63.239,9.858-25.618,8.469-41.961,32.822-88.038,32.822s-62.036-24.3-88.076-32.884c-31-10.255-55.092-4.241-63.239-9.858-6.609-4.563-1.24-17.211-10.341-23.076-10.739-6.907-24.527-5.679-45.26-17.075-13.206-7.291-5.716-11.8-1.314-13.937,75.143-36.381,87.133-92.552,87.666-96.719.645-5.046,1.364-9.014-4.191-14.148-5.369-4.96-29.189-19.7-35.8-24.316-10.937-7.638-15.748-15.264-12.2-24.638,2.48-6.485,8.531-8.928,14.879-8.928a27.643,27.643,0,0,1,5.965.67c12,2.6,23.659,8.617,30.392,10.242a10.749,10.749,0,0,0,2.48.335c3.6,0,4.86-1.811,4.612-5.927-.768-13.132-2.628-38.725-.558-62.644,2.84-32.909,13.442-49.215,26.04-63.636,6.051-6.932,34.484-36.976,88.857-36.976s82.88,29.92,88.931,36.827c12.611,14.421,23.225,30.727,26.04,63.636,2.071,23.919.285,49.525-.558,62.644-.285,4.327,1.017,5.927,4.613,5.927a10.648,10.648,0,0,0,2.48-.335c6.745-1.624,18.4-7.638,30.4-10.242a27.641,27.641,0,0,1,5.964-.67c6.386,0,12.4,2.48,14.88,8.928,3.546,9.374-1.24,17-12.189,24.639-6.609,4.612-30.429,19.343-35.8,24.315-5.568,5.134-4.836,9.1-4.191,14.149.533,4.228,12.511,60.4,87.666,96.718C468.629,373.011,476.119,377.524,462.913,384.877Z"], "fantasy-flight-games": [512, 512, [], "f6dc", "M256 32.86L32.86 256 256 479.14 479.14 256 256 32.86zM88.34 255.83c1.96-2 11.92-12.3 96.49-97.48 41.45-41.75 86.19-43.77 119.77-18.69 24.63 18.4 62.06 58.9 62.15 59 .68.74 1.07 2.86.58 3.38-11.27 11.84-22.68 23.54-33.5 34.69-34.21-32.31-40.52-38.24-48.51-43.95-17.77-12.69-41.4-10.13-56.98 5.1-2.17 2.13-1.79 3.43.12 5.35 2.94 2.95 28.1 28.33 35.09 35.78-11.95 11.6-23.66 22.97-35.69 34.66-12.02-12.54-24.48-25.53-36.54-38.11-21.39 21.09-41.69 41.11-61.85 60.99zm234.82 101.6c-35.49 35.43-78.09 38.14-106.99 20.47-22.08-13.5-39.38-32.08-72.93-66.84 12.05-12.37 23.79-24.42 35.37-36.31 33.02 31.91 37.06 36.01 44.68 42.09 18.48 14.74 42.52 13.67 59.32-1.8 3.68-3.39 3.69-3.64.14-7.24-10.59-10.73-21.19-21.44-31.77-32.18-1.32-1.34-3.03-2.48-.8-4.69 10.79-10.71 21.48-21.52 32.21-32.29.26-.26.65-.38 1.91-1.07 12.37 12.87 24.92 25.92 37.25 38.75 21.01-20.73 41.24-40.68 61.25-60.42 13.68 13.4 27.13 26.58 40.86 40.03-20.17 20.86-81.68 82.71-100.5 101.5zM256 0L0 256l256 256 256-256L256 0zM16 256L256 16l240 240-240 240L16 256z"], diff --git a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.min.js b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.min.js index 635099654..17901fc04 100644 --- a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.min.js +++ b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/brands.min.js @@ -1,6 +1,6 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ -!function(){"use strict";let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}const{userAgent:z=""}=c.navigator||{};var h=c,a=l,m=(h.document,!a.documentElement||!a.head||"function"!=typeof a.addEventListener||a.createElement,~z.indexOf("MSIE")||z.indexOf("Trident/"),"classic"),C={fak:"kit","fa-kit":"kit"},v={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},s={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},M={kit:"fak"},H={"kit-duotone":"fakd"},a="___FONT_AWESOME___";const V=(()=>{try{return!0}catch(c){return!1}})();function L(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[m]}})}const e={...s};e[m]={...s[m],...C,...v};L(e);const f={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}};f[m]={...f[m],...M,...H};H=L(f);const r={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}};r[m]={...r[m],fak:"fa-kit"};L(r);const t={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}};t[m]={...t[m],"fa-kit":"fak"};L(t),L({classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}});const o=new Set;Object.keys(H[m]).map(o.add.bind(o)),Object.keys(H.sharp).map(o.add.bind(o)),Object.keys(H["sharp-duotone"]).map(o.add.bind(o));const i=h||{};i[a]||(i[a]={}),i[a].styles||(i[a].styles={}),i[a].hooks||(i[a].hooks={}),i[a].shims||(i[a].shims=[]);var d=i[a];function n(h){return Object.keys(h).reduce((c,l)=>{var z=h[l];return!!z.icon?c[z.iconName]=z.icon:c[l]=z,c},{})}function u(c,l,z){var{skipHooks:h=!1}=2{u("fab",b),u("fa-brands",b)})}(); \ No newline at end of file +{let c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var{userAgent:z=""}=c.navigator||{},h=c,m=l;function s(c,l,z){(l=(c=>"symbol"==typeof(c=((c,l)=>{if("object"!=typeof c||!c)return c;var z=c[Symbol.toPrimitive];if(void 0===z)return("string"===l?String:Number)(c);if("object"!=typeof(z=z.call(c,l||"default")))return z;throw new TypeError("@@toPrimitive must return a primitive value.")})(c,"string"))?c:c+"")(l))in c?Object.defineProperty(c,l,{value:z,enumerable:!0,configurable:!0,writable:!0}):c[l]=z}function C(l,c){var z,h=Object.keys(l);return Object.getOwnPropertySymbols&&(z=Object.getOwnPropertySymbols(l),c&&(z=z.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),h.push.apply(h,z)),h}function v(l){for(var c=1;c{try{return!0}catch(c){return!1}})();function f(c){return new Proxy(c,{get(c,l){return l in c?c[l]:c[M]}})}var r=v({},m),t=(r[M]=v(v(v(v({},{"fa-duotone":"duotone"}),m[M]),z),H),f(r),(m=v({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}}))[M]=v(v(v(v({},{duotone:"fad"}),m[M]),e),L),f(m),(z=v({},{classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}}))[M]=v(v({},z[M]),{fak:"fa-kit"}),f(z),(H=v({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}}))[M]=v(v({},H[M]),{"fa-kit":"fak"}),f(H),f(v({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}})),(r=h||{})[V]||(r[V]={}),r[V].styles||(r[V].styles={}),r[V].hooks||(r[V].hooks={}),r[V].shims||(r[V].shims=[]),r[V]);function o(h){return Object.keys(h).reduce((c,l)=>{var z=h[l];return!!z.icon?c[z.iconName]=z.icon:c[l]=z,c},{})}function i(c,l,z){var{skipHooks:z=!1}=2{i("fab",d),i("fa-brands",d)})} \ No newline at end of file diff --git a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/conflict-detection.js b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/conflict-detection.js index 57444ec1f..f0e4b14d5 100644 --- a/docassemble_webapp/docassemble/webapp/static/fontawesome/js/conflict-detection.js +++ b/docassemble_webapp/docassemble/webapp/static/fontawesome/js/conflict-detection.js @@ -1,5 +1,5 @@ /*! - * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. */ @@ -9,14 +9,56 @@ (factory()); }(this, (function () { 'use strict'; + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + let _WINDOW = {}; let _DOCUMENT = {}; - try { if (typeof window !== 'undefined') _WINDOW = window; if (typeof document !== 'undefined') _DOCUMENT = document; } catch (e) {} - const { userAgent = '' } = _WINDOW.navigator || {}; @@ -27,20 +69,16 @@ const IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/'); const functions = []; - const listener = function () { DOCUMENT.removeEventListener('DOMContentLoaded', listener); loaded = 1; functions.map(fn => fn()); }; - let loaded = false; - if (IS_DOM) { loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState); if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener); } - function domready (fn) { if (!IS_DOM) return; loaded ? setTimeout(fn, 0) : functions.push(fn); @@ -52,19 +90,15 @@ nodesFound } = _ref; const timedOutTests = {}; - for (let key in nodesFound) { if (!(nodesTested.conflict[key] || nodesTested.noConflict[key])) { timedOutTests[key] = nodesFound[key]; } } - const conflictsCount = Object.keys(nodesTested.conflict).length; - if (conflictsCount > 0) { console.info("%cConflict".concat(conflictsCount > 1 ? 's' : '', " found:"), 'color: darkred; font-size: large'); const data = {}; - for (let key in nodesTested.conflict) { const item = nodesTested.conflict[key]; data[key] = { @@ -73,16 +107,12 @@ 'innerText excerpt': item.innerText && item.innerText !== '' ? item.innerText.slice(0, 200) + '...' : '(empty)' }; } - console.table(data); } - const noConflictsCount = Object.keys(nodesTested.noConflict).length; - if (noConflictsCount > 0) { console.info("%cNo conflict".concat(noConflictsCount > 1 ? 's' : '', " found with ").concat(noConflictsCount === 1 ? 'this' : 'these', ":"), 'color: green; font-size: large'); const data = {}; - for (let key in nodesTested.noConflict) { const item = nodesTested.noConflict[key]; data[key] = { @@ -91,16 +121,12 @@ 'innerText excerpt': item.innerText && item.innerText !== '' ? item.innerText.slice(0, 200) + '...' : '(empty)' }; } - console.table(data); } - const timeOutCount = Object.keys(timedOutTests).length; - if (timeOutCount > 0) { console.info("%cLeftovers--we timed out before collecting test results for ".concat(timeOutCount === 1 ? 'this' : 'these', ":"), 'color: blue; font-size: large'); const data = {}; - for (let key in timedOutTests) { const item = timedOutTests[key]; data[key] = { @@ -109,7 +135,6 @@ 'innerText excerpt': item.innerText && item.innerText !== '' ? item.innerText.slice(0, 200) + '...' : '(empty)' }; } - console.table(data); } } @@ -121,8 +146,8 @@ } var md5 = createCommonjsModule(function (module) { - (function ($) { + /** * Add integers, wrapping at 2^32. * This uses 16-bit operations internally to work around bugs in interpreters. @@ -131,12 +156,12 @@ * @param {number} y Second integer * @returns {number} Sum */ - function safeAdd(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return msw << 16 | lsw & 0xffff; } + /** * Bitwise rotate a 32-bit number to the left. * @@ -144,11 +169,10 @@ * @param {number} cnt Rotation count * @returns {number} Rotated number */ - - function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; } + /** * Basic operation the algorithm uses. * @@ -160,8 +184,6 @@ * @param {number} t t * @returns {number} Result */ - - function md5cmn(q, a, b, x, s, t) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); } @@ -177,8 +199,6 @@ * @param {number} t t * @returns {number} Result */ - - function md5ff(a, b, c, d, x, s, t) { return md5cmn(b & c | ~b & d, a, b, x, s, t); } @@ -194,8 +214,6 @@ * @param {number} t t * @returns {number} Result */ - - function md5gg(a, b, c, d, x, s, t) { return md5cmn(b & d | c & ~d, a, b, x, s, t); } @@ -211,8 +229,6 @@ * @param {number} t t * @returns {number} Result */ - - function md5hh(a, b, c, d, x, s, t) { return md5cmn(b ^ c ^ d, a, b, x, s, t); } @@ -228,11 +244,10 @@ * @param {number} t t * @returns {number} Result */ - - function md5ii(a, b, c, d, x, s, t) { return md5cmn(c ^ (b | ~d), a, b, x, s, t); } + /** * Calculate the MD5 of an array of little-endian words, and a bit length. * @@ -240,8 +255,6 @@ * @param {number} len Bit length * @returns {Array} MD5 Array */ - - function binlMD5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << len % 32; @@ -255,7 +268,6 @@ var b = -271733879; var c = -1732584194; var d = 271733878; - for (i = 0; i < x.length; i += 16) { olda = a; oldb = b; @@ -330,28 +342,25 @@ c = safeAdd(c, oldc); d = safeAdd(d, oldd); } - return [a, b, c, d]; } + /** * Convert an array of little-endian words to a string * * @param {Array} input MD5 Array * @returns {string} MD5 string */ - - function binl2rstr(input) { var i; var output = ''; var length32 = input.length * 32; - for (i = 0; i < length32; i += 8) { output += String.fromCharCode(input[i >> 5] >>> i % 32 & 0xff); } - return output; } + /** * Convert a raw string to an array of little-endian words * Characters >255 have their high-byte silently ignored. @@ -359,36 +368,30 @@ * @param {string} input Raw input string * @returns {Array} Array of little-endian words */ - - function rstr2binl(input) { var i; var output = []; output[(input.length >> 2) - 1] = undefined; - for (i = 0; i < output.length; i += 1) { output[i] = 0; } - var length8 = input.length * 8; - for (i = 0; i < length8; i += 8) { output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32; } - return output; } + /** * Calculate the MD5 of a raw string * * @param {string} s Input string * @returns {string} Raw MD5 string */ - - function rstrMD5(s) { return binl2rstr(binlMD5(rstr2binl(s), s.length * 8)); } + /** * Calculates the HMAC-MD5 of a key and some data (raw strings) * @@ -396,8 +399,6 @@ * @param {string} data Raw input string * @returns {string} Raw MD5 string */ - - function rstrHMACMD5(key, data) { var i; var bkey = rstr2binl(key); @@ -405,59 +406,51 @@ var opad = []; var hash; ipad[15] = opad[15] = undefined; - if (bkey.length > 16) { bkey = binlMD5(bkey, key.length * 8); } - for (i = 0; i < 16; i += 1) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5c5c5c5c; } - hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); return binl2rstr(binlMD5(opad.concat(hash), 512 + 128)); } + /** * Convert a raw string to a hex string * * @param {string} input Raw input string * @returns {string} Hex encoded string */ - - function rstr2hex(input) { var hexTab = '0123456789abcdef'; var output = ''; var x; var i; - for (i = 0; i < input.length; i += 1) { x = input.charCodeAt(i); output += hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f); } - return output; } + /** * Encode a string as UTF-8 * * @param {string} input Input string * @returns {string} UTF8 string */ - - function str2rstrUTF8(input) { return unescape(encodeURIComponent(input)); } + /** * Encodes input string as raw MD5 string * * @param {string} s Input string * @returns {string} Raw MD5 string */ - - function rawMD5(s) { return rstrMD5(str2rstrUTF8(s)); } @@ -467,8 +460,6 @@ * @param {string} s Input string * @returns {string} Hex encoded string */ - - function hexMD5(s) { return rstr2hex(rawMD5(s)); } @@ -479,8 +470,6 @@ * @param {string} d Input string * @returns {string} Raw MD5 string */ - - function rawHMACMD5(k, d) { return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d)); } @@ -491,11 +480,10 @@ * @param {string} d Input string * @returns {string} Raw MD5 string */ - - function hexHMACMD5(k, d) { return rstr2hex(rawHMACMD5(k, d)); } + /** * Calculates MD5 value for a given string. * If a key is provided, calculates the HMAC-MD5 value. @@ -506,24 +494,18 @@ * @param {boolean} [raw] Raw output switch * @returns {string} MD5 output */ - - function md5(string, key, raw) { if (!key) { if (!raw) { return hexMD5(string); } - return rawMD5(string); } - if (!raw) { return hexHMACMD5(key, string); } - return rawHMACMD5(key, string); } - if (module.exports) { module.exports = md5; } else { @@ -534,7 +516,6 @@ function md5ForNode(node) { if (null === node || 'object' !== typeof node) return undefined; - if (node.src) { return md5(node.src); } else if (node.href) { @@ -553,12 +534,10 @@ const detectionIgnoreAttr = 'data-fa-detection-ignore'; const timeoutAttr = 'data-fa-detection-timeout'; const resultsCollectionMaxWaitAttr = 'data-fa-detection-results-collection-max-wait'; - const silenceErrors = e => { e.preventDefault(); e.stopPropagation(); }; - function pollUntil(_ref) { let { fn = () => true, @@ -572,18 +551,15 @@ function poll(duration, cumulativeDuration) { setTimeout(function () { const result = fn(); - if (showProgress) { console.info(progressIndicator); } - if (!!result) { // eslint-disable-line no-extra-boolean-cast resolve(result); } else { const nextDuration = 250; const nextCumulativeDuration = nextDuration + cumulativeDuration; - if (nextCumulativeDuration <= maxDuration) { poll(nextDuration, nextCumulativeDuration); } else { @@ -592,53 +568,49 @@ } }, duration); } - poll(initialDuration, 0); }); } - function detectWebfontConflicts() { const linkTags = Array.from(DOCUMENT.getElementsByTagName('link')).filter(t => !t.hasAttribute(detectionIgnoreAttr)); const styleTags = Array.from(DOCUMENT.getElementsByTagName('style')).filter(t => { if (t.hasAttribute(detectionIgnoreAttr)) { return false; - } // If the browser has loaded the FA5 CSS, let's not test that