diff --git a/.gitattributes b/.gitattributes
index a6344aac8c09253b3b630fb776ae94478aa0275b..f66637cca53661fb4df1feb4065a133d778430e9 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/bin/clash-linux-amd64 filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/bin/clash-linux-arm64 filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/bin/clash-linux-armv7 filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/conf/Country.mmdb filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/tools/subconverter/subconverter filter=lfs diff=lfs merge=lfs -text
+clash-for-linux-backup/tools/subconverter/subconverter_arm64 filter=lfs diff=lfs merge=lfs -text
diff --git a/clash-for-linux-backup/.env b/clash-for-linux-backup/.env
new file mode 100644
index 0000000000000000000000000000000000000000..e6bb7c3af49e4efef750ef84ce3661c4591b45ae
--- /dev/null
+++ b/clash-for-linux-backup/.env
@@ -0,0 +1,3 @@
+# Clash 订阅地址
+export CLASH_URL='订阅地址'
+export CLASH_SECRET=''
diff --git a/clash-for-linux-backup/.env.bak b/clash-for-linux-backup/.env.bak
new file mode 100644
index 0000000000000000000000000000000000000000..e6bb7c3af49e4efef750ef84ce3661c4591b45ae
--- /dev/null
+++ b/clash-for-linux-backup/.env.bak
@@ -0,0 +1,3 @@
+# Clash 订阅地址
+export CLASH_URL='订阅地址'
+export CLASH_SECRET=''
diff --git a/clash-for-linux-backup/.github/ISSUE_TEMPLATE/feature_request.md b/clash-for-linux-backup/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000000000000000000000000000000000000..585aa7576fc1328723a5f0f41bf57b3a18c3801e
--- /dev/null
+++ b/clash-for-linux-backup/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,23 @@
+---
+name:功能请求
+about:为这个项目提出一个想法
+标题:“”
+标签:“”
+受让人:“”
+
+---
+
+**您的功能请求是否与问题有关?请描述一下**
+对问题的清晰简洁的描述。例如,当[…]
+
+**描述您想要的解决方案**
+对你想要发生的事情的清晰简洁的描述。
+
+**描述你考虑过的替代方案**
+对您考虑过的任何替代解决方案或功能的清晰简洁的描述。
+
+**附加上下文**
+在此处添加有关功能请求的任何其他上下文或屏幕截图。
+
+若无法解决可前往issue查看有没有已经解决的
+
diff --git a/clash-for-linux-backup/LICENSE b/clash-for-linux-backup/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..f288702d2fa16d3cdf0035b15a9fcbc552cd88e7
--- /dev/null
+++ b/clash-for-linux-backup/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/clash-for-linux-backup/README.md b/clash-for-linux-backup/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..a656e078b369db6289ca748c6abae1f60aeeb58b
--- /dev/null
+++ b/clash-for-linux-backup/README.md
@@ -0,0 +1,206 @@
+[TOC]
+
+# 项目介绍
+
+此项目是通过使用开源项目[clash(已跑路)](https://github.com/Dreamacro/clash)作为核心程序,再结合脚本实现简单的代理功能。
+clash核心备份仓库[Clash-backup](https://github.com/Elegycloud/clash-for-linux-backup)
+
+主要是为了解决我们在服务器上下载GitHub等一些国外资源速度慢的问题。
+
+# 免责声明
+1.本项目使用GNU通用公共许可证(GPL)v3.0进行许可。您可以查看本仓库LICENSE进行了解
+
+2.本项目的原作者保留所有知识产权。作为使用者,您需遵守GPL v3.0的要求,并承担因使用本项目而产生的任何风险。
+
+3.本项目所提供的内容不提供任何明示或暗示的保证。在法律允许的范围内,原作者概不负责,不论是直接的、间接的、特殊的、偶然的或后果性的损害。
+
+3.本项目与仓库的创建者和维护者完全无关,仅作为备份仓库,任何因使用本项目而引起的纠纷、争议或损失,与仓库的作者和维护者完全无关。
+
+4.对于使用本项目所导致的任何纠纷或争议,使用者必须遵守自己国家的法律法规,并且需自行解决因使用本项目而产生的任何法律法规问题。
+
+# 题外话
+由于作者已经跑路,当前仓库仅进行备份,若有侵犯您的权利,请提交issues我会看到并删除仓库
+
+(2024/06/07 留:)其次就是,issue我没有时间回,很抱歉,欢迎各位来一起维护和解决这个仓库的问题!
+
+clash for linux 备份(备份号:202311091510)。
+若喜欢本项目,请点个小星星!
+
+
+# 使用须知
+
+- 运行本项目建议使用root用户,或者使用 sudo 提权。
+- 使用过程中如遇到问题,请优先查已有的 [issues](https://github.com/Elegycloud/clash-for-linux-backup/issues)。
+- 在进行issues提交前,请替换提交内容中是敏感信息(例如:订阅地址)。
+- 本项目是基于 [clash(已跑路)](https://github.com/Dreamacro/clash) 、[yacd](https://github.com/haishanh/yacd) 进行的配置整合,关于clash、yacd的详细配置请去原项目查看。
+- 此项目不提供任何订阅信息,请自行准备Clash订阅地址。
+- 运行前请手动更改`.env`文件中的`CLASH_URL`变量值,否则无法正常运行。
+- 当前在RHEL系列和Debian,Kali Linux,ubuntu以及Linux系统中测试过,其他系列可能需要适当修改脚本。
+- 支持 x86_64/aarch64 平台
+- 【注意:部分带有桌面端Linux系统的需要在浏览器设置代理!否则有可能无法使用!】
+- 【若系统代理无法使用,但是想要系统代理,请修改尝试修改start.sh中的端口后执行环境变量命令!】
+- 【还是无法使用请更换当前网络环境(也是其中一个因素!)】
+- 【部分Linux系统会出现谷歌,twitter,youtube等可能无法ping通,正常现象!】
+> **注意**:当你在使用此项目时,遇到任何无法独自解决的问题请优先前往 [Issues](https://github.com/Elegycloud/clash-for-linux-backup/issue) 寻找解决方法。由于空闲时间有限,后续将不再对Issues中 “已经解答”、“已有解决方案” 的问题进行重复性的回答。
+
+
+
+# 使用教程
+
+## 下载项目
+
+下载项目
+
+```bash
+$ git clone https://github.com/Elegycloud/clash-for-linux-backup.git
+```
+
+进入到项目目录,编辑`.env`文件,修改变量`CLASH_URL`的值。
+
+```bash
+$ cd clash-for-linux
+$ vim .env
+```
+
+> **注意:** `.env` 文件中的变量 `CLASH_SECRET` 为自定义 Clash Secret,值为空时,脚本将自动生成随机字符串。
+
+
+
+## 启动程序
+
+直接运行脚本文件`start.sh`
+
+- 进入项目目录
+
+```bash
+$ cd clash-for-linux
+```
+
+- 运行启动脚本
+
+```bash
+$ sudo bash start.sh
+
+正在检测订阅地址...
+Clash订阅地址可访问! [ OK ]
+
+正在下载Clash配置文件...
+配置文件config.yaml下载成功! [ OK ]
+
+正在启动Clash服务...
+服务启动成功! [ OK ]
+
+Clash Dashboard 访问地址:http://:9090/ui
+Secret:xxxxxxxxxxxxx
+
+请执行以下命令加载环境变量: source /etc/profile.d/clash.sh
+
+请执行以下命令开启系统代理: proxy_on
+
+若要临时关闭系统代理,请执行: proxy_off
+
+```
+
+```bash
+$ source /etc/profile.d/clash.sh
+$ proxy_on
+```
+
+- 检查服务端口
+
+```bash
+$ netstat -tln | grep -E '9090|789.'
+tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN
+tcp6 0 0 :::7890 :::* LISTEN
+tcp6 0 0 :::7891 :::* LISTEN
+tcp6 0 0 :::7892 :::* LISTEN
+```
+
+- 检查环境变量
+
+```bash
+$ env | grep -E 'http_proxy|https_proxy'
+http_proxy=http://127.0.0.1:7890
+https_proxy=http://127.0.0.1:7890
+```
+
+以上步鄹如果正常,说明服务clash程序启动成功,现在就可以体验高速下载github资源了。
+
+
+
+## 重启程序
+
+如果需要对Clash配置进行修改,请修改 `conf/config.yaml` 文件。然后运行 `restart.sh` 脚本进行重启。
+
+> **注意:**
+> 重启脚本 `restart.sh` 不会更新订阅信息。
+
+
+
+## 停止程序
+
+- 进入项目目录
+
+```bash
+$ cd clash-for-linux
+```
+
+- 关闭服务
+
+```bash
+$ sudo bash shutdown.sh
+```
+
+服务关闭成功,请执行以下命令关闭系统代理:proxy_off
+
+```bash
+$ proxy_off
+```
+
+然后检查程序端口、进程以及环境变量`http_proxy|https_proxy`,若都没则说明服务正常关闭。
+
+
+
+
+## Clash Dashboard
+
+- 访问 Clash Dashboard
+
+通过浏览器访问 `start.sh` 执行成功后输出的地址,例如:http://192.168.0.1:9090/ui
+
+- 登录管理界面
+
+在`API Base URL`一栏中输入:http://\:9090 ,在`Secret(optional)`一栏中输入启动成功后输出的Secret。
+
+点击Add并选择刚刚输入的管理界面地址,之后便可在浏览器上进行一些配置。
+
+- 更多教程
+
+此 Clash Dashboard 使用的是[yacd](https://github.com/haishanh/yacd)项目,详细使用方法请移步到yacd上查询。
+
+
+
+
+## 终端界面选择代理节点
+
+部分用户无法通过浏览器使用 Clash Dashboard 进行节点选择、代理模式修改等操作,为了方便用户可以在Linux终端进行操作,下面提供了一个功能简单的脚本以便用户可以临时通过终端界面进行配置。
+
+脚本存放位置:`scripts/clash_proxy-selector.sh`
+
+> **注意:**
+>
+> 使用脚本前,需要修改脚本中的 **Secret** 变量值为上述启动脚本输出的值,或者与 `.env` 文件中定义的 **CLASH_SECRET** 变量值保持一致。
+
+
+
+
+
+# 常见问题
+
+1. 部分Linux系统默认的 shell `/bin/sh` 被更改为 `dash`,运行脚本会出现报错(报错内容一般会有 `-en [ OK ]`)。建议使用 `bash xxx.sh` 运行脚本。
+
+2. 部分用户在UI界面找不到代理节点,基本上是因为厂商提供的clash配置文件是经过base64编码的,且配置文件格式不符合clash配置标准。
+
+ 目前此项目已集成自动识别和转换clash配置文件的功能。如果依然无法使用,则需要通过自建或者第三方平台(不推荐,有泄露风险)对订阅地址转换。
+
+3. 程序日志中出现`error: unsupported rule type RULE-SET`报错,解决方法查看官方[WIKI](https://github.com/Dreamacro/clash/wiki/FAQ#error-unsupported-rule-type-rule-set)
diff --git a/clash-for-linux-backup/bin/clash-linux-amd64 b/clash-for-linux-backup/bin/clash-linux-amd64
new file mode 100644
index 0000000000000000000000000000000000000000..7214f678640692f0411050f300e9fe007d853d7e
--- /dev/null
+++ b/clash-for-linux-backup/bin/clash-linux-amd64
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbf106049f518e044d43c909757b4f2e2a07e64b85b1a295c1e1bcec6eeaeda8
+size 9404416
diff --git a/clash-for-linux-backup/bin/clash-linux-arm64 b/clash-for-linux-backup/bin/clash-linux-arm64
new file mode 100644
index 0000000000000000000000000000000000000000..b4734a8155dd6a16b31f7444aea28c3be5d847c3
--- /dev/null
+++ b/clash-for-linux-backup/bin/clash-linux-arm64
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:895d1daeebf6bc9739c3650d8a5e44ba15ac41bbabc9e0485682654cd43118c5
+size 8978432
diff --git a/clash-for-linux-backup/bin/clash-linux-armv7 b/clash-for-linux-backup/bin/clash-linux-armv7
new file mode 100644
index 0000000000000000000000000000000000000000..a804d6c9ed00b56577993dc98910fdc74696112b
--- /dev/null
+++ b/clash-for-linux-backup/bin/clash-linux-armv7
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2cf6511a53c96526f2436770b030e9220683e73f0ee8f13fa221bdbe29a7ed80
+size 9043968
diff --git a/clash-for-linux-backup/conf/Country.mmdb b/clash-for-linux-backup/conf/Country.mmdb
new file mode 100644
index 0000000000000000000000000000000000000000..38fd7629eab666878df46dfc14bcce918c4e5037
--- /dev/null
+++ b/clash-for-linux-backup/conf/Country.mmdb
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:823ddedeff08a1589f580148bb76ed486f4e299a076f5c8066650c34ab6a88ac
+size 3979774
diff --git a/clash-for-linux-backup/conf/config.yaml b/clash-for-linux-backup/conf/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/clash-for-linux-backup/dashboard/public/CNAME b/clash-for-linux-backup/dashboard/public/CNAME
new file mode 100644
index 0000000000000000000000000000000000000000..356aa6f5e68ec71fed2fca8224bbfcf6ba4a0701
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/CNAME
@@ -0,0 +1 @@
+yacd.haishan.me
diff --git a/clash-for-linux-backup/dashboard/public/_headers b/clash-for-linux-backup/dashboard/public/_headers
new file mode 100644
index 0000000000000000000000000000000000000000..877d928f20a49394d323c45c1b489c6e5f6e603d
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/_headers
@@ -0,0 +1,12 @@
+# for netlify hosting
+# https://docs.netlify.com/routing/headers/#syntax-for-the-headers-file
+
+/*
+ X-Frame-Options: DENY
+ X-XSS-Protection: 1; mode=block
+ X-Content-Type-Options: nosniff
+ Referrer-Policy: same-origin
+/*.css
+ Cache-Control: public, max-age=31536000, immutable
+/*.js
+ Cache-Control: public, max-age=31536000, immutable
diff --git a/clash-for-linux-backup/dashboard/public/apple-touch-icon-precomposed.png b/clash-for-linux-backup/dashboard/public/apple-touch-icon-precomposed.png
new file mode 100644
index 0000000000000000000000000000000000000000..e83c40f5fc12f51c02fe0a3f3080a608319b0775
Binary files /dev/null and b/clash-for-linux-backup/dashboard/public/apple-touch-icon-precomposed.png differ
diff --git a/clash-for-linux-backup/dashboard/public/assets/Config.39d8d2ef.css b/clash-for-linux-backup/dashboard/public/assets/Config.39d8d2ef.css
new file mode 100644
index 0000000000000000000000000000000000000000..270732bcad4ee297c9d1a7dee85f6fb7dc24df27
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Config.39d8d2ef.css
@@ -0,0 +1 @@
+._root_v2s4h_1,._section_v2s4h_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_v2s4h_1,._section_v2s4h_2{gap:15px}}._root_v2s4h_1,._section_v2s4h_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_v2s4h_1,._section_v2s4h_2{padding:10px 40px 15px}}._wrapSwitch_v2s4h_26{height:40px;display:flex;align-items:center}._sep_v2s4h_32{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_v2s4h_32{padding:0 40px}}._sep_v2s4h_32>div{border-top:1px dashed #373737}._label_v2s4h_45{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9{border-color:#387cec}._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Config.c09e8dbe.js b/clash-for-linux-backup/dashboard/public/assets/Config.c09e8dbe.js
new file mode 100644
index 0000000000000000000000000000000000000000..87874653a2bd0fec7f5e922ef3a5a1c6bbaaf925
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Config.c09e8dbe.js
@@ -0,0 +1 @@
+import{r as U,b as c,j as t,k as y,s as j,i as S,c as V,l as W,n as L,o as P,q as H,e as T,t as G,h as $,v as q,w as F,x as b,y as J,u as K,C as Q,z as X,B as Y,A as Z,D as ee}from"./index.171f553a.js";import{r as te}from"./logs.43986220.js";import{S as w}from"./Select.6c389032.js";function ne(e,s){if(e==null)return{};var r=ae(e,s),l,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&(!Object.prototype.propertyIsEnumerable.call(e,l)||(r[l]=e[l]))}return r}function ae(e,s){if(e==null)return{};var r={},l=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}var _=U.exports.forwardRef(function(e,s){var r=e.color,l=r===void 0?"currentColor":r,a=e.size,o=a===void 0?24:a,u=ne(e,["color","size"]);return c("svg",{ref:s,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:l,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...u,children:[t("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),t("polyline",{points:"16 17 21 12 16 7"}),t("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})});_.propTypes={color:y.exports.string,size:y.exports.oneOfType([y.exports.string,y.exports.number])};_.displayName="LogOut";const oe=_,{useState:se,useRef:le,useEffect:re,useCallback:ce}=S;function ie(e){return t("input",{className:j.input,...e})}function de({value:e,...s}){const[r,l]=se(e),a=le(e);re(()=>{a.current!==e&&l(e),a.current=e},[e]);const o=ce(u=>l(u.target.value),[l]);return t("input",{className:j.input,value:r,onChange:o,...s})}const ue="_root_v2s4h_1",pe="_section_v2s4h_2",he="_wrapSwitch_v2s4h_26",ge="_sep_v2s4h_32",fe="_label_v2s4h_45",d={root:ue,section:pe,wrapSwitch:he,sep:ge,label:fe},ve="_fieldset_1ghjp_1",me="_input_1ghjp_9",ye="_cnt_1ghjp_9",k={fieldset:ve,input:me,cnt:ye};function Ce({OptionComponent:e,optionPropsList:s,selectedIndex:r,onChange:l}){const a=V("visually-hidden",k.input),o=u=>{l(u.target.value)};return t("fieldset",{className:k.fieldset,children:s.map((u,h)=>c("label",{children:[t("input",{type:"radio",checked:r===h,name:"selection",value:h,"aria-labelledby":"traffic chart type "+h,onChange:o,className:a}),t("div",{className:k.cnt,children:t(e,{...u})})]},h))})}const{useMemo:be}=S,we={plugins:{legend:{display:!1}},scales:{x:{display:!1,type:"category"},y:{display:!1,type:"linear"}}},M=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],ke=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],Se=M;function _e({id:e}){const s=W.read(),r=be(()=>({labels:Se,datasets:[{...L,...P[e].up,data:M},{...L,...P[e].down,data:ke}]}),[e]),l="chart-"+e;return H(s.Chart,l,r,null,we),t("div",{style:{width:100,padding:5},children:t("canvas",{id:l})})}const{useEffect:R,useState:xe,useCallback:g,useRef:Oe,useMemo:Ie}=S,Ne=[{id:0},{id:1},{id:2},{id:3}],Le=[["debug","Debug"],["info","Info"],["warning","Warning"],["error","Error"],["silent","Silent"]],Pe=[{key:"port",label:"HTTP Proxy Port"},{key:"socks-port",label:"SOCKS5 Proxy Port"},{key:"mixed-port",label:"Mixed Port"},{key:"redir-port",label:"Redir Port"}],je=[["zh","\u4E2D\u6587"],["en","English"]],Te=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],$e=e=>({configs:G(e),apiConfig:$(e)}),Me=e=>({selectedChartStyleIndex:Z(e),latencyTestUrl:ee(e),apiConfig:$(e)}),Re=T(Me)(Ae),Ue=T($e)(ze);function ze({dispatch:e,configs:s,apiConfig:r}){return R(()=>{e(q(r))},[e,r]),t(Re,{configs:s})}function Ae({dispatch:e,configs:s,selectedChartStyleIndex:r,latencyTestUrl:l,apiConfig:a}){const[o,u]=xe(s),h=Oe(s);R(()=>{h.current!==s&&u(s),h.current=s},[s]);const z=g(()=>{e(F("apiConfig"))},[e]),f=g((n,i)=>{u({...o,[n]:i})},[o]),A=g(n=>{const i="allow-lan",p=n;f(i,p),e(b(a,{"allow-lan":p}))},[a,e,f]),v=g(({name:n,value:i})=>{switch(n){case"mode":case"log-level":f(n,i),e(b(a,{[n]:i})),n==="log-level"&&te({...a,logLevel:i});break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(i!==""){const p=parseInt(i,10);if(p<0||p>65535)return}f(n,i);break;default:return}},[a,e,f]),E=g(n=>v(n.target),[v]),{selectChartStyleIndex:B,updateAppConfig:x}=J(),O=g(n=>{const i=n.target,{name:p,value:N}=i;switch(p){case"port":case"socks-port":case"mixed-port":case"redir-port":{const C=parseInt(N,10);if(C<0||C>65535)return;e(b(a,{[p]:C}));break}case"latencyTestUrl":{x(p,N);break}default:throw new Error(`unknown input name ${p}`)}},[a,e,x]),D=Ie(()=>{const n=o.mode;return typeof n=="string"&&n[0].toUpperCase()+n.slice(1)},[o.mode]),{t:m,i18n:I}=K();return c("div",{children:[t(Q,{title:m("Config")}),c("div",{className:d.root,children:[Pe.map(n=>o[n.key]!==void 0?c("div",{children:[t("div",{className:d.label,children:n.label}),t(ie,{name:n.key,value:o[n.key],onChange:E,onBlur:O})]},n.key):null),c("div",{children:[t("div",{className:d.label,children:"Mode"}),t(w,{options:Te,selected:D,onChange:n=>v({name:"mode",value:n.target.value})})]}),c("div",{children:[t("div",{className:d.label,children:"Log Level"}),t(w,{options:Le,selected:o["log-level"],onChange:n=>v({name:"log-level",value:n.target.value})})]}),c("div",{children:[t("div",{className:d.label,children:"Allow LAN"}),t("div",{className:d.wrapSwitch,children:t(X,{name:"allow-lan",checked:o["allow-lan"],onChange:A})})]})]}),t("div",{className:d.sep,children:t("div",{})}),c("div",{className:d.section,children:[c("div",{children:[t("div",{className:d.label,children:m("latency_test_url")}),t(de,{name:"latencyTestUrl",type:"text",value:l,onBlur:O})]}),c("div",{children:[t("div",{className:d.label,children:m("lang")}),t("div",{children:t(w,{options:je,selected:I.language,onChange:n=>I.changeLanguage(n.target.value)})})]}),c("div",{children:[t("div",{className:d.label,children:m("chart_style")}),t(Ce,{OptionComponent:_e,optionPropsList:Ne,selectedIndex:r,onChange:B})]}),c("div",{children:[t("div",{className:d.label,children:"Action"}),t(Y,{start:t(oe,{size:16}),label:"Switch backend",onClick:z})]})]})]})}export{Ue as default};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Connections.e48eac36.js b/clash-for-linux-backup/dashboard/public/assets/Connections.e48eac36.js
new file mode 100644
index 0000000000000000000000000000000000000000..4d9866fdbae6a2aa01f189f6076ce4d98d2ae870
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Connections.e48eac36.js
@@ -0,0 +1 @@
+import{r as se,R as be,c as Ae,a as ro,M as Cn,j as q,b as ye,p as pn,m as gn,d as oo,B as vn,e as io,f as ao,g as uo,u as so,C as lo,F as co,I as fo,h as po,S as go}from"./index.171f553a.js";import{u as vo}from"./useRemainingViewPortHeight.7395542b.js";import{C as mo}from"./chevron-down.dd238e96.js";import{f as ho}from"./index.92e2d967.js";import{F as yo,p as wo,A as bo}from"./Fab.ef67ff10.js";import{P as Ro,a as Co}from"./play.7b1a5f99.js";function yt(b){return function(v){return!!v.type&&v.type.tabsRole===b}}var tt=yt("Tab"),wt=yt("TabList"),bt=yt("TabPanel");function So(b){return tt(b)||wt(b)||bt(b)}function vt(b,v){return se.exports.Children.map(b,function(f){return f===null?null:So(f)?v(f):f.props&&f.props.children&&typeof f.props.children=="object"?se.exports.cloneElement(f,Object.assign({},f.props,{children:vt(f.props.children,v)})):f})}function Sn(b,v){return se.exports.Children.forEach(b,function(f){f!==null&&(tt(f)||bt(f)?v(f):f.props&&f.props.children&&typeof f.props.children=="object"&&(wt(f)&&v(f),Sn(f.props.children,v)))})}function Pn(b){var v=0;return Sn(b,function(f){tt(f)&&v++}),v}var Po=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys"];function xo(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}function xn(b){return b&&"getAttribute"in b}function mn(b){return xn(b)&&b.getAttribute("data-rttab")}function ke(b){return xn(b)&&b.getAttribute("aria-disabled")==="true"}var et;function Bo(b){var v=b||(typeof window<"u"?window:void 0);try{et=!!(typeof v<"u"&&v.document&&v.document.activeElement)}catch{et=!1}}var Eo={className:"react-tabs",focus:!1},Rt=function(v){var f=se.exports.useRef([]),g=se.exports.useRef([]),O=se.exports.useRef();function _(m,G){if(!(m<0||m>=X())){var M=v.onSelect,K=v.selectedIndex;M(m,K,G)}}function c(m){for(var G=X(),M=m+1;Mm;)if(!ke(ee(G)))return G;return m}function de(){for(var m=X(),G=0;G=0)&&(f[O]=b[O]);return f}var Go={className:"react-tabs__tab-list"},rt=function(v){var f=v.children,g=v.className,O=Ao(v,ko);return be.createElement("ul",Object.assign({},O,{className:Ae(g),role:"tablist"}),f)};rt.tabsRole="TabList";rt.propTypes={};rt.defaultProps=Go;var Ho=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"];function No(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}var gt="react-tabs__tab",Oo={className:gt,disabledClassName:gt+"--disabled",focus:!1,id:null,selected:!1,selectedClassName:gt+"--selected"},De=function(v){var f,g=se.exports.useRef(),O=v.children,_=v.className,c=v.disabled,U=v.disabledClassName,de=v.focus,u=v.id,X=v.selected,ee=v.selectedClassName,le=v.tabIndex,fe=v.tabRef,D=No(v,Ho);return se.exports.useEffect(function(){X&&de&&g.current.focus()},[X,de]),be.createElement("li",Object.assign({},D,{className:Ae(_,(f={},f[ee]=X,f[U]=c,f)),ref:function(ce){g.current=ce,fe&&fe(ce)},role:"tab",id:"tab"+u,"aria-selected":X?"true":"false","aria-disabled":c?"true":"false","aria-controls":"panel"+u,tabIndex:le||(X?"0":null),"data-rttab":!0}),O)};De.propTypes={};De.tabsRole="Tab";De.defaultProps=Oo;var Wo=["children","className","forceRender","id","selected","selectedClassName"];function _o(b,v){if(b==null)return{};var f={},g=Object.keys(b),O,_;for(_=0;_=0)&&(f[O]=b[O]);return f}var hn="react-tabs__tab-panel",zo={className:hn,forceRender:!1,selectedClassName:hn+"--selected"},Ve=function(v){var f,g=v.children,O=v.className,_=v.forceRender,c=v.id,U=v.selected,de=v.selectedClassName,u=_o(v,Wo);return be.createElement("div",Object.assign({},u,{className:Ae(O,(f={},f[de]=U,f)),role:"tabpanel",id:"panel"+c,"aria-labelledby":"tab"+c}),_||U?g:null)};Ve.tabsRole="TabPanel";Ve.propTypes={};Ve.defaultProps=zo;const Mo="_placeHolder_12xws_1",jo="_connQty_12xws_10",Lo="_inputWrapper_12xws_22",Do="_input_12xws_22",Le={placeHolder:Mo,connQty:jo,inputWrapper:Lo,input:Do};var mt={exports:{}},ht={exports:{}};(function(b,v){(function(f,g){g(v,se.exports)})(ro,function(f,g){function O(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(d){return void n(d)}s.done?t(l):Promise.resolve(l).then(r,i)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(l){O(o,r,i,a,s,"next",l)}function s(l){O(o,r,i,a,s,"throw",l)}a(void 0)})}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function de(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g;var u={init:"init"},X=function(e){var t=e.value;return t===void 0?"":t},ee=function(){return g.createElement(g.Fragment,null,"\xA0")},le={Cell:X,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function fe(){for(var e=arguments.length,t=new Array(e),n=0;n(o=typeof o=="number"?o:1/0)){var a=i;i=o,o=a}return e.filter(function(s){return t.some(function(l){var d=s.values[l];return d>=i&&d<=o})})};Ot.autoRemove=function(e){return!e||typeof e[0]!="number"&&typeof e[1]!="number"};var We=Object.freeze({__proto__:null,text:Et,exactText:It,exactTextCase:Tt,includes:Ft,includesAll:kt,includesSome:At,includesValue:Gt,exact:Ht,equals:Nt,between:Ot});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Wt=function(e){e.stateReducers.push(Jn),e.useInstance.push(Yn)};function Jn(e,t,n,r){if(t.type===u.init)return c({filters:[]},e);if(t.type===u.resetFilters)return c({},e,{filters:r.initialState.filters||[]});if(t.type===u.setFilter){var i=t.columnId,o=t.filterValue,a=r.allColumns,s=r.filterTypes,l=a.find(function(S){return S.id===i});if(!l)throw new Error("React-Table: Could not find a column with id: "+i);var d=Se(l.filter,s||{},We),R=e.filters.find(function(S){return S.id===i}),h=ie(o,R&&R.value);return Ie(d.autoRemove,h,l)?c({},e,{filters:e.filters.filter(function(S){return S.id!==i})}):c({},e,R?{filters:e.filters.map(function(S){return S.id===i?{id:i,value:h}:S})}:{filters:[].concat(e.filters,[{id:i,value:h}])})}if(t.type===u.setAllFilters){var y=t.filters,p=r.allColumns,w=r.filterTypes;return c({},e,{filters:ie(y,e.filters).filter(function(S){var P=p.find(function(E){return E.id===S.id});return!Ie(Se(P.filter,w||{},We).autoRemove,S.value,P)})})}}function Yn(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.filterTypes,s=e.manualFilters,l=e.defaultCanFilter,d=l!==void 0&&l,R=e.disableFilters,h=e.state.filters,y=e.dispatch,p=e.autoResetFilters,w=p===void 0||p,S=g.useCallback(function(x,A){y({type:u.setFilter,columnId:x,filterValue:A})},[y]),P=g.useCallback(function(x){y({type:u.setAllFilters,filters:x})},[y]);o.forEach(function(x){var A=x.id,z=x.accessor,T=x.defaultCanFilter,k=x.disableFilters;x.canFilter=z?ne(k!==!0&&void 0,R!==!0&&void 0,!0):ne(T,d,!1),x.setFilter=function(H){return S(x.id,H)};var $=h.find(function(H){return H.id===A});x.filterValue=$&&$.value});var E=g.useMemo(function(){if(s||!h.length)return[n,r,i];var x=[],A={};return[function z(T,k){k===void 0&&(k=0);var $=T;return($=h.reduce(function(H,V){var L=V.id,Q=V.value,I=o.find(function(te){return te.id===L});if(!I)return H;k===0&&(I.preFilteredRows=H);var j=Se(I.filter,a||{},We);return j?(I.filteredRows=j(H,[L],Q),I.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+I.id+"."),H)},T)).forEach(function(H){x.push(H),A[H.id]=H,H.subRows&&(H.subRows=H.subRows&&H.subRows.length>0?z(H.subRows,k+1):H.subRows)}),$}(n),x,A]},[s,h,n,r,i,o,a]),W=E[0],B=E[1],C=E[2];g.useMemo(function(){o.filter(function(x){return!h.find(function(A){return A.id===x.id})}).forEach(function(x){x.preFilteredRows=W,x.filteredRows=W})},[W,h,o]);var N=m(w);M(function(){N()&&y({type:u.resetFilters})},[y,s?null:t]),Object.assign(e,{preFilteredRows:n,preFilteredFlatRows:r,preFilteredRowsById:i,filteredRows:W,filteredFlatRows:B,filteredRowsById:C,rows:W,flatRows:B,rowsById:C,setFilter:S,setAllFilters:P})}Wt.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var _t=function(e){e.stateReducers.push(Zn),e.useInstance.push(er)};function Zn(e,t,n,r){if(t.type===u.resetGlobalFilter)return c({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===u.setGlobalFilter){var i=t.filterValue,o=r.userFilterTypes,a=Se(r.globalFilter,o||{},We),s=ie(i,e.globalFilter);return Ie(a.autoRemove,s)?(e.globalFilter,U(e,["globalFilter"])):c({},e,{globalFilter:s})}}function er(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.filterTypes,s=e.globalFilter,l=e.manualGlobalFilter,d=e.state.globalFilter,R=e.dispatch,h=e.autoResetGlobalFilter,y=h===void 0||h,p=e.disableGlobalFilter,w=g.useCallback(function(C){R({type:u.setGlobalFilter,filterValue:C})},[R]),S=g.useMemo(function(){if(l||d===void 0)return[n,r,i];var C=[],N={},x=Se(s,a||{},We);if(!x)return console.warn("Could not find a valid 'globalFilter' option."),n;o.forEach(function(z){var T=z.disableGlobalFilter;z.canFilter=ne(T!==!0&&void 0,p!==!0&&void 0,!0)});var A=o.filter(function(z){return z.canFilter===!0});return[function z(T){return(T=x(T,A.map(function(k){return k.id}),d)).forEach(function(k){C.push(k),N[k.id]=k,k.subRows=k.subRows&&k.subRows.length?z(k.subRows):k.subRows}),T}(n),C,N]},[l,d,s,a,o,n,r,i,p]),P=S[0],E=S[1],W=S[2],B=m(y);M(function(){B()&&R({type:u.resetGlobalFilter})},[R,l?null:t]),Object.assign(e,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:i,globalFilteredRows:P,globalFilteredFlatRows:E,globalFilteredRowsById:W,rows:P,flatRows:E,rowsById:W,setGlobalFilter:w,disableGlobalFilter:p})}function zt(e,t){return t.reduce(function(n,r){return n+(typeof r=="number"?r:0)},0)}_t.pluginName="useGlobalFilter";var Mt=Object.freeze({__proto__:null,sum:zt,min:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.min(t,n))}),t},max:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.max(t,n))}),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach(function(r){typeof r=="number"&&(t=Math.min(t,r),n=Math.max(n,r))}),t+".."+n},average:function(e){return zt(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort(function(r,i){return r-i});return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),tr=[],nr={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var jt=function(e){e.getGroupByToggleProps=[rr],e.stateReducers.push(or),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.groupBy])}),e.visibleColumns.push(ir),e.useInstance.push(ur),e.prepareRow.push(sr)};jt.pluginName="useGroupBy";var rr=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(r){r.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function or(e,t,n,r){if(t.type===u.init)return c({groupBy:[]},e);if(t.type===u.resetGroupBy)return c({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===u.setGroupBy)return c({},e,{groupBy:t.value});if(t.type===u.toggleGroupBy){var i=t.columnId,o=t.value,a=o!==void 0?o:!e.groupBy.includes(i);return c({},e,a?{groupBy:[].concat(e.groupBy,[i])}:{groupBy:e.groupBy.filter(function(s){return s!==i})})}}function ir(e,t){var n=t.instance.state.groupBy,r=n.map(function(o){return e.find(function(a){return a.id===o})}).filter(Boolean),i=e.filter(function(o){return!n.includes(o.id)});return(e=[].concat(r,i)).forEach(function(o){o.isGrouped=n.includes(o.id),o.groupedIndex=n.indexOf(o.id)}),e}var ar={};function ur(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,a=e.flatHeaders,s=e.groupByFn,l=s===void 0?Lt:s,d=e.manualGroupBy,R=e.aggregations,h=R===void 0?ar:R,y=e.plugins,p=e.state.groupBy,w=e.dispatch,S=e.autoResetGroupBy,P=S===void 0||S,E=e.disableGroupBy,W=e.defaultCanGroupBy,B=e.getHooks;Z(y,["useColumnOrder","useFilters"],"useGroupBy");var C=m(e);o.forEach(function(I){var j=I.accessor,te=I.defaultGroupBy,pe=I.disableGroupBy;I.canGroupBy=j?ne(I.canGroupBy,pe!==!0&&void 0,E!==!0&&void 0,!0):ne(I.canGroupBy,te,W,!1),I.canGroupBy&&(I.toggleGroupBy=function(){return e.toggleGroupBy(I.id)}),I.Aggregated=I.Aggregated||I.Cell});var N=g.useCallback(function(I,j){w({type:u.toggleGroupBy,columnId:I,value:j})},[w]),x=g.useCallback(function(I){w({type:u.setGroupBy,value:I})},[w]);a.forEach(function(I){I.getGroupByToggleProps=D(B().getGroupByToggleProps,{instance:C(),header:I})});var A=g.useMemo(function(){if(d||!p.length)return[n,r,i,tr,nr,r,i];var I=p.filter(function(ue){return o.find(function(Pe){return Pe.id===ue})}),j=[],te={},pe=[],F={},Y=[],re={},ge=function ue(Pe,Re,un){if(Re===void 0&&(Re=0),Re===I.length)return Pe.map(function(Ue){return c({},Ue,{depth:Re})});var dt=I[Re],Qr=l(Pe,dt);return Object.entries(Qr).map(function(Ue,Jr){var sn=Ue[0],qe=Ue[1],Xe=dt+":"+sn,ln=ue(qe,Re+1,Xe=un?un+">"+Xe:Xe),cn=Re?Ee(qe,"leafRows"):qe,Yr=function(he,ft,eo){var Qe={};return o.forEach(function(oe){if(I.includes(oe.id))Qe[oe.id]=ft[0]?ft[0].values[oe.id]:null;else{var dn=typeof oe.aggregate=="function"?oe.aggregate:h[oe.aggregate]||Mt[oe.aggregate];if(dn){var to=ft.map(function(Je){return Je.values[oe.id]}),no=he.map(function(Je){var pt=Je.values[oe.id];if(!eo&&oe.aggregateValue){var fn=typeof oe.aggregateValue=="function"?oe.aggregateValue:h[oe.aggregateValue]||Mt[oe.aggregateValue];if(!fn)throw console.info({column:oe}),new Error("React Table: Invalid column.aggregateValue option for column listed above");pt=fn(pt,Je,oe)}return pt});Qe[oe.id]=dn(no,to)}else{if(oe.aggregate)throw console.info({column:oe}),new Error("React Table: Invalid column.aggregate option for column listed above");Qe[oe.id]=null}}}),Qe}(cn,qe,Re),Zr={id:Xe,isGrouped:!0,groupByID:dt,groupByVal:sn,values:Yr,subRows:ln,leafRows:cn,depth:Re,index:Jr};return ln.forEach(function(he){j.push(he),te[he.id]=he,he.isGrouped?(pe.push(he),F[he.id]=he):(Y.push(he),re[he.id]=he)}),Zr})}(n);return ge.forEach(function(ue){j.push(ue),te[ue.id]=ue,ue.isGrouped?(pe.push(ue),F[ue.id]=ue):(Y.push(ue),re[ue.id]=ue)}),[ge,j,te,pe,F,Y,re]},[d,p,n,r,i,o,h,l]),z=A[0],T=A[1],k=A[2],$=A[3],H=A[4],V=A[5],L=A[6],Q=m(P);M(function(){Q()&&w({type:u.resetGroupBy})},[w,d?null:t]),Object.assign(e,{preGroupedRows:n,preGroupedFlatRow:r,preGroupedRowsById:i,groupedRows:z,groupedFlatRows:T,groupedRowsById:k,onlyGroupedFlatRows:$,onlyGroupedRowsById:H,nonGroupedFlatRows:V,nonGroupedRowsById:L,rows:z,flatRows:T,rowsById:k,toggleGroupBy:N,setGroupBy:x})}function sr(e){e.allCells.forEach(function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&((n=e.subRows)==null?void 0:n.length)})}function Lt(e,t){return e.reduce(function(n,r,i){var o=""+r.values[t];return n[o]=Array.isArray(n[o])?n[o]:[],n[o].push(r),n},{})}var Dt=/([0-9]+)/gm;function it(e,t){return e===t?0:e>t?1:-1}function _e(e,t,n){return[e.values[n],t.values[n]]}function Vt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}var lr=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];for(i=Vt(i),o=Vt(o),i=i.split(Dt).filter(Boolean),o=o.split(Dt).filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),l=parseInt(a,10),d=parseInt(s,10),R=[l,d].sort();if(isNaN(R[0])){if(a>s)return 1;if(s>a)return-1}else{if(isNaN(R[1]))return isNaN(l)?-1:1;if(l>d)return 1;if(d>l)return-1}}return i.length-o.length},datetime:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];return it(i=i.getTime(),o=o.getTime())},basic:function(e,t,n){var r=_e(e,t,n);return it(r[0],r[1])},string:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1];for(i=i.split("").filter(Boolean),o=o.split("").filter(Boolean);i.length&&o.length;){var a=i.shift(),s=o.shift(),l=a.toLowerCase(),d=s.toLowerCase();if(l>d)return 1;if(d>l)return-1;if(a>s)return 1;if(s>a)return-1}return i.length-o.length},number:function(e,t,n){var r=_e(e,t,n),i=r[0],o=r[1],a=/[^0-9.]/gi;return it(i=Number(String(i).replace(a,"")),o=Number(String(o).replace(a,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",le.sortType="alphanumeric",le.sortDescFirst=!1;var $t=function(e){e.getSortByToggleProps=[cr],e.stateReducers.push(dr),e.useInstance.push(fr)};$t.pluginName="useSortBy";var cr=function(e,t){var n=t.instance,r=t.column,i=n.isMultiSortEvent,o=i===void 0?function(a){return a.shiftKey}:i;return[e,{onClick:r.canSort?function(a){a.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(a))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function dr(e,t,n,r){if(t.type===u.init)return c({sortBy:[]},e);if(t.type===u.resetSortBy)return c({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===u.clearSortBy)return c({},e,{sortBy:e.sortBy.filter(function(C){return C.id!==t.columnId})});if(t.type===u.setSortBy)return c({},e,{sortBy:t.sortBy});if(t.type===u.toggleSortBy){var i,o=t.columnId,a=t.desc,s=t.multi,l=r.allColumns,d=r.disableMultiSort,R=r.disableSortRemove,h=r.disableMultiRemove,y=r.maxMultiSortColCount,p=y===void 0?Number.MAX_SAFE_INTEGER:y,w=e.sortBy,S=l.find(function(C){return C.id===o}).sortDescFirst,P=w.find(function(C){return C.id===o}),E=w.findIndex(function(C){return C.id===o}),W=a!=null,B=[];return(i=!d&&s?P?"toggle":"add":E!==w.length-1||w.length!==1?"replace":P?"toggle":"replace")!="toggle"||R||W||s&&h||!(P&&P.desc&&!S||!P.desc&&S)||(i="remove"),i==="replace"?B=[{id:o,desc:W?a:S}]:i==="add"?(B=[].concat(w,[{id:o,desc:W?a:S}])).splice(0,B.length-p):i==="toggle"?B=w.map(function(C){return C.id===o?c({},C,{desc:W?a:!P.desc}):C}):i==="remove"&&(B=w.filter(function(C){return C.id!==o})),c({},e,{sortBy:B})}}function fr(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.allColumns,o=e.orderByFn,a=o===void 0?Kt:o,s=e.sortTypes,l=e.manualSortBy,d=e.defaultCanSort,R=e.disableSortBy,h=e.flatHeaders,y=e.state.sortBy,p=e.dispatch,w=e.plugins,S=e.getHooks,P=e.autoResetSortBy,E=P===void 0||P;Z(w,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var W=g.useCallback(function(T){p({type:u.setSortBy,sortBy:T})},[p]),B=g.useCallback(function(T,k,$){p({type:u.toggleSortBy,columnId:T,desc:k,multi:$})},[p]),C=m(e);h.forEach(function(T){var k=T.accessor,$=T.canSort,H=T.disableSortBy,V=T.id,L=k?ne(H!==!0&&void 0,R!==!0&&void 0,!0):ne(d,$,!1);T.canSort=L,T.canSort&&(T.toggleSortBy=function(I,j){return B(T.id,I,j)},T.clearSortBy=function(){p({type:u.clearSortBy,columnId:T.id})}),T.getSortByToggleProps=D(S().getSortByToggleProps,{instance:C(),column:T});var Q=y.find(function(I){return I.id===V});T.isSorted=!!Q,T.sortedIndex=y.findIndex(function(I){return I.id===V}),T.isSortedDesc=T.isSorted?Q.desc:void 0});var N=g.useMemo(function(){if(l||!y.length)return[n,r];var T=[],k=y.filter(function($){return i.find(function(H){return H.id===$.id})});return[function $(H){var V=a(H,k.map(function(L){var Q=i.find(function(te){return te.id===L.id});if(!Q)throw new Error("React-Table: Could not find a column with id: "+L.id+" while sorting");var I=Q.sortType,j=Ge(I)||(s||{})[I]||lr[I];if(!j)throw new Error("React-Table: Could not find a valid sortType of '"+I+"' for column '"+L.id+"'.");return function(te,pe){return j(te,pe,L.id,L.desc)}}),k.map(function(L){var Q=i.find(function(I){return I.id===L.id});return Q&&Q.sortInverted?L.desc:!L.desc}));return V.forEach(function(L){T.push(L),L.subRows&&L.subRows.length!==0&&(L.subRows=$(L.subRows))}),V}(n),T]},[l,y,n,r,i,a,s]),x=N[0],A=N[1],z=m(E);M(function(){z()&&p({type:u.resetSortBy})},[l?null:t]),Object.assign(e,{preSortedRows:n,preSortedFlatRows:r,sortedRows:x,sortedFlatRows:A,rows:x,flatRows:A,setSortBy:W,toggleSortBy:B})}function Kt(e,t,n){return[].concat(e).sort(function(r,i){for(var o=0;oe.pageIndex?s=i===-1?o.length>=e.pageSize:a-1),s?c({},e,{pageIndex:a}):e}if(t.type===u.setPageSize){var l=t.pageSize,d=e.pageSize*e.pageIndex;return c({},e,{pageIndex:Math.floor(d/l),pageSize:l})}}function gr(e){var t=e.rows,n=e.autoResetPage,r=n===void 0||n,i=e.manualExpandedKey,o=i===void 0?"expanded":i,a=e.plugins,s=e.pageCount,l=e.paginateExpandedRows,d=l===void 0||l,R=e.expandSubRows,h=R===void 0||R,y=e.state,p=y.pageSize,w=y.pageIndex,S=y.expanded,P=y.globalFilter,E=y.filters,W=y.groupBy,B=y.sortBy,C=e.dispatch,N=e.data,x=e.manualPagination;Z(a,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var A=m(r);M(function(){A()&&C({type:u.resetPage})},[C,x?null:N,P,E,W,B]);var z=x?s:Math.ceil(t.length/p),T=g.useMemo(function(){return z>0?[].concat(new Array(z)).fill(null).map(function(j,te){return te}):[]},[z]),k=g.useMemo(function(){var j;if(x)j=t;else{var te=p*w,pe=te+p;j=t.slice(te,pe)}return d?j:Ne(j,{manualExpandedKey:o,expanded:S,expandSubRows:h})},[h,S,o,x,w,p,d,t]),$=w>0,H=z===-1?k.length>=p:w-1&&o.push(i.splice(l,1)[0])};i.length&&r.length;)a();return[].concat(o,i)}function Wr(e){var t=e.dispatch;e.setColumnOrder=g.useCallback(function(n){return t({type:u.setColumnOrder,columnOrder:n})},[t])}en.pluginName="useColumnOrder",le.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var tn=function(e){e.getResizerProps=[_r],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(zr),e.useInstance.push(jr),e.useInstanceBeforeDimensions.push(Mr)},_r=function(e,t){var n=t.instance,r=t.header,i=n.dispatch,o=function(a,s){var l=!1;if(a.type==="touchstart"){if(a.touches&&a.touches.length>1)return;l=!0}var d,R,h=function(B){var C=[];return function N(x){x.columns&&x.columns.length&&x.columns.map(N),C.push(x)}(B),C}(s).map(function(B){return[B.id,B.totalWidth]}),y=l?Math.round(a.touches[0].clientX):a.clientX,p=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnDoneResizing})},w=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnResizing,clientX:R})},S=function(B){R=B,d||(d=window.requestAnimationFrame(w))},P={mouse:{moveEvent:"mousemove",moveHandler:function(B){return S(B.clientX)},upEvent:"mouseup",upHandler:function(B){document.removeEventListener("mousemove",P.mouse.moveHandler),document.removeEventListener("mouseup",P.mouse.upHandler),p()}},touch:{moveEvent:"touchmove",moveHandler:function(B){return B.cancelable&&(B.preventDefault(),B.stopPropagation()),S(B.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(B){document.removeEventListener(P.touch.moveEvent,P.touch.moveHandler),document.removeEventListener(P.touch.upEvent,P.touch.moveHandler),p()}}},E=l?P.touch:P.mouse,W=!!function(){if(typeof Fe=="boolean")return Fe;var B=!1;try{var C={get passive(){return B=!0,!1}};window.addEventListener("test",null,C),window.removeEventListener("test",null,C)}catch{B=!1}return Fe=B}()&&{passive:!1};document.addEventListener(E.moveEvent,E.moveHandler,W),document.addEventListener(E.upEvent,E.upHandler,W),i({type:u.columnStartResizing,columnId:s.id,columnWidth:s.totalWidth,headerIdWidths:h,clientX:y})};return[e,{onMouseDown:function(a){return a.persist()||o(a,r)},onTouchStart:function(a){return a.persist()||o(a,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function zr(e,t){if(t.type===u.init)return c({columnResizing:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{columnResizing:{columnWidths:{}}});if(t.type===u.columnStartResizing){var n=t.clientX,r=t.columnId,i=t.columnWidth,o=t.headerIdWidths;return c({},e,{columnResizing:c({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:i,isResizingColumn:r})})}if(t.type===u.columnResizing){var a=t.clientX,s=e.columnResizing,l=s.startX,d=s.columnWidth,R=s.headerIdWidths,h=(a-l)/d,y={};return(R===void 0?[]:R).forEach(function(p){var w=p[0],S=p[1];y[w]=Math.max(S+S*h,0)}),c({},e,{columnResizing:c({},e.columnResizing,{columnWidths:c({},e.columnResizing.columnWidths,{},y)})})}return t.type===u.columnDoneResizing?c({},e,{columnResizing:c({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}tn.pluginName="useResizeColumns";var Mr=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,i=e.state.columnResizing,o=m(e);t.forEach(function(a){var s=ne(a.disableResizing!==!0&&void 0,n!==!0&&void 0,!0);a.canResize=s,a.width=i.columnWidths[a.id]||a.originalWidth||a.width,a.isResizing=i.isResizingColumn===a.id,s&&(a.getResizerProps=D(r().getResizerProps,{instance:o(),header:a}))})};function jr(e){var t=e.plugins,n=e.dispatch,r=e.autoResetResize,i=r===void 0||r,o=e.columns;Z(t,["useAbsoluteLayout"],"useResizeColumns");var a=m(i);M(function(){a()&&n({type:u.resetResize})},[o]);var s=g.useCallback(function(){return n({type:u.resetResize})},[n]);Object.assign(e,{resetResizing:s})}var at={position:"absolute",top:0},nn=function(e){e.getTableBodyProps.push(Ke),e.getRowProps.push(Ke),e.getHeaderGroupProps.push(Ke),e.getFooterGroupProps.push(Ke),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},at,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},at,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},at,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})};nn.pluginName="useAbsoluteLayout";var Ke=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},ut={display:"inline-block",boxSizing:"border-box"},st=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},rn=function(e){e.getRowProps.push(st),e.getHeaderGroupProps.push(st),e.getFooterGroupProps.push(st),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},ut,{width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},ut,{width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},ut,{width:r.totalWidth+"px"})}]})};function on(e){e.getTableProps.push(Lr),e.getRowProps.push(lt),e.getHeaderGroupProps.push(lt),e.getFooterGroupProps.push(lt),e.getHeaderProps.push(Dr),e.getCellProps.push(Vr),e.getFooterProps.push($r)}rn.pluginName="useBlockLayout",on.pluginName="useFlexLayout";var Lr=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},lt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Dr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Vr=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},$r=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function an(e){e.stateReducers.push(Xr),e.getTableProps.push(Kr),e.getHeaderProps.push(Ur),e.getRowProps.push(qr)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",an.pluginName="useGridLayout";var Kr=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map(function(r){var i;return n.state.gridLayout.columnWidths[r.id]?n.state.gridLayout.columnWidths[r.id]+"px":(i=n.state.columnResizing)!=null&&i.isResizingColumn?n.state.gridLayout.startWidths[r.id]+"px":typeof r.width=="number"?r.width+"px":r.width}).join(" ")}}]},Ur=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},qr=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Xr(e,t,n,r){if(t.type===u.init)return c({gridLayout:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{gridLayout:{columnWidths:{}}});if(t.type===u.columnStartResizing){var i=t.columnId,o=t.headerIdWidths,a=ct(i);if(a!==void 0){var s=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=ct(N.id),x))},{}),l=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=N.minWidth,x))},{}),d=r.visibleColumns.reduce(function(C,N){var x;return c({},C,((x={})[N.id]=N.maxWidth,x))},{}),R=o.map(function(C){var N=C[0];return[N,ct(N)]});return c({},e,{gridLayout:c({},e.gridLayout,{startWidths:s,minWidths:l,maxWidths:d,headerIdGridWidths:R,columnWidth:a})})}return e}if(t.type===u.columnResizing){var h=t.clientX,y=e.columnResizing.startX,p=e.gridLayout,w=p.columnWidth,S=p.minWidths,P=p.maxWidths,E=p.headerIdGridWidths,W=(h-y)/w,B={};return(E===void 0?[]:E).forEach(function(C){var N=C[0],x=C[1];B[N]=Math.min(Math.max(S[N],x+x*W),P[N])}),c({},e,{gridLayout:c({},e.gridLayout,{columnWidths:c({},e.gridLayout.columnWidths,{},B)})})}return t.type===u.columnDoneResizing?c({},e,{gridLayout:c({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function ct(e){var t,n=(t=document.getElementById("header-cell-"+e))==null?void 0:t.offsetWidth;if(n!==void 0)return n}f._UNSTABLE_usePivotColumns=qt,f.actions=u,f.defaultColumn=le,f.defaultGroupByFn=Lt,f.defaultOrderByFn=Kt,f.defaultRenderer=X,f.emptyRenderer=ee,f.ensurePluginOrder=Z,f.flexRender=ae,f.functionalUpdate=ie,f.loopHooks=ce,f.makePropGetter=D,f.makeRenderer=K,f.reduceHooks=J,f.safeUseLayoutEffect=G,f.useAbsoluteLayout=nn,f.useAsyncDebounce=function(e,t){t===void 0&&(t=0);var n=g.useRef({}),r=m(e),i=m(t);return g.useCallback(function(){var o=_(regeneratorRuntime.mark(function a(){var s,l,d,R=arguments;return regeneratorRuntime.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:for(s=R.length,l=new Array(s),d=0;d1?t-1:0),r=1;rb.accessor!=="process");function Zo(b){switch(b.column.id){case"start":return ho(b.value,0);case"download":case"upload":return pn(b.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return pn(b.value)+"/s";default:return b.value}}const ei={id:"id",desc:!0},ti={sortBy:[ei],hiddenColumns:["id"]};function ni({data:b}){const v=be.useContext(Cn),{getTableProps:f,headerGroups:g,rows:O,prepareRow:_}=mt.exports.useTable({columns:v.hasProcessPath?Jo:Yo,data:b,initialState:ti,autoResetSortBy:!1},mt.exports.useSortBy);return q("div",{...f(),style:{"--col-count":v.hasProcessPath?"12":"11"},children:g.map(c=>ye("div",{...c.getHeaderGroupProps(),className:xe.tr,children:[c.headers.map(U=>ye("div",{...U.getHeaderProps(U.getSortByToggleProps()),className:xe.th,children:[q("span",{children:U.render("Header")}),q("span",{className:xe.sortIconContainer,children:U.isSorted?q("span",{className:U.isSortedDesc?"":xe.rotate180,children:q(mo,{size:16})}):null})]})),O.map((U,de)=>(_(U),U.cells.map((u,X)=>q("div",{...u.getCellProps(),className:Ae(xe.td,de%2===0?xe.odd:!1,v.hasProcessPath?X>=2&&X<=5?xe.du:!1:X>=1&&X<=4?xe.du:!1),children:Zo(u)}))))]}))})}const ri="_overlay_148w6_1",oi="_cnt_148w6_5",ii="_afterOpen_148w6_15",ai="_btngrp_148w6_20",Ye={overlay:ri,cnt:oi,afterOpen:ii,btngrp:ai},{useRef:ui,useCallback:si,useMemo:li}=be;function ci({isOpen:b,onRequestClose:v,primaryButtonOnTap:f}){const g=ui(null),O=si(()=>{g.current.focus()},[]),_=li(()=>({base:Ae(gn.content,Ye.cnt),afterOpen:Ye.afterOpen,beforeClose:""}),[]);return ye(oo,{isOpen:b,onRequestClose:v,onAfterOpen:O,className:_,overlayClassName:Ae(gn.overlay,Ye.overlay),children:[q("p",{children:"Are you sure you want to close all connections?"}),ye("div",{className:Ye.btngrp,children:[q(vn,{onClick:f,ref:g,children:"I'm sure"}),q("div",{style:{width:20}}),q(vn,{onClick:v,children:"No"})]})]})}const{useEffect:di,useState:Me,useRef:fi,useCallback:je}=be,yn=30;function pi(b){const v={};for(let f=0;f[f.host,f.sourceIP,f.sourcePort,f.destinationIP,f.chains,f.rule,f.type,f.network,f.processPath].some(g=>vi(g,v))):b}function mi(b,v,f,g){const{id:O,metadata:_,upload:c,download:U,start:de,chains:u,rule:X,rulePayload:ee}=b,{host:le,destinationPort:fe,destinationIP:D,network:J,type:ce,sourceIP:Z,sourcePort:ie}=_,m=_.processPath;g.hasProcessPath===!1&&typeof m<"u"&&(g.hasProcessPath=!0);let G=le;G===""&&(G=D);const M=v[O];return{id:O,upload:c,download:U,start:f-new Date(de).valueOf(),chains:u.reverse().join(" / "),rule:ee?`${X}(${ee})`:X,..._,host:`${G}:${fe}`,type:`${ce}(${J})`,source:`${Z}:${ie}`,downloadSpeedCurr:U-(M?M.download:0),uploadSpeedCurr:c-(M?M.upload:0),process:gi(m)}}function bn(b){return b.length>0?q(ni,{data:b}):q("div",{className:Le.placeHolder,children:q(go,{width:200,height:200,c1:"var(--color-text)"})})}function Rn({qty:b}){return b<100?""+b:"99+"}function hi({apiConfig:b}){const[v,f]=vo(),[g,O]=Me([]),[_,c]=Me([]),[U,de]=Me(""),u=wn(g,U),X=wn(_,U),[ee,le]=Me(!1),fe=je(()=>le(!0),[]),D=je(()=>le(!1),[]),[J,ce]=Me(!1),Z=je(()=>{ce(ae=>!ae)},[]),ie=je(()=>{ao(b),D()},[b,D]),m=fi(g),G=be.useContext(Cn),M=je(({connections:ae})=>{const ve=pi(m.current),Be=Date.now(),me=ae.map(we=>mi(we,ve,Be,G)),Ce=[];for(const we of m.current)me.findIndex(ne=>ne.id===we.id)<0&&Ce.push(we);c(we=>[...Ce,...we].slice(0,101)),me&&(me.length!==0||m.current.length!==0)&&!J?(m.current=me,O(me)):m.current=me},[O,J]);di(()=>uo(b,M),[b,M]);const{t:K}=so();return ye("div",{children:[q(lo,{title:K("Connections")}),ye(nt,{children:[ye("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[ye(rt,{children:[ye(De,{children:[q("span",{children:K("Active")}),q("span",{className:Le.connQty,children:Rn({qty:u.length})})]}),ye(De,{children:[q("span",{children:K("Closed")}),q("span",{className:Le.connQty,children:Rn({qty:X.length})})]})]}),q("div",{className:Le.inputWrapper,children:q("input",{type:"text",name:"filter",autoComplete:"off",className:Le.input,placeholder:"Filter",onChange:ae=>de(ae.target.value)})})]}),q("div",{ref:v,style:{padding:30,paddingBottom:yn,paddingTop:0},children:ye("div",{style:{height:f-yn,overflow:"auto"},children:[ye(Ve,{children:[q(co,{children:bn(u)}),q(yo,{icon:J?q(Ro,{size:16}):q(Co,{size:16}),mainButtonStyles:J?{background:"#e74c3c"}:{},style:wo,text:K(J?"Resume Refresh":"Pause Refresh"),onClick:Z,children:q(bo,{text:"Close All Connections",onClick:fe,children:q(fo,{size:10})})})]}),q(Ve,{children:bn(X)})]})}),q(ci,{isOpen:ee,primaryButtonOnTap:ie,onRequestClose:D})]})]})}const yi=b=>({apiConfig:po(b)}),xi=io(yi)(hi);export{xi as default};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Connections.fb8ea59b.css b/clash-for-linux-backup/dashboard/public/assets/Connections.fb8ea59b.css
new file mode 100644
index 0000000000000000000000000000000000000000..5d18a47f27d251182d57003fd50b26574bb2a09d
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Connections.fb8ea59b.css
@@ -0,0 +1 @@
+.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._placeHolder_12xws_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_12xws_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._inputWrapper_12xws_22{margin:0 30px;width:100%;max-width:350px;justify-self:flex-end}._input_12xws_22{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_daq0k_1{display:grid;grid-template-columns:repeat(var(--col-count, 11),minmax(-webkit-max-content,auto));grid-template-columns:repeat(var(--col-count, 11),minmax(max-content,auto))}._th_daq0k_6{padding:8px 10px;height:50px;background:var(--color-background);position:-webkit-sticky;position:sticky;top:0;font-size:.8em;text-align:center;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between}._th_daq0k_6:hover{color:var(--color-text-highlight)}._td_daq0k_23{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._td_daq0k_23._odd_daq0k_29{background:var(--color-row-odd)}._du_daq0k_34{text-align:right}._sortIconContainer_daq0k_38{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_daq0k_45{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Fab.a0a7e573.css b/clash-for-linux-backup/dashboard/public/assets/Fab.a0a7e573.css
new file mode 100644
index 0000000000000000000000000000000000000000..673a61d5ec5debb094a1a5045ac5b1c7359ca764
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Fab.a0a7e573.css
@@ -0,0 +1 @@
+.rtf{box-sizing:border-box;margin:25px;position:fixed;white-space:nowrap;z-index:9998;padding-left:0;list-style:none}.rtf.open .rtf--mb{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c:nth-child(1){-webkit-transform:translateY(-60px) scale(1);transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:nth-child(1).top{-webkit-transform:translateY(60px) scale(1);transform:translateY(60px) scale(1)}.rtf.open .rtf--ab__c:nth-child(2){-webkit-transform:translateY(-120px) scale(1);transform:translateY(-120px) scale(1);transition-delay:.09s}.rtf.open .rtf--ab__c:nth-child(2).top{-webkit-transform:translateY(120px) scale(1);transform:translateY(120px) scale(1)}.rtf.open .rtf--ab__c:nth-child(3){-webkit-transform:translateY(-180px) scale(1);transform:translateY(-180px) scale(1);transition-delay:.12s}.rtf.open .rtf--ab__c:nth-child(3).top{-webkit-transform:translateY(180px) scale(1);transform:translateY(180px) scale(1)}.rtf.open .rtf--ab__c:nth-child(4){-webkit-transform:translateY(-240px) scale(1);transform:translateY(-240px) scale(1);transition-delay:.15s}.rtf.open .rtf--ab__c:nth-child(4).top{-webkit-transform:translateY(240px) scale(1);transform:translateY(240px) scale(1)}.rtf.open .rtf--ab__c:nth-child(5){-webkit-transform:translateY(-300px) scale(1);transform:translateY(-300px) scale(1);transition-delay:.18s}.rtf.open .rtf--ab__c:nth-child(5).top{-webkit-transform:translateY(300px) scale(1);transform:translateY(300px) scale(1)}.rtf.open .rtf--ab__c:nth-child(6){-webkit-transform:translateY(-360px) scale(1);transform:translateY(-360px) scale(1);transition-delay:.21s}.rtf.open .rtf--ab__c:nth-child(6).top{-webkit-transform:translateY(360px) scale(1);transform:translateY(360px) scale(1)}.rtf--mb__c{padding:25px;margin:-25px}.rtf--mb__c *:last-child{margin-bottom:0}.rtf--mb__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin-right:6px;margin-left:4px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--mb__c>span.right{right:100%}.rtf--mb{width:48px;height:48px;background:var(--btn-bg);z-index:9999;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--mb>*{transition:ease-in-out transform .2s}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0;transition:ease-in-out transform .2s}.rtf--ab__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin-right:6px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:nth-child(1){-webkit-transform:translateY(-60px) scale(0);transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:nth-child(1).top{-webkit-transform:translateY(60px) scale(0);transform:translateY(60px) scale(0)}.rtf--ab__c:nth-child(2){-webkit-transform:translateY(-120px) scale(0);transform:translateY(-120px) scale(0);transition-delay:.18s}.rtf--ab__c:nth-child(2).top{-webkit-transform:translateY(120px) scale(0);transform:translateY(120px) scale(0)}.rtf--ab__c:nth-child(3){-webkit-transform:translateY(-180px) scale(0);transform:translateY(-180px) scale(0);transition-delay:.15s}.rtf--ab__c:nth-child(3).top{-webkit-transform:translateY(180px) scale(0);transform:translateY(180px) scale(0)}.rtf--ab__c:nth-child(4){-webkit-transform:translateY(-240px) scale(0);transform:translateY(-240px) scale(0);transition-delay:.12s}.rtf--ab__c:nth-child(4).top{-webkit-transform:translateY(240px) scale(0);transform:translateY(240px) scale(0)}.rtf--ab__c:nth-child(5){-webkit-transform:translateY(-300px) scale(0);transform:translateY(-300px) scale(0);transition-delay:.09s}.rtf--ab__c:nth-child(5).top{-webkit-transform:translateY(300px) scale(0);transform:translateY(300px) scale(0)}.rtf--ab__c:nth-child(6){-webkit-transform:translateY(-360px) scale(0);transform:translateY(-360px) scale(0);transition-delay:.03s}.rtf--ab__c:nth-child(6).top{-webkit-transform:translateY(360px) scale(0);transform:translateY(360px) scale(0)}.rtf--ab{height:40px;width:40px;margin-right:4px;background-color:#aaa;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:16px;z-index:10000}.rtf--ab:hover{background:#387cec;border:1px solid #387cec;color:#fff}.rtf--ab:focus{border-color:var(--color-focus-blue)}._spining_4i8sg_1{position:relative;border-radius:50%;background:linear-gradient(60deg,#e66465,#9198e5);width:48px;height:48px;display:flex;justify-content:center;align-items:center}._spining_4i8sg_1:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;-webkit-animation:_spining_keyframes_4i8sg_1 1s linear infinite;animation:_spining_keyframes_4i8sg_1 1s linear infinite}@-webkit-keyframes _spining_keyframes_4i8sg_1{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _spining_keyframes_4i8sg_1{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Fab.ef67ff10.js b/clash-for-linux-backup/dashboard/public/assets/Fab.ef67ff10.js
new file mode 100644
index 0000000000000000000000000000000000000000..33d116e54b05a6b790b018c29e3559cf3567bf48
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Fab.ef67ff10.js
@@ -0,0 +1 @@
+import{j as e,b,i as y,r as l}from"./index.171f553a.js";const F="_spining_4i8sg_1",M="_spining_keyframes_4i8sg_1",j={spining:F,spining_keyframes:M},{useState:v}=y;function B({children:s}){return e("span",{className:j.spining,children:s})}const H={right:10,bottom:10},L=({children:s,...n})=>e("button",{type:"button",...n,className:"rtf--ab",children:s}),E=({children:s,...n})=>e("button",{type:"button",className:"rtf--mb",...n,children:s}),O={bottom:24,right:24},R=({event:s="hover",style:n=O,alwaysShowTitle:o=!1,children:f,icon:g,mainButtonStyles:h,onClick:p,text:d,..._})=>{const[a,r]=v(!1),c=o||!a,u=()=>r(!0),m=()=>r(!1),x=()=>s==="hover"&&u(),k=()=>s==="hover"&&m(),N=t=>p?p(t):(t.persist(),s==="click"?a?m():u():null),$=(t,i)=>{t.persist(),r(!1),setTimeout(()=>{i(t)},1)},C=()=>l.exports.Children.map(f,(t,i)=>l.exports.isValidElement(t)?b("li",{className:`rtf--ab__c ${"top"in n?"top":""}`,children:[l.exports.cloneElement(t,{"data-testid":`action-button-${i}`,"aria-label":t.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...t.props,onClick:I=>{t.props.onClick&&$(I,t.props.onClick)}}),t.props.text&&e("span",{className:`${"right"in n?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:t.props.text})]}):null);return e("ul",{onMouseEnter:x,onMouseLeave:k,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:n,..._,children:b("li",{className:"rtf--mb__c",children:[e(E,{onClick:N,style:h,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:g}),d&&e("span",{className:`${"right"in n?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:d}),e("ul",{children:C()})]})})};export{L as A,R as F,B as I,H as p};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Logs.4b8e75d1.css b/clash-for-linux-backup/dashboard/public/assets/Logs.4b8e75d1.css
new file mode 100644
index 0000000000000000000000000000000000000000..821aba4b1e5a77b2da9173edf500679569738a1e
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Logs.4b8e75d1.css
@@ -0,0 +1 @@
+._RuleSearch_1oz2t_1{padding:0 40px 5px}._RuleSearchContainer_1oz2t_5{position:relative;height:40px}._inputWrapper_1oz2t_10{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._input_1oz2t_10{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._iconWrapper_1oz2t_35{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px;display:flex;justify-content:center;align-items:center}._logMeta_7a1x3_1{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em}._logType_7a1x3_8{color:#eee;flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_7a1x3_18{flex-shrink:0;color:#999;font-size:14px}._logText_7a1x3_24{flex-shrink:0;display:flex;font-family:Roboto Mono,Menlo,monospace;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._logsWrapper_7a1x3_37{margin:0;padding:0;color:var(--color-text)}._logsWrapper_7a1x3_37 .log{padding:10px 40px;background:var(--color-background)}._logsWrapper_7a1x3_37 .log.even{background:var(--color-background)}._logPlaceholder_7a1x3_51{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_7a1x3_51 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_7a1x3_64{opacity:.3}._search_7a1x3_68{max-width:1000px}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Logs.ac990610.js b/clash-for-linux-backup/dashboard/public/assets/Logs.ac990610.js
new file mode 100644
index 0000000000000000000000000000000000000000..1515a995974724ebb93fd0bd43eb41a71ca1a6c7
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Logs.ac990610.js
@@ -0,0 +1 @@
+import{r as m,b as l,j as t,k as u,e as y,J as T,K as b,y as P,L,u as R,C as N,S as z,N as C,O as W,h as w,P as k,i as j,c as I}from"./index.171f553a.js";import{a as O,F}from"./index.esm.e4dd1508.js";import{r as M,s as $,f as A}from"./logs.43986220.js";import{d as B}from"./debounce.c2d20996.js";import{u as D}from"./useRemainingViewPortHeight.7395542b.js";import{F as E,p as H}from"./Fab.ef67ff10.js";import{P as K,a as q}from"./play.7b1a5f99.js";function J(e,n){if(e==null)return{};var r=V(e,n),a,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,a)||(r[a]=e[a]))}return r}function V(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,s;for(s=0;s=0)&&(r[o]=e[o]);return r}var f=m.exports.forwardRef(function(e,n){var r=e.color,a=r===void 0?"currentColor":r,o=e.size,s=o===void 0?24:o,p=J(e,["color","size"]);return l("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...p,children:[t("circle",{cx:"11",cy:"11",r:"8"}),t("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})});f.propTypes={color:u.exports.string,size:u.exports.oneOfType([u.exports.string,u.exports.number])};f.displayName="Search";const Y=f,G="_RuleSearch_1oz2t_1",Q="_RuleSearchContainer_1oz2t_5",U="_inputWrapper_1oz2t_10",X="_input_1oz2t_10",Z="_iconWrapper_1oz2t_35",h={RuleSearch:G,RuleSearchContainer:Q,inputWrapper:U,input:X,iconWrapper:Z};function ee({dispatch:e,searchText:n,updateSearchText:r}){const[a,o]=m.exports.useState(n),s=m.exports.useCallback(i=>{e(r(i))},[e,r]),p=m.exports.useMemo(()=>B(s,300),[s]),g=i=>{o(i.target.value),p(i.target.value)};return t("div",{className:h.RuleSearch,children:l("div",{className:h.RuleSearchContainer,children:[t("div",{className:h.inputWrapper,children:t("input",{type:"text",value:a,onChange:g,className:h.input})}),t("div",{className:h.iconWrapper,children:t(Y,{size:20})})]})})}const te=e=>({searchText:T(e),updateSearchText:b}),oe=y(te)(ee),re="_logMeta_7a1x3_1",ae="_logType_7a1x3_8",ne="_logTime_7a1x3_18",se="_logText_7a1x3_24",ce="_logsWrapper_7a1x3_37",ie="_logPlaceholder_7a1x3_51",le="_logPlaceholderIcon_7a1x3_64",pe="_search_7a1x3_68",c={logMeta:re,logType:ae,logTime:ne,logText:se,logsWrapper:ce,logPlaceholder:ie,logPlaceholderIcon:le,search:pe},{useCallback:v,memo:he,useEffect:ge}=j,_=30,de={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function ue({time:e,even:n,payload:r,type:a}){const o=I({even:n},"log");return t("div",{className:o,children:l("div",{className:c.logMeta,children:[t("div",{className:c.logTime,children:e}),t("div",{className:c.logType,style:{backgroundColor:de[a]},children:a}),t("div",{className:c.logText,children:r})]})})}function me(e,n){return n[e].id}const _e=he(({index:e,style:n,data:r})=>{const a=r[e];return t("div",{style:n,children:t(ue,{...a})})},O);function fe({dispatch:e,logLevel:n,apiConfig:r,logs:a,logStreamingPaused:o}){const s=P(),p=v(()=>{o?M({...r,logLevel:n}):$(),s.app.updateAppConfig("logStreamingPaused",!o)},[r,n,o,s.app]),g=v(S=>e(L(S)),[e]);ge(()=>{A({...r,logLevel:n},g)},[r,n,g]);const[i,x]=D(),{t:d}=R();return l("div",{children:[t(N,{title:d("Logs")}),t("div",{className:c.search,children:t(oe,{})}),t("div",{ref:i,style:{paddingBottom:_},children:a.length===0?l("div",{className:c.logPlaceholder,style:{height:x-_},children:[t("div",{className:c.logPlaceholderIcon,children:t(z,{width:200,height:200})}),t("div",{children:d("no_logs")})]}):l("div",{className:c.logsWrapper,children:[t(F,{height:x-_,width:"100%",itemCount:a.length,itemSize:80,itemData:a,itemKey:me,children:_e}),t(E,{icon:o?t(K,{size:16}):t(q,{size:16}),mainButtonStyles:o?{background:"#e74c3c"}:{},style:H,text:d(o?"Resume Refresh":"Pause Refresh"),onClick:p})]})})]})}const xe=e=>({logs:C(e),logLevel:W(e),apiConfig:w(e),logStreamingPaused:k(e)}),Re=y(xe)(fe);export{Re as default};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Proxies.16b46af4.js b/clash-for-linux-backup/dashboard/public/assets/Proxies.16b46af4.js
new file mode 100644
index 0000000000000000000000000000000000000000..ffd8dc4cf08b476a33b3aef4961b883dd97c57d0
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Proxies.16b46af4.js
@@ -0,0 +1 @@
+import{r as g,j as r,k as $,c as w,T as _e,b as i,B as b,i as f,U as xe,V as ve,W as ee,X as te,e as C,Y as ge,F as T,Z as be,$ as ne,a0 as M,y as D,a1 as we,a2 as re,a3 as O,a4 as oe,a5 as H,a6 as U,a7 as Ce,a8 as ke,u as q,a9 as Pe,aa as Se,ab as Ne,h as se,C as ae,z as V,ac as $e,m as W,d as Ae,ad as Le,ae as Oe,af as Te,ag as De}from"./index.171f553a.js";import{C as Be}from"./chevron-down.dd238e96.js";import{F as Ie,p as Fe,A as je,I as Re}from"./Fab.ef67ff10.js";import{R as ze,a as Me,T as He}from"./TextFitler.61537a57.js";import{f as Ue}from"./index.92e2d967.js";import{S as qe}from"./Select.6c389032.js";import"./debounce.c2d20996.js";function Ee(e,t){if(e==null)return{};var n=Ke(e,t),o,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(n[o]=e[o]))}return n}function Ke(e,t){if(e==null)return{};var n={},o=Object.keys(e),s,a;for(a=0;a=0)&&(n[s]=e[s]);return n}var E=g.exports.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,s=e.size,a=s===void 0?24:s,l=Ee(e,["color","size"]);return r("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...l,children:r("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})});E.propTypes={color:$.exports.string,size:$.exports.oneOfType([$.exports.string,$.exports.number])};E.displayName="Zap";const Z=E;function le(e){const t=e.size||24,n=w({[_e.animate]:e.animate});return r("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Ve="_FlexCenter_1380a_1",We={FlexCenter:Ve};function Ze({children:e}){return r("div",{className:We.FlexCenter,children:e})}const{useRef:G,useEffect:Ge}=f;function Ye({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=G(null),o=G(null);return Ge(()=>{n.current.focus()},[]),i("div",{onKeyDown:a=>{a.keyCode===39?o.current.focus():a.keyCode===37&&n.current.focus()},children:[r("h2",{children:"Close Connections?"}),r("p",{children:'Click "Yes" to close those connections that are still using the old selected proxy in this group'}),r("div",{style:{height:30}}),i(Ze,{children:[r(b,{onClick:e,ref:n,children:"Yes"}),r("div",{style:{width:20}}),r(b,{onClick:t,ref:o,children:"No"})]})]})}const Xe="_header_1y9js_1",Je="_arrow_1y9js_8",Qe="_isOpen_1y9js_13",et="_btn_1y9js_20",tt="_qty_1y9js_25",k={header:Xe,arrow:Je,isOpen:Qe,btn:et,qty:tt};function ce({name:e,type:t,toggle:n,isOpen:o,qty:s}){const a=g.exports.useCallback(l=>{l.preventDefault(),(l.key==="Enter"||l.key===" ")&&n()},[n]);return i("div",{className:k.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[r("div",{children:r(xe,{name:e,type:t})}),typeof s=="number"?r("span",{className:k.qty,children:s}):null,r(b,{kind:"minimal",onClick:n,className:k.btn,title:"Toggle collapsible section",children:r("span",{className:w(k.arrow,{[k.isOpen]:o}),children:r(Be,{size:20})})})]})}const{useMemo:nt}=f;function rt(e,t){return e.filter(n=>{const o=t[n];return o===void 0?!0:o.number!==0})}const A=(e,t)=>{if(e&&typeof e.number=="number"&&e.number>0)return e.number;const n=t&&t.type;return n&&te.indexOf(n)>-1?-1:999999},ot={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((o,s)=>{const a=A(t[o],n&&n[o]),l=A(t[s],n&&n[s]);return a-l}),LatencyDesc:(e,t,n)=>e.sort((o,s)=>{const a=A(t[o],n&&n[o]);return A(t[s],n&&n[s])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:to.trim()).filter(o=>!!o);return n.length===0?e:e.filter(o=>{let s=0;for(;s-1)return!0}return!1})}function at(e,t,n,o,s,a){let l=[...e];return n&&(l=rt(e,t)),typeof o=="string"&&o!==""&&(l=st(l,o)),ot[s](l,t,a)}function ie(e,t,n,o,s){const[a]=ve(ee);return nt(()=>at(e,t,n,a,o,s),[e,t,n,a,o,s])}const lt="_header_5pmv2_1",ct="_groupHead_5pmv2_5",it="_action_5pmv2_11",F={header:lt,groupHead:ct,action:it},ut="_proxy_8ev0l_1",dt="_now_8ev0l_25",pt="_error_8ev0l_29",ht="_selectable_8ev0l_32",yt="_proxyType_8ev0l_40",ft="_row_8ev0l_51",mt="_proxyName_8ev0l_57",_t="_proxySmall_8ev0l_66",m={proxy:ut,now:dt,error:pt,selectable:ht,proxyType:yt,row:ft,proxyName:mt,proxySmall:_t},xt="_proxyLatency_hz69v_1",vt={proxyLatency:xt};function gt({number:e,color:t}){return r("span",{className:vt.proxyLatency,style:{color:t},children:typeof e=="number"&&e!==0?e+" ms":" "})}const{useMemo:N}=f,P={good:"#67c23a",normal:"#d4b75c",bad:"#e67f3c",na:"#909399"};function ue({number:e}={}){return e===0?P.na:e<200?P.good:e<400?P.normal:typeof e=="number"?P.bad:P.na}function bt(e,t){return te.indexOf(t)>-1?{border:"1px dotted #777"}:{background:ue(e)}}function wt({now:e,name:t,proxy:n,latency:o,isSelectable:s,onClick:a}){const l=N(()=>bt(o,n.type),[o,n]),c=N(()=>{let d=t;return o&&typeof o.number=="number"&&(d+=" "+o.number+" ms"),d},[t,o]),u=g.exports.useCallback(()=>{s&&a&&a(t)},[t,a,s]),p=N(()=>w(m.proxySmall,{[m.now]:e,[m.selectable]:s}),[s,e]),h=g.exports.useCallback(d=>{d.key==="Enter"&&u()},[u]);return r("div",{title:c,className:p,style:l,onClick:u,onKeyDown:h,role:s?"menuitem":""})}function Ct(e){return e==="Shadowsocks"?"SS":e}const kt=e=>({left:e.left+window.scrollX-5,top:e.top+window.scrollY-38});function Pt({children:e,label:t,"aria-label":n}){const[o,s]=ge();return i(T,{children:[g.exports.cloneElement(e,o),r(be,{...s,label:t,"aria-label":n,position:kt})]})}function St({now:e,name:t,proxy:n,latency:o,isSelectable:s,onClick:a}){const l=N(()=>ue(o),[o]),c=g.exports.useCallback(()=>{s&&a&&a(t)},[t,a,s]),u=g.exports.useCallback(h=>{h.key==="Enter"&&c()},[c]),p=N(()=>w(m.proxy,{[m.now]:e,[m.selectable]:s}),[s,e]);return i("div",{tabIndex:0,className:p,onClick:c,onKeyDown:u,role:s?"menuitem":"",children:[r("div",{className:m.proxyName,children:r(Pt,{label:t,"aria-label":"proxy name: "+t,children:r("span",{children:t})})}),i("div",{className:m.row,children:[r("span",{className:m.proxyType,style:{opacity:e?.6:.2},children:Ct(n.type)}),r(gt,{number:o==null?void 0:o.number,color:l})]})]})}const de=(e,{name:t})=>{const n=ne(e),o=M(e);return{proxy:n[t]||{name:t,type:"Unknown",history:[]},latency:o[t]}},Nt=C(de)(St),$t=C(de)(wt),At="_list_1oy7w_1",Lt="_listSummaryView_1oy7w_8",pe={list:At,listSummaryView:Lt};function he({all:e,now:t,isSelectable:n,itemOnTapCallback:o}){const s=e;return r("div",{className:pe.list,children:s.map(a=>r(Nt,{onClick:o,isSelectable:n,name:a,now:a===t},a))})}function ye({all:e,now:t,isSelectable:n,itemOnTapCallback:o}){return r("div",{className:pe.listSummaryView,children:e.map(s=>r($t,{onClick:o,isSelectable:n,name:s,now:s===t},s))})}const{createElement:Ot,useCallback:j,useMemo:Tt}=f;function Dt({name:e,all:t,delay:n,hideUnavailableProxies:o,proxySortBy:s,proxies:a,type:l,now:c,isOpen:u,apiConfig:p,dispatch:h}){const d=ie(t,n,o,s,a),x=Tt(()=>l==="Selector",[l]),{app:{updateCollapsibleIsOpen:v},proxies:{requestDelayForProxies:y}}=D(),B=j(()=>{v("proxyGroup",e,!u)},[u,v,e]),I=j(K=>{!x||h(we(p,e,K))},[p,h,e,x]),_=re(!1),me=j(async()=>{if(!_.value){_.set(!0);try{await y(p,d)}catch{}_.set(!1)}},[d,p,y,_]);return i("div",{className:F.group,children:[i("div",{className:F.groupHead,children:[r(ce,{name:e,type:l,toggle:B,qty:d.length,isOpen:u}),r("div",{className:F.action,children:r(O,{label:"Test latency",children:r(b,{kind:"circular",onClick:me,children:r(le,{animate:_.value,size:16})})})})]}),Ot(u?he:ye,{all:d,now:c,isSelectable:x,itemOnTapCallback:I})]})}const Bt=C((e,{name:t,delay:n})=>{const o=ne(e),s=oe(e),a=H(e),l=U(e),c=o[t],{all:u,type:p,now:h}=c;return{all:u,delay:n,hideUnavailableProxies:l,proxySortBy:a,proxies:o,type:p,now:h,isOpen:s[`proxyGroup:${t}`]}})(Dt),{useCallback:fe,useState:It}=f;function Ft({dispatch:e,apiConfig:t,name:n}){return fe(()=>e(Ce(t,n)),[t,e,n])}function jt({dispatch:e,apiConfig:t,names:n}){const[o,s]=It(!1);return[fe(async()=>{if(!o){s(!0);try{await e(ke(t,n))}catch{}s(!1)}},[t,e,n,o]),o]}const{useState:Rt,useCallback:zt}=f;function Mt({isLoading:e}){return e?r(Re,{children:r(Z,{width:16,height:16})}):r(Z,{width:16,height:16})}function Ht({dispatch:e,apiConfig:t}){const[n,o]=Rt(!1);return[zt(()=>{n||(o(!0),e(Pe(t)).then(()=>o(!1),()=>o(!1)))},[t,e,n]),n]}function Ut({dispatch:e,apiConfig:t,proxyProviders:n}){const{t:o}=q(),[s,a]=Ht({dispatch:e,apiConfig:t}),[l,c]=jt({apiConfig:t,dispatch:e,names:n.map(u=>u.name)});return r(Ie,{icon:r(Mt,{isLoading:a}),onClick:s,text:o("Test Latency"),style:Fe,children:n.length>0?r(je,{text:o("update_all_proxy_provider"),onClick:l,children:r(ze,{isRotating:c})}):null})}const qt="_updatedAt_1rx92_1",Et="_main_1rx92_8",Kt="_head_1rx92_17",Vt="_action_1rx92_23",Wt="_refresh_1rx92_31",S={updatedAt:qt,main:Et,head:Kt,action:Vt,refresh:Wt},{useCallback:Y}=f;function Zt({name:e,proxies:t,delay:n,hideUnavailableProxies:o,proxySortBy:s,vehicleType:a,updatedAt:l,isOpen:c,dispatch:u,apiConfig:p}){const h=ie(t,n,o,s),d=re(!1),x=Ft({dispatch:u,apiConfig:p,name:e}),v=Y(()=>{if(d.value)return;d.set(!0);const _=()=>d.set(!1);u(Se(p,e)).then(_,_)},[p,u,e,d]),{app:{updateCollapsibleIsOpen:y}}=D(),B=Y(()=>{y("proxyProvider",e,!c)},[c,y,e]),I=Ue(new Date(l),new Date);return i("div",{className:S.main,children:[i("div",{className:S.head,children:[r(ce,{name:e,toggle:B,type:a,isOpen:c,qty:h.length}),i("div",{className:S.action,children:[r(O,{label:"Update",children:r(b,{kind:"circular",onClick:x,children:r(Xt,{})})}),r(O,{label:"Health Check",children:r(b,{kind:"circular",onClick:v,children:r(le,{animate:d.value,size:16})})})]})]}),r("div",{className:S.updatedAt,children:i("small",{children:["Updated ",I," ago"]})}),c?r(he,{all:h}):r(ye,{all:h})]})}const Gt={rest:{scale:1},pressed:{scale:.95}},Yt={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function Xt(){const t=Ne.read().motion;return r(t.div,{className:S.refresh,variants:Gt,initial:"rest",whileHover:"hover",whileTap:"pressed",children:r(t.div,{className:"flexCenter",variants:Yt,children:r(Me,{size:16})})})}const Jt=(e,{proxies:t,name:n})=>{const o=U(e),s=M(e),a=oe(e),l=se(e),c=H(e);return{apiConfig:l,proxies:t,delay:s,hideUnavailableProxies:o,proxySortBy:c,isOpen:a[`proxyProvider:${n}`]}},Qt=C(Jt)(Zt);function en({items:e}){return e.length===0?null:i(T,{children:[r(ae,{title:"Proxy Provider"}),r("div",{children:e.map(t=>r(Qt,{name:t.name,proxies:t.proxies,type:t.type,vehicleType:t.vehicleType,updatedAt:t.updatedAt},t.name))})]})}const tn="_labeledInput_cmki0_1",R={labeledInput:tn},nn=[["Natural","order_natural"],["LatencyAsc","order_latency_asc"],["LatencyDesc","order_latency_desc"],["NameAsc","order_name_asc"],["NameDesc","order_name_desc"]],{useCallback:X}=f;function rn({appConfig:e}){const{app:{updateAppConfig:t}}=D(),n=X(a=>{t("proxySortBy",a.target.value)},[t]),o=X(a=>{t("hideUnavailableProxies",a)},[t]),{t:s}=q();return i(T,{children:[i("div",{className:R.labeledInput,children:[r("span",{children:s("sort_in_grp")}),r("div",{children:r(qe,{options:nn.map(a=>[a[0],s(a[1])]),selected:e.proxySortBy,onChange:n})})]}),r("hr",{}),i("div",{className:R.labeledInput,children:[r("span",{children:s("hide_unavail_proxies")}),r("div",{children:r(V,{name:"hideUnavailableProxies",checked:e.hideUnavailableProxies,onChange:o})})]}),i("div",{className:R.labeledInput,children:[r("span",{children:s("auto_close_conns")}),r("div",{children:r(V,{name:"autoCloseOldConns",checked:e.autoCloseOldConns,onChange:a=>t("autoCloseOldConns",a)})})]})]})}const on=e=>{const t=H(e),n=U(e),o=$e(e);return{appConfig:{proxySortBy:t,hideUnavailableProxies:n,autoCloseOldConns:o}}},sn=C(on)(rn),an="_overlay_uuk3b_1",ln="_cnt_uuk3b_5",cn="_afterOpen_uuk3b_16",z={overlay:an,cnt:ln,afterOpen:cn},{useMemo:un}=f;function J({isOpen:e,onRequestClose:t,children:n}){const o=un(()=>({base:w(W.content,z.cnt),afterOpen:z.afterOpen,beforeClose:""}),[]);return r(Ae,{isOpen:e,onRequestClose:t,className:o,overlayClassName:w(W.overlay,z.overlay),children:n})}function dn({color:e="currentColor",size:t=24}){return i("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r("path",{d:"M2 6h9M18.5 6H22"}),r("circle",{cx:"16",cy:"6",r:"2"}),r("path",{d:"M22 18h-9M6 18H2"}),r("circle",{r:"2",transform:"matrix(-1 0 0 1 8 18)"})]})}const pn="_topBar_jgy4z_1",hn="_topBarRight_jgy4z_13",yn="_textFilterContainer_jgy4z_22",fn="_group_jgy4z_29",L={topBar:pn,topBarRight:hn,textFilterContainer:yn,group:fn},{useState:mn,useEffect:_n,useCallback:Q,useRef:xn}=f;function vn({dispatch:e,groupNames:t,delay:n,proxyProviders:o,apiConfig:s,showModalClosePrevConns:a}){const l=xn({}),c=Q(()=>{l.current.startAt=Date.now(),e(Le(s)).then(()=>{l.current.completeAt=Date.now()})},[s,e]);_n(()=>{c();const y=()=>{l.current.startAt&&Date.now()-l.current.startAt>3e4&&c()};return window.addEventListener("focus",y,!1),()=>window.removeEventListener("focus",y,!1)},[c]);const[u,p]=mn(!1),h=Q(()=>{p(!1)},[]),{proxies:{closeModalClosePrevConns:d,closePrevConnsAndTheModal:x}}=D(),{t:v}=q();return i(T,{children:[r(J,{isOpen:u,onRequestClose:h,children:r(sn,{})}),i("div",{className:L.topBar,children:[r(ae,{title:v("Proxies")}),i("div",{className:L.topBarRight,children:[r("div",{className:L.textFilterContainer,children:r(He,{textAtom:ee})}),r(O,{label:v("settings"),children:r(b,{kind:"minimal",onClick:()=>p(!0),children:r(dn,{size:16})})})]})]}),r("div",{children:t.map(y=>r("div",{className:L.group,children:r(Bt,{name:y,delay:n,apiConfig:s,dispatch:e})},y))}),r(en,{items:o}),r("div",{style:{height:60}}),r(Ut,{dispatch:e,apiConfig:s,proxyProviders:o}),r(J,{isOpen:a,onRequestClose:d,children:r(Ye,{onClickPrimaryButton:()=>x(s),onClickSecondaryButton:d})})]})}const gn=e=>({apiConfig:se(e),groupNames:Oe(e),proxyProviders:Te(e),delay:M(e),showModalClosePrevConns:De(e)}),$n=C(gn)(vn);export{$n as default};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Proxies.3fa3509d.css b/clash-for-linux-backup/dashboard/public/assets/Proxies.3fa3509d.css
new file mode 100644
index 0000000000000000000000000000000000000000..228a9cd502cf820cbb17c250ed02030dd8eed5d6
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Proxies.3fa3509d.css
@@ -0,0 +1 @@
+._FlexCenter_1380a_1{display:flex;justify-content:center;align-items:center}._header_1y9js_1{display:flex;align-items:center}._header_1y9js_1:focus{outline:none}._header_1y9js_1 ._arrow_1y9js_8{display:inline-flex;-webkit-transform:rotate(0deg);transform:rotate(0);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}._header_1y9js_1 ._arrow_1y9js_8._isOpen_1y9js_13{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._header_1y9js_1 ._arrow_1y9js_8:focus{outline:var(--color-focus-blue) solid 1px}._btn_1y9js_20{margin-left:5px}._qty_1y9js_25{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._header_5pmv2_1{margin-bottom:12px}._groupHead_5pmv2_5{display:flex;flex-wrap:wrap;align-items:center}._action_5pmv2_11{margin:0 5px}._proxy_8ev0l_1{margin:3px;padding:5px;position:relative;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;outline:none;border:1px solid transparent;max-width:200px;background-color:var(--color-bg-proxy)}._proxy_8ev0l_1:focus{border:1px solid var(--color-focus-blue)}@media screen and (min-width: 30em){._proxy_8ev0l_1{min-width:200px;border-radius:10px;padding:10px}}._proxy_8ev0l_1._now_8ev0l_25{background-color:var(--color-focus-blue);color:#ddd}._proxy_8ev0l_1._error_8ev0l_29{opacity:.5}._proxy_8ev0l_1._selectable_8ev0l_32{transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;cursor:pointer}._proxy_8ev0l_1._selectable_8ev0l_32:hover{border-color:hsl(0deg,0%,var(--card-hover-border-lightness))}._proxyType_8ev0l_40{font-family:var(--font-mono);font-size:.6em;margin-right:3px}@media screen and (min-width: 30em){._proxyType_8ev0l_40{font-size:.85em}}._row_8ev0l_51{display:flex;align-items:center;justify-content:space-between}._proxyName_8ev0l_57{width:100%;margin-bottom:5px;font-size:.85em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._proxySmall_8ev0l_66{--size: 13px;width:var(--size);height:var(--size);border-radius:50%;position:relative}._proxySmall_8ev0l_66._now_8ev0l_25{--size: 15px}._proxySmall_8ev0l_66._now_8ev0l_25:before{--size-dot: 7px;content:"";position:absolute;width:var(--size-dot);height:var(--size-dot);background-color:#fff;border:1px solid var(--color-proxy-dot-selected-ind-bo);border-radius:4px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}._proxySmall_8ev0l_66._selectable_8ev0l_32{transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;cursor:pointer}._proxySmall_8ev0l_66._selectable_8ev0l_32:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}._proxyLatency_hz69v_1{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width: 30em){._proxyLatency_hz69v_1{font-size:.85em}}._list_1oy7w_1{display:flex;flex-wrap:wrap;margin:8px 0 8px -3px}._listSummaryView_1oy7w_8{margin:14px 0;display:grid;grid-template-columns:repeat(auto-fill,13px);grid-gap:10px;place-items:center;max-width:900px}._updatedAt_1rx92_1{margin-bottom:12px}._updatedAt_1rx92_1 small{color:#777}._main_1rx92_8{padding:10px 15px}@media screen and (min-width: 30em){._main_1rx92_8{padding:10px 40px}}._head_1rx92_17{display:flex;align-items:center;flex-wrap:wrap}._action_1rx92_23{margin:0 5px;display:grid;grid-template-columns:auto auto;gap:10px;place-items:center}._refresh_1rx92_31{display:flex;justify-content:center;align-items:center;cursor:pointer}._labeledInput_cmki0_1{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0px}._overlay_uuk3b_1{background-color:#0009}._cnt_uuk3b_5{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);box-shadow:#0000001f 0 4px 4px,#0000003d 0 16px 32px}._afterOpen_uuk3b_16{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}._topBar_jgy4z_1{position:-webkit-sticky;position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;z-index:1;background-color:var(--color-background2);-webkit-backdrop-filter:blur(36px);backdrop-filter:blur(36px)}._topBarRight_jgy4z_13{display:flex;align-items:center;flex-wrap:wrap;flex:1;justify-content:flex-end;margin-right:20px}._textFilterContainer_jgy4z_22{max-width:350px;min-width:150px;flex:1;margin-right:8px}._group_jgy4z_29{padding:10px 15px}@media screen and (min-width: 30em){._group_jgy4z_29{padding:10px 40px}}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Rules.70e6962f.js b/clash-for-linux-backup/dashboard/public/assets/Rules.70e6962f.js
new file mode 100644
index 0000000000000000000000000000000000000000..bb46c0a6398ee41f3e7f387d483ab92c1e0313d5
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Rules.70e6962f.js
@@ -0,0 +1 @@
+import{ah as S,ai as E,aj as k,ak as b,al as B,am as R,r as m,an as T,ao as O,G as y,ap as q,aq as _,V as A,b as d,j as a,U as F,B as U,u as x,e as j,h as L,C as z,i as D}from"./index.171f553a.js";import{a as Q,V}from"./index.esm.e4dd1508.js";import{R as P,T as W}from"./TextFitler.61537a57.js";import{f as H}from"./index.92e2d967.js";import{F as G,p as J}from"./Fab.ef67ff10.js";import{u as K}from"./useRemainingViewPortHeight.7395542b.js";import"./debounce.c2d20996.js";class X extends S{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.client.defaultMutationOptions(e),E(t,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:k(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){b.batch(()=>{if(this.mutateOptions){if(e.onSuccess){var t,r,n,i;(t=(r=this.mutateOptions).onSuccess)==null||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,u,l,c;(o=(u=this.mutateOptions).onError)==null||o.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(p=>{p(this.currentResult)})})}}function w(s,e,t){const r=B(s,e,t),n=R({context:r.context}),[i]=m.exports.useState(()=>new X(n,r));m.exports.useEffect(()=>{i.setOptions(r)},[i,r]);const o=T(m.exports.useCallback(l=>i.subscribe(b.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=m.exports.useCallback((l,c)=>{i.mutate(l,c).catch(Y)},[i]);if(o.error&&O(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}function Y(){}function Z(s){const e=s.providers,t=Object.keys(e),r={};for(let n=0;n=0,"there is no valid rules list in the rules API response"),s.rules.map((e,t)=>({...e,id:t}))}async function ne(s,e){let t={rules:[]};try{const{url:r,init:n}=y(e),i=await fetch(r+s,n);i.ok&&(t=await i.json())}catch(r){console.log("failed to fetch rules",r)}return re(t)}const I=q({key:"ruleFilterText",default:""});function ie(s,e){const t=R(),{mutate:r,isLoading:n}=w(C,{onSuccess:()=>{t.invalidateQueries(["/providers/rules"])}});return[o=>{o.preventDefault(),r({name:s,apiConfig:e})},n]}function oe(s){const e=R(),{data:t}=M(s),{mutate:r,isLoading:n}=w(ee,{onSuccess:()=>{e.invalidateQueries(["/providers/rules"])}});return[o=>{o.preventDefault(),r({names:t.names,apiConfig:s})},n]}function M(s){return _(["/providers/rules",s],()=>$("/providers/rules",s))}function ae(s){const{data:e,isFetching:t}=_(["/rules",s],()=>ne("/rules",s)),{data:r}=M(s),[n]=A(I);if(n==="")return{rules:e,provider:r,isFetching:t};{const i=n.toLowerCase();return{rules:e.filter(o=>o.payload.toLowerCase().indexOf(i)>=0),isFetching:t,provider:{byName:r.byName,names:r.names.filter(o=>o.toLowerCase().indexOf(i)>=0)}}}}const le="_RuleProviderItem_12aid_1",ue="_left_12aid_7",ce="_middle_12aid_14",de="_gray_12aid_21",he="_action_12aid_25",fe="_refreshBtn_12aid_32",h={RuleProviderItem:le,left:ue,middle:ce,gray:de,action:he,refreshBtn:fe};function me({idx:s,name:e,vehicleType:t,behavior:r,updatedAt:n,ruleCount:i,apiConfig:o}){const[u,l]=ie(e,o),c=H(new Date(n),new Date);return d("div",{className:h.RuleProviderItem,children:[a("span",{className:h.left,children:s}),d("div",{className:h.middle,children:[a(F,{name:e,type:`${t} / ${r}`}),a("div",{className:h.gray,children:i<2?`${i} rule`:`${i} rules`}),d("div",{className:h.action,children:[d(U,{onClick:u,disabled:l,className:h.refreshBtn,children:[a(P,{isRotating:l,size:13}),a("span",{className:"visually-hidden",children:"Refresh"})]}),d("small",{className:h.gray,children:["Updated ",c," ago"]})]})]})]})}function pe({apiConfig:s}){const[e,t]=oe(s),{t:r}=x();return a(G,{icon:a(P,{isRotating:t}),text:r("update_all_rule_provider"),style:J,onClick:e})}const ve="_rule_1ymqx_1",Re="_left_1ymqx_12",ye="_a_1ymqx_19",ge="_b_1ymqx_26",be="_type_1ymqx_37",f={rule:ve,left:Re,a:ye,b:ge,type:be},v={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function _e({proxy:s}){let e=v._default;return v[s]&&(e=v[s]),{color:e}}function xe({type:s,payload:e,proxy:t,id:r}){const n=_e({proxy:t});return d("div",{className:f.rule,children:[a("div",{className:f.left,children:r}),d("div",{children:[a("div",{className:f.b,children:e}),d("div",{className:f.a,children:[a("div",{className:f.type,children:s}),a("div",{style:n,children:t})]})]})]})}const Pe="_header_1j1w3_1",we="_RuleProviderItemWrapper_1j1w3_17",N={header:Pe,RuleProviderItemWrapper:we},{memo:Ce}=D,g=30;function Ie(s,{rules:e,provider:t}){const r=t.names.length;return s{const{rules:r,provider:n,apiConfig:i}=t,o=n.names.length;if(s({apiConfig:L(s)}),Ue=j(Se)(Ee);function Ee({apiConfig:s}){const[e,t]=K(),{rules:r,provider:n}=ae(s),i=Me({provider:n}),{t:o}=x();return d("div",{children:[d("div",{className:N.header,children:[a(z,{title:o("Rules")}),a(W,{placeholder:"Filter",textAtom:I})]}),a("div",{ref:e,style:{paddingBottom:g},children:a(V,{height:t-g,width:"100%",itemCount:r.length+n.names.length,itemSize:i,itemData:{rules:r,provider:n,apiConfig:s},itemKey:Ie,children:Ne})}),n&&n.names&&n.names.length>0?a(pe,{apiConfig:s}):null]})}export{Ue as default};
diff --git a/clash-for-linux-backup/dashboard/public/assets/Rules.e03c54a8.css b/clash-for-linux-backup/dashboard/public/assets/Rules.e03c54a8.css
new file mode 100644
index 0000000000000000000000000000000000000000..a24b9edee484899e5c0904362a7d24a17adcf350
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Rules.e03c54a8.css
@@ -0,0 +1 @@
+._RuleProviderItem_12aid_1{display:grid;grid-template-columns:40px 1fr 46px;height:100%}._left_12aid_7{display:inline-flex;align-items:center;color:var(--color-text-secondary);opacity:.4}._middle_12aid_14{display:grid;gap:6px;grid-template-rows:1fr auto auto;align-items:center}._gray_12aid_21{color:#777}._action_12aid_25{display:grid;gap:4px;grid-template-columns:auto 1fr;align-items:center}._refreshBtn_12aid_32{padding:5px}._rule_1ymqx_1{display:flex;align-items:center;padding:6px 15px}@media screen and (min-width: 30em){._rule_1ymqx_1{padding:10px 40px}}._left_1ymqx_12{width:40px;padding-right:15px;color:var(--color-text-secondary);opacity:.4}._a_1ymqx_19{display:flex;align-items:center;font-size:12px;opacity:.8}._b_1ymqx_26{padding:10px 0;font-family:Roboto Mono,Menlo,monospace;font-size:16px}@media screen and (min-width: 30em){._b_1ymqx_26{font-size:19px}}._type_1ymqx_37{width:110px}._header_1j1w3_1{display:grid;grid-template-columns:1fr minmax(auto,330px);align-items:center;padding-right:15px}@media screen and (min-width: 30em){._header_1j1w3_1{padding-right:40px}}._RuleProviderItemWrapper_1j1w3_17{padding:6px 15px}@media screen and (min-width: 30em){._RuleProviderItemWrapper_1j1w3_17{padding:10px 40px}}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Select.1e55eba1.css b/clash-for-linux-backup/dashboard/public/assets/Select.1e55eba1.css
new file mode 100644
index 0000000000000000000000000000000000000000..b3abe6ad9e60ab34c30b609baf0ed7fc90afd78d
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Select.1e55eba1.css
@@ -0,0 +1 @@
+._select_13zm8_1{height:40px;line-height:1.5;width:100%;padding-left:8px;-webkit-appearance:none;appearance:none;background-color:var(--color-input-bg);color:var(--color-text);padding-right:20px;border-radius:4px;border:1px solid var(--color-input-border);background-image:url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23999999%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);background-position:right 8px center;background-repeat:no-repeat}._select_13zm8_1:hover,._select_13zm8_1:focus{border-color:#343434;outline:none!important;color:var(--color-text-highlight);background-image:var(--select-bg-hover)}._select_13zm8_1:focus{box-shadow:#4299e199 0 0 0 3px}._select_13zm8_1 option{background-color:var(--color-background)}
diff --git a/clash-for-linux-backup/dashboard/public/assets/Select.6c389032.js b/clash-for-linux-backup/dashboard/public/assets/Select.6c389032.js
new file mode 100644
index 0000000000000000000000000000000000000000..8cad179229908e185d6b1e8f5342d63902868677
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/Select.6c389032.js
@@ -0,0 +1 @@
+import{j as s}from"./index.171f553a.js";const o="_select_13zm8_1",r={select:o};function i({options:t,selected:c,onChange:l}){return s("select",{className:r.select,value:c,onChange:l,children:t.map(([e,n])=>s("option",{value:e,children:n},e))})}export{i as S};
diff --git a/clash-for-linux-backup/dashboard/public/assets/TextFitler.61537a57.js b/clash-for-linux-backup/dashboard/public/assets/TextFitler.61537a57.js
new file mode 100644
index 0000000000000000000000000000000000000000..9aeab7827f0c9fa0b8a0cb3798b9f74fc0e13354
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/TextFitler.61537a57.js
@@ -0,0 +1 @@
+import{r as u,b as g,j as i,k as c,c as f,V as x,i as d}from"./index.171f553a.js";import{d as h}from"./debounce.c2d20996.js";function v(t,n){if(t==null)return{};var o=_(t,n),r,e;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(e=0;e=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(o[r]=t[r]))}return o}function _(t,n){if(t==null)return{};var o={},r=Object.keys(t),e,s;for(s=0;s=0)&&(o[e]=t[e]);return o}var l=u.exports.forwardRef(function(t,n){var o=t.color,r=o===void 0?"currentColor":o,e=t.size,s=e===void 0?24:e,a=v(t,["color","size"]);return g("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...a,children:[i("polyline",{points:"23 4 23 10 17 10"}),i("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})});l.propTypes={color:c.exports.string,size:c.exports.oneOfType([c.exports.string,c.exports.number])};l.displayName="RotateCw";const b=l,y="_rotate_1dspl_1",m="_isRotating_1dspl_5",R="_rotating_1dspl_1",p={rotate:y,isRotating:m,rotating:R};function P(t){const n=t.size||16,o=f(p.rotate,{[p.isRotating]:t.isRotating});return i("span",{className:o,children:i(b,{size:n})})}const{useCallback:w,useState:j,useMemo:k}=d;function O(t){const[,n]=x(t),[o,r]=j(""),e=k(()=>h(n,300),[n]);return[w(a=>{r(a.target.value),e(a.target.value)},[e]),o]}const T="_input_16a1f_1",C={input:T};function $(t){const[n,o]=O(t.textAtom);return i("input",{className:C.input,type:"text",value:o,onChange:n,placeholder:t.placeholder})}export{P as R,$ as T,b as a};
diff --git a/clash-for-linux-backup/dashboard/public/assets/TextFitler.b21c0577.css b/clash-for-linux-backup/dashboard/public/assets/TextFitler.b21c0577.css
new file mode 100644
index 0000000000000000000000000000000000000000..bbdf0149ccada9464fb3acbad37f1135f8e1f612
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/TextFitler.b21c0577.css
@@ -0,0 +1 @@
+._rotate_1dspl_1{display:inline-flex}._isRotating_1dspl_5{-webkit-animation:_rotating_1dspl_1 3s infinite linear;animation:_rotating_1dspl_1 3s infinite linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes _rotating_1dspl_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _rotating_1dspl_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}._input_16a1f_1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;outline:none;padding:8px 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._input_16a1f_1:focus{border:1px solid var(--color-focus-blue)}
diff --git a/clash-for-linux-backup/dashboard/public/assets/chart-lib.a8ad03fd.js b/clash-for-linux-backup/dashboard/public/assets/chart-lib.a8ad03fd.js
new file mode 100644
index 0000000000000000000000000000000000000000..8ed37cc9db3928f466029a581dba2066005413f7
--- /dev/null
+++ b/clash-for-linux-backup/dashboard/public/assets/chart-lib.a8ad03fd.js
@@ -0,0 +1,18 @@
+/*!
+ * Chart.js v3.9.1
+ * https://www.chartjs.org
+ * (c) 2022 Chart.js Contributors
+ * Released under the MIT License
+ */const Gn=function(){let i=0;return function(){return i++}}();function E(i){return i===null||typeof i>"u"}function z(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function C(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}const W=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function J(i,t){return W(i)?i:t}function D(i,t){return typeof i>"u"?t:i}const Zn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,qs=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(z(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function mt(i,t){return(Ii[t]||(Ii[t]=to(t)))(i)}function to(i){const t=eo(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function eo(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function pi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const tt=i=>typeof i<"u",bt=i=>typeof i=="function",zi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function io(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const V=Math.PI,F=2*V,so=F+V,we=Number.POSITIVE_INFINITY,no=V/180,B=V/2,Nt=V/4,Bi=V*2/3,Q=Math.log10,ot=Math.sign;function Vi(i){const t=Math.round(i);i=qt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Q(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function oo(i){const t=[],e=Math.sqrt(i);let s;for(s=1;sn-o).pop(),t}function Ft(i){return!isNaN(parseFloat(i))&&isFinite(i)}function qt(i,t,e){return Math.abs(i-t)=i}function Zs(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function bi(i,t,e){e=e||(r=>i[r]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const St=(i,t,e,s)=>bi(i,e,s?n=>i[n][t]<=e:n=>i[n][t]bi(i,e,s=>i[s][t]>=e);function ho(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+pi(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Wi(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Qs.forEach(o=>{delete i[o]}),delete i._chartjs)}function tn(i){const t=new Set;let e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function sn(i,t,e){const s=e||(r=>Array.prototype.slice.call(r));let n=!1,o=[];return function(...r){o=s(r),n||(n=!0,en.call(window,()=>{n=!1,i.apply(t,o)}))}}function fo(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const nn=i=>i==="start"?"left":i==="end"?"right":"center",q=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,go=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function on(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(n=Y(Math.min(St(a,r.axis,c).lo,e?s:St(t,l,r.getPixelForValue(c)).lo),0,s-1)),u?o=Y(Math.max(St(a,r.axis,h,!0).hi+1,e?0:St(t,l,r.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function rn(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const le=i=>i===0||i===1,Hi=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),ji=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Gt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*B)+1,easeOutSine:i=>Math.sin(i*B),easeInOutSine:i=>-.5*(Math.cos(V*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>le(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>le(i)?i:Hi(i,.075,.3),easeOutElastic:i=>le(i)?i:ji(i,.075,.3),easeInOutElastic(i){return le(i)?i:i<.5?.5*Hi(i*2,.1125,.45):.5+.5*ji(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Gt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Gt.easeInBounce(i*2)*.5:Gt.easeOutBounce(i*2-1)*.5+.5};/*!
+ * @kurkle/color v0.2.1
+ * https://github.com/kurkle/color#readme
+ * (c) 2022 Jukka Kurkela
+ * Released under the MIT License
+ */function se(i){return i+.5|0}const ut=(i,t,e)=>Math.max(Math.min(i,e),t);function Xt(i){return ut(se(i*2.55),0,255)}function pt(i){return ut(se(i*255),0,255)}function ct(i){return ut(se(i/2.55)/100,0,1)}function $i(i){return ut(se(i*100),0,100)}const Z={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oi=[..."0123456789ABCDEF"],po=i=>oi[i&15],mo=i=>oi[(i&240)>>4]+oi[i&15],ce=i=>(i&240)>>4===(i&15),bo=i=>ce(i.r)&&ce(i.g)&&ce(i.b)&&ce(i.a);function _o(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&Z[i[1]]*17,g:255&Z[i[2]]*17,b:255&Z[i[3]]*17,a:t===5?Z[i[4]]*17:255}:(t===7||t===9)&&(e={r:Z[i[1]]<<4|Z[i[2]],g:Z[i[3]]<<4|Z[i[4]],b:Z[i[5]]<<4|Z[i[6]],a:t===9?Z[i[7]]<<4|Z[i[8]]:255})),e}const xo=(i,t)=>i<255?t(i):"";function yo(i){var t=bo(i)?po:mo;return i?"#"+t(i.r)+t(i.g)+t(i.b)+xo(i.a,t):void 0}const vo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function an(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Mo(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function ko(i,t,e){const s=an(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function wo(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-r):h/(o+r),l=wo(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function xi(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(pt)}function yi(i,t,e){return xi(an,i,t,e)}function So(i,t,e){return xi(ko,i,t,e)}function Po(i,t,e){return xi(Mo,i,t,e)}function ln(i){return(i%360+360)%360}function Do(i){const t=vo.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Xt(+t[5]):pt(+t[5]));const n=ln(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=So(n,o,r):t[1]==="hsv"?s=Po(n,o,r):s=yi(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function Co(i,t){var e=_i(i);e[0]=ln(e[0]+t),e=yi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Oo(i){if(!i)return;const t=_i(i),e=t[0],s=$i(t[1]),n=$i(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ct(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Yi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Xi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Ao(){const i={},t=Object.keys(Xi),e=Object.keys(Yi);let s,n,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return i}let he;function Lo(i){he||(he=Ao(),he.transparent=[0,0,0,0]);const t=he[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const To=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ro(i){const t=To.exec(i);let e=255,s,n,o;if(!!t){if(t[7]!==s){const r=+t[7];e=t[8]?Xt(r):ut(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?Xt(s):ut(s,0,255)),n=255&(t[4]?Xt(n):ut(n,0,255)),o=255&(t[6]?Xt(o):ut(o,0,255)),{r:s,g:n,b:o,a:e}}}function Eo(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ct(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ye=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Tt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Fo(i,t,e){const s=Tt(ct(i.r)),n=Tt(ct(i.g)),o=Tt(ct(i.b));return{r:pt(Ye(s+e*(Tt(ct(t.r))-s))),g:pt(Ye(n+e*(Tt(ct(t.g))-n))),b:pt(Ye(o+e*(Tt(ct(t.b))-o))),a:i.a+e*(t.a-i.a)}}function de(i,t,e){if(i){let s=_i(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=yi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function cn(i,t){return i&&Object.assign(t||{},i)}function Ui(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=pt(i[3]))):(t=cn(i,{r:0,g:0,b:0,a:1}),t.a=pt(t.a)),t}function Io(i){return i.charAt(0)==="r"?Ro(i):Do(i)}class Se{constructor(t){if(t instanceof Se)return t;const e=typeof t;let s;e==="object"?s=Ui(t):e==="string"&&(s=_o(t)||Lo(t)||Io(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=cn(this._rgb);return t&&(t.a=ct(t.a)),t}set rgb(t){this._rgb=Ui(t)}rgbString(){return this._valid?Eo(this._rgb):void 0}hexString(){return this._valid?yo(this._rgb):void 0}hslString(){return this._valid?Oo(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=Fo(this._rgb,t._rgb,e)),this}clone(){return new Se(this.rgb)}alpha(t){return this._rgb.a=pt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=se(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return de(this._rgb,2,t),this}darken(t){return de(this._rgb,2,-t),this}saturate(t){return de(this._rgb,1,t),this}desaturate(t){return de(this._rgb,1,-t),this}rotate(t){return Co(this._rgb,t),this}}function hn(i){return new Se(i)}function dn(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ki(i){return dn(i)?i:hn(i)}function Xe(i){return dn(i)?i:hn(i).saturate(.5).darken(.1).hexString()}const Ct=Object.create(null),ri=Object.create(null);function Zt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>Xe(s.backgroundColor),this.hoverBorderColor=(e,s)=>Xe(s.borderColor),this.hoverColor=(e,s)=>Xe(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Ue(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Ue(ri,t,e)}override(t,e){return Ue(Ct,t,e)}route(t,e,s,n){const o=Zt(this,t),r=Zt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return C(l)?Object.assign({},c,l):D(l,c)},set(l){this[a]=l}}})}}var A=new zo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Bo(i){return!i||E(i.size)||E(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Pe(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Vo(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function te(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Ho(i,o),l=0;l+i||0;function vi(i,t){const e={},s=C(t),n=s?Object.keys(t):t,o=C(i)?s?r=>D(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=Uo(o(r));return e}function fn(i){return vi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Pt(i){return vi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function U(i){const t=fn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function $(i,t){i=i||{},t=t||A.font;let e=D(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=D(i.style,t.style);s&&!(""+s).match(Yo)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:D(i.family,t.family),lineHeight:Xo(D(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:D(i.weight,t.weight),string:""};return n.string=Bo(n),n}function ue(i,t,e,s){let n=!0,o,r,a;for(o=0,r=i.length;oe&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function _t(i,t){return Object.assign(Object.create(i),t)}function Mi(i,t=[""],e=i,s,n=()=>i[0]){tt(s)||(s=bn("_fallback",i));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:r=>Mi([r,...i],t,e,s)};return new Proxy(o,{deleteProperty(r,a){return delete r[a],delete r._keys,delete i[0][a],!0},get(r,a){return pn(r,a,()=>ir(a,t,i,r))},getOwnPropertyDescriptor(r,a){return Reflect.getOwnPropertyDescriptor(r._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,a){return Zi(r).includes(a)},ownKeys(r){return Zi(r)},set(r,a,l){const c=r._storage||(r._storage=n());return r[a]=c[a]=l,delete r._keys,!0}})}function zt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:gn(i,s),setContext:o=>zt(i,o,e,s),override:o=>zt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return pn(o,r,()=>Go(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function gn(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:bt(e)?e:()=>e,isIndexable:bt(s)?s:()=>s}}const qo=(i,t)=>i?i+pi(t):t,ki=(i,t)=>C(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function pn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Go(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return bt(a)&&r.isScriptable(t)&&(a=Zo(t,a,i,e)),z(a)&&a.length&&(a=Jo(t,a,i,r.isIndexable)),ki(t,a)&&(a=zt(a,n,o&&o[t],r)),a}function Zo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);return a.add(i),t=t(o,r||s),a.delete(i),ki(i,t)&&(t=wi(n._scopes,n,i,t)),t}function Jo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(tt(o.index)&&s(i))t=t[o.index%t.length];else if(C(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=wi(c,n,i,h);t.push(zt(d,o,r&&r[i],a))}}return t}function mn(i,t,e){return bt(i)?i(t,e):i}const Qo=(i,t)=>i===!0?t:typeof i=="string"?mt(t,i):void 0;function tr(i,t,e,s,n){for(const o of t){const r=Qo(e,o);if(r){i.add(r);const a=mn(r._fallback,e,n);if(tt(a)&&a!==e&&a!==s)return a}else if(r===!1&&tt(s)&&e!==s)return null}return!1}function wi(i,t,e,s){const n=t._rootScopes,o=mn(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Gi(a,r,e,o||e,s);return l===null||tt(o)&&o!==e&&(l=Gi(a,r,o,l,s),l===null)?!1:Mi(Array.from(a),[""],n,o,()=>er(t,e,s))}function Gi(i,t,e,s,n){for(;e;)e=tr(i,t,e,s,n);return e}function er(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return z(n)&&C(e)?e:n}function ir(i,t,e,s){let n;for(const o of t)if(n=bn(qo(o,i),e),tt(n))return ki(i,n)?wi(e,s,i,n):n}function bn(i,t){for(const e of t){if(!e)continue;const s=e[i];if(tt(s))return s}}function Zi(i){let t=i._keys;return t||(t=i._keys=sr(i._scopes)),t}function sr(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function _n(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,r=new Array(s);let a,l,c,h;for(a=0,l=s;ati==="x"?"y":"x";function or(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=ni(o,n),l=ni(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function rr(i,t,e){const s=i.length;let n,o,r,a,l,c=Bt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")lr(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;owindow.getComputedStyle(i,null);function dr(i,t){return Ee(i).getPropertyValue(t)}const ur=["top","right","bottom","left"];function Dt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=ur[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const fr=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function gr(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(fr(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function kt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Ee(e),o=n.boxSizing==="border-box",r=Dt(n,"padding"),a=Dt(n,"border","width"),{x:l,y:c,box:h}=gr(i,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:g}=t;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function pr(i,t,e){let s,n;if(t===void 0||e===void 0){const o=Si(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ee(o),l=Dt(a,"border","width"),c=Dt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=De(a.maxWidth,o,"clientWidth"),n=De(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||we,maxHeight:n||we}}const Ke=i=>Math.round(i*10)/10;function mr(i,t,e,s){const n=Ee(i),o=Dt(n,"margin"),r=De(n.maxWidth,i,"clientWidth")||we,a=De(n.maxHeight,i,"clientHeight")||we,l=pr(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const d=Dt(n,"border","width"),u=Dt(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?Math.floor(c/s):h-o.height),c=Ke(Math.min(c,r,l.maxWidth)),h=Ke(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ke(c/2)),{width:c,height:h}}function Ji(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const br=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Qi(i,t){const e=dr(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function wt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function _r(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function xr(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=wt(i,n,e),a=wt(n,o,e),l=wt(o,t,e),c=wt(r,a,e),h=wt(a,l,e);return wt(c,h,e)}const ts=new Map;function yr(i,t){t=t||{};const e=i+JSON.stringify(t);let s=ts.get(e);return s||(s=new Intl.NumberFormat(i,t),ts.set(e,s)),s}function ne(i,t,e){return yr(t,e).format(i)}const vr=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Mr=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Et(i,t,e){return i?vr(t,e):Mr()}function vn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Mn(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function kn(i){return i==="angle"?{between:Qt,compare:ao,normalize:G}:{between:ht,compare:(t,e)=>t-e,normalize:t=>t}}function es({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function kr(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=kn(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,y,b)&&a(n,y)!==0,x=()=>a(o,b)===0||l(o,y,b),k=()=>p||v(),M=()=>!p||x();for(let S=h,w=h;S<=d;++S)_=t[S%r],!_.skip&&(b=c(_[s]),b!==y&&(p=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?S:w),m!==null&&M()&&(g.push(es({start:m,end:S,loop:u,count:r,style:f})),m=null),w=S,y=b));return m!==null&&g.push(es({start:m,end:d,loop:u,count:r,style:f})),g}function Sn(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Sr(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Pr(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=wr(e,n,o,s);if(s===!0)return is(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=en.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);!e||(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var at=new Or;const ns="transparent",Ar={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Ki(i||ns),n=s.valid&&Ki(t||ns);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Lr{constructor(t,e,s,n){const o=e[s];n=ue([t.to,n,o,t.from]);const r=ue([t.from,o,n]);this._active=!0,this._fn=t.fn||Ar[t.type||typeof r],this._easing=Gt[t.easing]||Gt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ue([t.to,e,n,t.from]),this._from=ue([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});A.set("animations",{colors:{type:"color",properties:Rr},numbers:{type:"number",properties:Tr}});A.describe("animations",{_fallback:"animation"});A.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});class Pn{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!C(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const n=t[s];if(!C(n))return;const o={};for(const r of Er)o[r]=n[r];(z(n.properties)&&n.properties||[s]).forEach(r=>{(r===s||!e.has(r))&&e.set(r,o)})})}_animateOptions(t,e){const s=e.options,n=Ir(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Fr(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new Lr(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return at.add(this._chart,s),!0}}function Fr(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function cs(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=Nr(o,r,s),d=t.length;let u;for(let f=0;fe[s].axis===t).shift()}function jr(i,t){return _t(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function $r(i,t,e){return _t(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Wt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(!!s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e]}}}const Ge=i=>i==="reset"||i==="none",hs=(i,t)=>t?i:Object.assign({},i),Yr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Dn(e,!0),values:null};class it{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=as(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Wt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=D(s.xAxisID,qe(t,"x")),r=e.yAxisID=D(s.yAxisID,qe(t,"y")),a=e.rAxisID=D(s.rAxisID,qe(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Wi(this._data,this),t._stacked&&Wt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(C(e))this._data=Vr(e);else if(s!==e){if(s){Wi(s,this);const n=this._cachedMeta;Wt(n),n._parsed=[]}e&&Object.isExtensible(e)&&uo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=as(e.vScale,e),e.stack!==s.stack&&(n=!0,Wt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&cs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{z(n[t])?u=this.parseArrayData(s,n,t,e):C(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[a]===null||c&&d[a]p||d