diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8387ba4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig http://EditorConfig.org + +# Project Root +root = true + +# Default Code Style +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{js,yaml,yml,json}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..15deccf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,62 @@ +name: Tests +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + strategy: + matrix: + ckan-version: ["2.11", "2.10"] + fail-fast: false + + + runs-on: ubuntu-latest + container: + # The CKAN version tag of the Solr and Postgres containers should match + # the one of the container the tests run on. + # You can switch this base image with a custom image tailored to your project + image: ckan/ckan-dev:${{ matrix.ckan-version }} + services: + solr: + image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr9 + postgres: + image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + redis: + image: redis:3 + + + env: + CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test + CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test + CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test + CKAN_SOLR_URL: http://solr:8983/solr/ckan + CKAN_REDIS_URL: redis://redis:6379/1 + + steps: + + - uses: actions/checkout@v4 + + - name: Install requirements + # Install any extra requirements your extension has here (dev requirements, other extensions etc) + run: | + pip install -e ".[dev]" + + - name: Setup extension + # Extra initialization steps + run: | + # Replace default path to CKAN core config file with the one on the container + sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini + ckan -c test.ini db upgrade + + - name: Run tests + run: pytest --ckan-ini=test.ini --cov=ckanext.bulk --disable-warnings ckanext diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..854765b --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +.ropeproject +node_modules +bower_components + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +sdist/ +*.egg-info/ +.installed.cfg +*.egg +.copier-answers.ctb-extended.yml + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml +.benchmarks/ + +# Sphinx documentation +docs/_build/ diff --git a/.gitleaksignore b/.gitleaksignore new file mode 100644 index 0000000..e69de29 diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..9a2a0e2 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +v20 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..9a2a0e2 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..341f974 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,38 @@ +default_install_hook_types: + - pre-commit + - pre-push + - commit-msg + +repos: + # - repo: https://github.com/thoughtworks/talisman + # rev: 'v1.28.0' # Update me! + # hooks: + # # both pre-commit and pre-push supported + # # - id: talisman-push + # - id: talisman-commit + # entry: cmd --githook pre-commit + + # - repo: https://github.com/gitleaks/gitleaks + # rev: v8.18.4 + # hooks: + # - id: gitleaks + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: end-of-file-fixer + stages: [pre-commit] + - id: trailing-whitespace + stages: [pre-commit] + - id: debug-statements + stages: [pre-push] + + ## Ruff + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.5.0 + hooks: + - id: ruff + args: [--fix] + stages: [pre-commit] + - id: ruff-format + stages: [pre-commit] diff --git a/.talismanrc b/.talismanrc new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..58777e3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ +GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 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 Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are 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. + + 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. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + 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 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 work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero 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 Affero 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 Affero 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 Affero 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 Affero 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 Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + 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 AGPL, see +. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5d73b57 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include README.md +include LICENSE +include requirements.txt +recursive-include ckanext/bulk *.html *.json *.js *.less *.css *.mo *.yml *.yaml +recursive-include ckanext/bulk/migration *.ini *.py *.mako diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d3bf8d2 --- /dev/null +++ b/Makefile @@ -0,0 +1,163 @@ +## Example: +# make prepare; make full-upgrade +# +## or +# make prepare; make sync install +# +## `make prepare` installs/updates code for all other make-rules. It's +## recommended to execute it periodicatlly, to pull the lates version of CDM. +# +## `make full-upgrade` synchronizes and installs CKAN, dependencies and current +## extension. +# +## `make sync install` synchronizes and installs only dependencies. CKAN and +## current extension are ignored. +# +## Add `develop=1` to install dev-requirements.txt alongside with the normal +## requirements. +# +## Any extension can be synchronized/installed individually: +# make sync-EXT install-EXT +# +## If `remote-EXT` definition is present, extension is pulled from the +## specified source. If you are running `make sync-EXT install-EXT` and there +## is no `remote-EXT` line, CDM makes an attempt to pull the extension from +## master branch of `https://github.com/ckan/ckanext-EXT`. Most likely, such +## extension does not exist. But git will think that you are pulling from +## private repository and may ask your credentials or just say that you don't +## have permissions to read from this repo. + +############################################################################### +# requirements: start # +############################################################################### +# CKAN core supports this short syntax. But internally it's unfolds into +## remote-ckan = https://github.com/ckan/ckan tag ckan-2.10.4 +# if you want to use CKAN fork or specific commit, use this full specification +ckan_tag = ckan-2.10.4 + +# items from this list are installed by `make full-upgrade` and `make sync +# install`. If you specify remote, but did not added extension to this list, it +# won't be installed. If you add SOMETHING to this list, but did not specify +# remote, SOMETHING is pulled from `https://github.com/ckan/ckanext-SOMETHING +# branch master` +ext_list = \ + admin-panel \ + collection cloudstorage comments \ + dcat \ + editable-config \ + files flakes \ + geoview googleanalytics \ + hierarchy harvest \ + let-me-in \ + officedocs or-facet \ + pdfview pygments \ + resource-indexer \ + scheming search-tweaks spatial saml syndicate \ + toolbelt \ + unfold \ + vip-portal \ + xloader + +# information about extension source. Format is `ALTERNATIVE-NAME = URL TYPE +# REF`, where +# +# * ALTERNATIVE: `remote` by default, but can be any string +# +# * NAME: name of extension. Must be exactly the same as value from `ext_list` +# +# * URL: repo URL. GitHub, BitBucket, GitLab or even SSH URL +# +# * TYPE: type of reference specified by the next part. One of: branch, commit, tag +# +# * REF: commit hash, branch name, tag name, depending on TYPE value. Prefer tags +remote-admin-panel = https://github.com/mutantsan/ckanext-admin-panel commit 999183a +# dev is an alternative. You can install it via `make full-upgrade +# alternative=dev`. Any other prefix can be used instead of `dev`. +dev-admin-panel = https://github.com/mutantsan/ckanext-admin-panel branch master + +remote-cloudstorage = https://github.com/DataShades/ckanext-cloudstorage.git tag v0.3.2 +remote-collection = https://github.com/DataShades/ckanext-collection.git tag v0.2.0a0 +remote-comments = https://github.com/DataShades/ckanext-comments.git tag v0.3.2a0 +remote-dcat = https://github.com/ckan/ckanext-dcat.git tag v1.7.0 +remote-editable-config = https://github.com/ckan/ckanext-editable-config tag v0.0.6 +remote-files = https://github.com/DataShades/ckanext-files.git tag v1.0.0a0 +remote-flakes = https://github.com/DataShades/ckanext-flakes.git tag v0.4.5 +remote-geoview = https://github.com/ckan/ckanext-geoview.git tag v0.1.0 +remote-googleanalytics = https://github.com/ckan/ckanext-googleanalytics.git tag v2.4.0 +remote-harvest = https://github.com/ckan/ckanext-harvest.git tag v1.5.6 +remote-hierarchy = https://github.com/ckan/ckanext-hierarchy.git tag v1.2.1 +remote-let-me-in = https://github.com/mutantsan/ckanext-let-me-in tag v1.0.1 +remote-officedocs = https://github.com/jqnatividad/ckanext-officedocs tag v1.1.0 +remote-or-facet = https://github.com/DataShades/ckanext-or_facet tag v0.1.1 +remote-pdfview = https://github.com/ckan/ckanext-pdfview.git tag 0.0.8 +remote-pygments = https://github.com/mutantsan/ckanext-pygments commit f4287bb +remote-resource-indexer = https://github.com/DataShades/ckanext-resource_indexer.git tag v0.4.1 +remote-saml = https://github.com/DataShades/ckanext-saml.git tag v0.3.3 +remote-scheming = https://github.com/ckan/ckanext-scheming tag release-3.0.0 +remote-search-tweaks = https://github.com/dataShades/ckanext-search-tweaks tag v0.6.1 +remote-spatial = https://github.com/ckan/ckanext-spatial tag v2.1.1 +remote-syndicate = https://github.com/DataShades/ckanext-syndicate tag v2.2.2 +remote-toolbelt = https://github.com/DataShades/ckanext-toolbelt.git tag v0.4.24 +remote-unfold = https://github.com/mutantsan/ckanext-unfold.git tag v1.0.2 +remote-vip-portal = https://github.com/DataShades/ckanext-vip-portal.git tag v0.2.5a1 +remote-xloader = https://github.com/ckan/ckanext-xloader.git tag 1.0.1 + +# extras installed with the extension. Produce `pip install +# 'ckanext-googleanalytics[requirements]'`-like instructions. +package_extras-remote-googleanalytics = requirements +package_extras-remote-files = opendal,libcloud +package_extras-remote-resource-indexer = pdf + + + +############################################################################### +# requirements: end # +############################################################################### + +# version of CDM pulled during `make-prepare`. Use version tag to prevent +# undesirable udates +_version = master + +# import all rules defined in `deps.mk`. This file will be pulled by `make prepare` +-include deps.mk + +prepare: ## download CDM rules + curl -O https://raw.githubusercontent.com/DataShades/ckan-deps-installer/$(_version)/deps.mk + +vendor-dir = ckanext/bulk/assets/vendor + +vendor: ## Copy vendor libraries from node_modules/ to assets directory + cp node_modules/tom-select/dist/js/tom-select.{base,complete}.min.js $(vendor-dir) + cp node_modules/tom-select/dist/css/tom-select{,.bootstrap5}.css $(vendor-dir) + cp node_modules/sweetalert2/dist/sweetalert2.all.min.js $(vendor-dir)/sweetalert2.all.js + cp node_modules/sortablejs/Sortable.min.js $(vendor-dir)/Sortable.js + cp node_modules/htmx.org/dist/htmx.min.js $(vendor-dir)/htmx.js + cp node_modules/hyperscript.org/dist/_hyperscript.min.js $(vendor-dir)/hyperscript.js + cp node_modules/izimodal/css/iziModal.css $(vendor-dir) + cp node_modules/izimodal/js/iziModal.js $(vendor-dir) + cp node_modules/izitoast/dist/css/iziToast.css $(vendor-dir) + cp node_modules/izitoast/dist/js/iziToast.js $(vendor-dir) + cp node_modules/slick-carousel/slick/slick.{js,css} $(vendor-dir) + cp node_modules/slick-carousel/slick/slick-theme.css $(vendor-dir) + cp node_modules/slick-carousel/slick/ajax-loader.gif ckanext/bulk/public + cp node_modules/slick-carousel/slick/fonts ckanext/bulk/public/slick-fonts -r + cp node_modules/daterangepicker/daterangepicker.{js,css} ckanext/bulk/assets/vendor + cp node_modules/daterangepicker/moment.min.js ckanext/bulk/assets/vendor + cp node_modules/overlayscrollbars/styles/overlayscrollbars.css ckanext/bulk/assets/vendor + cp node_modules/overlayscrollbars/browser/overlayscrollbars.browser.es6.js ckanext/bulk/assets/vendor/overlayscrollbars.js + +typecheck: ## Run typechecker + npx pyright --pythonpath="$$(which python)" + + +changelog: ## compile changelog + git changelog -c conventional -o CHANGELOG.md $(if $(bump),-B $(bump)) + +test-server: ## start server for frontend testing +ifeq ($(dirty-server),) + yes | ckan -c test.ini db clean + ckan -c test.ini db upgrade + yes | ckan -ctest.ini sysadmin add admin password=password123 email=admin@test.net +else + ckan -c test.ini run -t +endif diff --git a/README.md b/README.md new file mode 100644 index 0000000..7322e73 --- /dev/null +++ b/README.md @@ -0,0 +1,1199 @@ +[![Tests](https://github.com/Link Digital/ckanext-bulk/workflows/tests.yml/badge.svg)](https://github.com/Link Digital/ckanext-bulk/actions/workflows/test.yml) + +# ckanext-bulk + +Extended template of CKAN extension. + +## Requirements + +Compatibility with core CKAN versions: + +| CKAN version | Compatible? | +|--------------|-------------| +| 2.9 | no | +| 2.10 | yes | +| 2.11 | yes | +| master | yes | + +## Create extension + +If you see this, most likely extension is already created. But if you want to +create another extension, here's the example: + +1. Install `ckanext-toolbelt` + [v0.4.21](https://pypi.org/project/ckanext-toolbelt/) or newer. + ```sh + pip install -U ckanext-toolbelt + ``` + +1. Generate an extension in the **current** directory: + + ```sh + ctb make ckanext extended + ``` + or specify output location using `-o`/`--output-dir` option: + + ```sh + ctb make ckanext extended -o /tmp + ``` + + It's also possible to specify the name of extension (via positional + argument) and use default answers for questions(`-d`/`--use-defaults` + flag). In this way you don't need to answer any questions. + + ```sh + ctb make ckanext extended my-ext -d + ``` + +1. Switch to extension folder and install it with `dev` extras: + ```sh + cd ckanext-my-ext/ + pip install -e '.[dev]' + ``` + +1. Initialize git-repository inside the extension: + ```sh + git init + ``` + +1. Initialize pre-commit hooks: + ```sh + pre-commit install + ``` + +1. Optional. If you don't have CKAN and want to install it alongside with + popular extensions, run: + ```sh + make prepare + make full-upgrade develop=1 + ``` + Create config files for 1st and 3rd lavel(details explained in Configuration + section): + ```sh + ckan generate config default.ini + ckan generate config ckan.ini + ``` + Link 2nd level of configuration: + ```sh + ln -snf ckanext-my-ext/config/* ./ + ``` + Create solr core using schema from + `ckanext-my-ext/config/solr/schema.xml`. Create DB. + Remove content of `[app:main]` from `ckan.ini`. Add `use = + config:project.ini` line instead and copy/adapt `Environment settings: + start/end` block from `project.ini`. + Apply DB migrations: + ```sh + ckan db upgrade + ckan db pending-migrations --apply + ``` + + +## Usage + +This guide explains how you can use the project initialized with the extended +template and add more code to it. If you don't have Markdown viewer and don't +like reading raw markdown source, you can start local server with this guide: + +``` +# you need to install the extension before running the following command +# $ pip install -e '.[dev]' +mkdocs serve +``` + +The documentation is available at [localhost:8000](http://localhost:8000/) as +long as server is running. + +Additional details can be found in the source code. For example, +`logic/action.py` contains examples and explanations of API actions that can be +registered by extension. + + +## Code + +Code of the extension resides inside `ckanext/bulk`. + +### `plugin.py` + +The main entry point is `plugin.py`. It extends CKAN using interfaces and every +other file is somehow connected to `plugin.py`. + +If possible, avoid writing code directly inside `plugin.py`. Only small and +clear functions should be added to it. And anything that does not fit in dozen +lines can be moved into a separate file. + +Default implementation of `plugin.py` extends CKAN using 3 different +approaches. + +--- + +For simple interface, such as `IConfigurer`, it implements the interface +directly and defines `update_config` method. This method registers assets and +templates of the extension. Nothing complex is computed here, and there are no +functions that are hard to read. + +This approach is recommended for the following interfaces: `IConfigurer`, +`IConfigurable`, `IMiddleware`, `IFacets`. + +--- + +To hook into one-mehtod interfaces that register additional functions, the +plugin uses +[blankets](https://docs.ckan.org/en/2.10/extensions/plugins-toolkit.html#ckan.plugins.toolkit.ckan.plugins.toolkit.blanket). When +extension is decorated with blanket, it automatically implements corresponding +interface and registers all public members of corresponding module. + +There are 7 blankets in CKAN: + +| Blanket | Effect | +|---------------------|-----------------------------------------------------------------------------------------------------| +| actions | Register all public functions from `ckanext.bulk.logic.action` as actions | +| auth_functions | Register all public functions from `ckanext.bulk.logic.auth` as auth functions | +| blueprints | Register all blueprints from `ckanext.bulk.views` as blueprints | +| cli | Register all public members(`__all__`) from `ckanext.bulk.cli` as commands | +| config_declarations | Register all declarations from `ckanext/bulk/config_declaration.yaml` | +| helpers | Register all public functions from `ckanext.bulk.helpers` as helpers | +| validators | Register all public functions from `ckanext.bulk.logic.validators` as validators | + +Because of blankets, you don't need to import views, CLI commands or actions +into plugin. You don't even have to register `get_actions`-like function. Any +function defined inside `ckanext.bulk.logic.action` will be +registered as an action with the same name, if it's not prefixed with +underscore. Imported functions are not registered as actions: you have to +create function inside the `action` module to export it automatically. + +If you keep actions or other code units inside multiple files, you can create +`get_actions`-like function, that returns all actions and pass it to the +blanket: + +```python +@tk.blanket.actions(get_actions) +class BulkPlugin(p.SingletonPlugin): + ... +``` + +Note: `blueprints` blanket registers only subclasses of `flask.Blueprint`. + +Note: `cli` blanket is not very smart and will try to register every command +directly under `ckan` CLI. If you are using `click.group` decorator, it's +recommended to define `__all__` list inside `cli` module and specify names of +commands/groups that must be registered by `IClick` interface. + +--- + + +Other interfaces usually are quite complex. The recommended way of implementing +these interfaces(and custom interfaces from extensions, like IFiles) includes +extra steps. + +First, create a module inside `ckanext.bulk.implementations` +using snake-case version of the interface name. For example, +`IPackageController` turns into `package_controller.py`, `IAdminPanel` turns +into `admin_panel.py`. + +Inside this new module, define a plugin that matches the name of the interface +without `I` prefix. Put implementation of the interface inside this plugin. + +```python + +class PackageController(SingletonPlugin): + implements(IPackageController, inherit=True) + + def after_dataset_show(self, context, pkg_dict): + ... +``` + +Re-export implementation from `ckanext/bulk/implementations/__init__.py` + +```python +from .package_controller import PackageController + +__all__ = [ + "PackageController", +] +``` + +And finally add this implementation as a parent class to your main plugin: + +```python +from . import implementations + +class BulkPlugin( + implementations.PackageController, + p.SingletonPlugin, +): + ... + +``` + +It's quite a lot of steps, but in this way you can keep your plugin simple and +readable. + +### `cli.py` + +Define all commands here. It's recommended to create a single `click` group +that maches the name of the plugin and add this group to `__all__` attribute of +the module. As result, only this group will be available as `ckan bulk` CLI command. + +All commands should be registered under this group or its subgroups. + +Members included into `__all__` attribute are registered as CLI commands by +`cli` blanket. + +### `config_declaration.yaml` + +YAML file with [config +declarations](https://docs.ckan.org/en/2.10/maintaining/configuration.html#config-declaration). + +Declare all custom configuration options here. Never use undeclared config +options in code and provide at least basic declaration. It's also recommended +to declare the type and default value for the config option as well. + +You can always dump all the options of the plugin using CKAN CLI: + +```sh +ckan config declaration heh -d +``` + +`-d`/`--include-docs` flag adds description of the option to the output. Omit +it if you need only names and defaults values of the option. + +Declarations from this file are automatically registered in CKAN by +`config_declarations` blanket. + +### `config.py` + +This module simplifies access to config options defined by the plugin. + +Instead of accessing untyped options inside `tk.config`, it's recommended to +define typed accessors inside this module. It improves a number of aspects: + +* config options can be accessed by shorter name: `option()` instead of + `tk.config["ckanext.bulk.option.name"]`. +* accessor has specific type, while `tk.config[KEY]` is always `Any` +* any additional processing of options value can be hidden inside the accessor +* you can safely change the name of the config option + +### `helpers.py` + +This file contains all template helpers for the plugin. + +All public members defined in this module are registered as helpers by +`helpers` blanket. + +### `views.py` + +Here you should register blueprint for the plugin. If you have multiple +blueprints, transform `views.py` into `views/__init__.py` and add every +blueprint as a separate submodule. You'll need to create `get_blueprints` +function and pass it to the blanket: + +```python +@tk.blanket.blueprints(get_blueprints) +class HehPlugin(SingletonPlugin): + ... +``` + +All blueprints defined in this module are registered as blueprints by +`blueprints` blanket. + +### `public/` + +This folder contains files that are directly accessible from browser because of +the following line from `update_config` method of `IConfigurer` implementation: + +```python +tk.add_public_directory(config_, "public") +``` + +### `assets/` + +This is the base folder for all site assets (CSS and JS files) and source files +for them. For example, if you are using SASS or TypeScript, these files should +also be stored inside assets folder. + +Assets cannot be accessed directly. You have to define [named +asset](https://docs.ckan.org/en/2.10/contributing/frontend/assets.html) inside +`assets/webassets.yml` and include this named asset into template using `{% asset "bulk/ASSET_NAME" %}` tag. + +### `templates/` + +This is the base folder for Jinja2 templates. Templates that override existing +pages must replicate structure of CKAN's `templates` folder. If you are going +to create a completely new page, prefer storing templates for it inside +separate subfolder with the name matching the plugin name. For example, +template for the blog page may be stored as `templates/bulk/blog/index.html`. + +### `logic/action.py` + +Define API actions here. If you are going to create a lot of actions, consider +transforming `action.py` into `action/__init__.py` and group actions by domain +inside separate files under this new subfolder: `action/blog.py`, +`action/user.py`, `action/something.py`. + +All public members defined in this module are registered as API actions by +`actions` blanket. + +### `logic/auth.py` + +This file contains auth functions. **Every** API action registered by your +plugin must have dedicated auth function. You can define additional auth +functions and use them with `tk.check_access`/`h.check_access` in views and +templates. + +All public members defined in this module are registered as auth functions by +`auth_functions` blanket. + +### `logic/schema.py` + +Validation schemas for API actions. If action accepts arguments it's +recommended to define a schema for this action. + +Schemas are not registered inside CKAN. They will not conflict with existing +schemas and you don't need to add plugin name as prefix to schemas. + +### `logic/validators.py` + +Validators used by plugin. + +All public members defined in this module are registered as validators by +`validators` blanket. + +### `model/` + +Folder for all your models. Define every model in a separate file. Don't forget +to generate migrations for the model using `ckan generate migration -p bulk -m "Migration message"` CLI command. + +### `schemas/` + +Metadata schemas for ckanext-scheming. + +## Configuration + +Extension contains `config/` folder at root level. All files related to portal +configurations are stored here. Apart from `project.ini` with the project level +configuration, you can also keep `licenses.json`, `resource_formats.json`, +`who.ini`, SAML2 credentials, GoogleCloud credentials, etc. You can even store +metadata schemas here, but historically they are kept together with the code, +so we suggest leaving them inside `ckanext/bulk/schemas`. + +### `project.ini` + +Project specific configuration. It contains all the settings that are safe to +keep in repository. + +Options that should be modified during deployment are kept inside `Environment +settings` block. Any token/password/ID value must be replaced with placeholder: + +```ini +## ckaneext-googleanalytics +googleanalytics.id = G-TEST +``` + +Alternatively, you can specify interpolation string with reference to +environment variable prefixed by `CKAN_`. + +```ini +## ckanext-xloader +ckanext.xloader.api_token = %(CKAN_XLOADER_API_TOKEN)s +``` + +In the example above, value of `CKAN_XLOADER_API_TOKEN` envvar will be used as +XLoader API Token. + +All options that will likely remain unchanged across environments, must be +added after `Environment settings` block. + +This configuration file must be used as a middle layer in 3-layers +configuration: + +1. Generate `default.ini` using CKAN cli. Do not modify it. +1. Create a symbolic link of `config/project.ini` next to + `default.ini`. `project.ini` will use defaults from `default.ini`. +1. Generate `ckan.ini` in the same folder where you have `default.ini` and link + to `project.ini`. Replace the whole content of `[app:main]` section with + `use = config:project.ini`(to use `project.ini` as source for defaults) and + copy/adapt `Environment settings` section from `project.ini`. + +This approach solves the following problems: + +* Expected configuration can be shared across environments because you have + `project.ini` commited in the repo. +* Configuration changes are applied automatically, because `project.ini` is a + link to git-controlled file. You don't need to modify CKAN configuration + manually after the deploy. +* When upgrading to a new CKAN version with new configuration options, or when + secrets were compromised, you can regenerate `default.ini`. All changes from + `ckan.ini` and `project.ini` are kept. +* Environment specific configuration is kept inside `ckan.ini`. You clearly + see, what needs to be configured individually on environment because of + `Environment settings` block. And you can ignored hundreds of options outside + this block, because they must be identicall on all environments. + +### `solr/` + +This folder contains Solr schema. Any modifications must be applied to this +schema and then you can copy the schema into Solr configuration folder after +deployment. + +In this way you can use exactly the same schema and control all the +modifications required by different plugin. + +It's recommended to leave a comment with mention of plugin that requires the +modification before the modified line. + +All additional files required by Solr, like specific version of Solr libraries +can be also added here. + +## Included extensions + +This exntension includes configuration for a number of popular CKAN +extensions. These extensions are installed when you run `make full-upgrade`. + +Usually, you only need to add extension name to `ckan.plugins` config +option. If extension requires additional configuration, it will be mentioned in +the corresponding section below. + +### ckanext-admin-panel + +Admin UI improvements. Adds panel with links to admin pages at the top of the +page. + +Does not require additional configuration. Enabled by default as `admin_panel` +plugin. + +### ckanext-cloudstorage + +Upload resource files to S3 bucket. + +Add `cloudstorage` to the list of enabled plugins. + +Add driver configuration +```ini + +## ckanext-cloudstorage +ckanext.cloudstorage.container_name = +ckanext.cloudstorage.driver = S3 +ckanext.cloudstorage.driver_options = {"key": "", "secret": "", "host": "s3.ap-southeast-2.amazonaws.com"} +``` + +### ckanext-collection + +Utilities for building reusable interfaces for data series. + +Does not require additional configuration. Enabled by default as `collection` +plugin. + +### ckanext-comments + +Comment threads that can be attached to anything(dataset, group, user, +resource). + +Enable `comments` plugin and apply DB migrations `ckan db upgrade -p comments` +to activate comments API. Thread widget must be added manually to pages. For +example, the following block can be used to add thread to `package/read.html` + + +```jinja +{% block primary_content_inner %} + {{ super() }} + {% snippet 'comments/snippets/thread.html', subject_id=pkg.id, subject_type='package' %} +{% endblock primary_content_inner %} +``` + + +### ckanext-dcat + +DCAT translator for CKAN. + +Does not require additional configuration. Enabled by default as `dcat` +plugin. + +### ckanext-editable-config + +API for managing CKAN configuration in runtime. + +Does not require additional configuration. Enabled by default as `editable_config` +plugin. + +### ckanext-files + +File management API. + +Enabled by default as `files` plugin. + +Requires additional configuration: +```ini +## ckanext-files +ckanext.files.storage.default.type = files:fs +ckanext.files.storage.default.path = %(here)s/storage +ckanext.files.storage.default.create_path = true +``` + +### ckanext-flakes + +API for storing arbitrary data in DB. + +Add `flakes` to the list of plugins and apply DB migrations: `ckan db upgrade -p flakes` + +### ckanext-geoview + +Map views for spatial data. + +Configure specific view type accoriding to [official +documentation](https://github.com/ckan/ckanext-geoview?tab=readme-ov-file#available-plugins) + +### ckanext-googleanalytics + +Track user activity using GA. + +Add `googleanalytics` plugin and specify `googleanalytics.id` key. + +### ckanext-harvest + +Transform data from external services into CKAN datasets. + +Add `harvest` to the list of plugins. + +### ckanext-hierarchy + +Group/organization hierarchy. + +Enable `hierarchy_display hierarchy_form hierarchy_group_form` plugins. If you +are using scheming, you may also need to update metadata schemas. + +### ckanext-let-me-in + +One-time login links generator. + +Does not require additional configuration. Enabled by default as `let_me_in` +plugin. + +### ckanext-officedocs + +Views for MS Office documents. + +Add `officedocs_view` to the list of plugins and default views. + +### ckanext-or-facet + +Switch search facets to union logic instead of intersection. + +Add `or_facet` to the list of plugins. + +### ckanext-pdfview + +PDF view for resources. + +Enabled by default as `pdf_view`. + +### ckanext-pygments + +Text views with syntax highlighter. + +Add `pygments_view` to the list of plugins and default views. + +### ckanext-resource-indexer + +Add content of resources to search index. + +Add `resource_indexer plain_resource_indexer` to the list of plugins. + +### ckanext-saml + +SAML2 authentication. + +Add `saml` to the list of plugins. Apply DB migrations: `ckan db upgrade -p +saml`. Adapt `ckanext.saml.*` options. If it's not enough, modify +`config/saml/settings.json`. + +When everything is configured, pull metadata from IdP: `ckanapi action saml_idp_refresh`. + +### ckanext-scheming + +JSON/YAML definitions of metadata schemas. + +Add `scheming_datasets scheming_groups scheming_organizations` to the list of +plugins. + +### ckanext-syndicate + +Push local datasets to extenal CKAN portal + +Add `syndicate` to the list of plugins. Configure details of remote +portal(syndication profile) specified by `ckanext.syndicate.profile*` options. + +### ckanext-search-tweaks + +Additional features for CKAN search. + +Enable [plugins defined by the +extension](https://github.com/DataShades/ckanext-search-tweaks?tab=readme-ov-file#usage) +and add corresponding configuration + +### ckanext-spatial + +Features related to spatial search. + +Add `spatial_metadata spatial_query` to the list of plugins. Initialize PostGIS extension for CKAN DB + +If you are using Docker PostGIS image, you need to do something similar to the example below: + +```sh +PG_VERSION=16 +POSTGIS_VERSION=3.4 +DB=ckan_db_name + +psql -U postgres -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-$POSTGIS_VERSION/postgis.sql -d $DB -v ON_ERROR_ROLLBACK=1; +psql -U postgres -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-$POSTGIS_VERSION/spatial_ref_sys.sql -d $DB -v ON_ERROR_ROLLBACK=1 +``` + +Use `config/solr/schema.xml` for solr. If you are going to use `solr-bbox` +search backend, remove the definition of field after `solr-spatial-field` +comment. If you are going to use `solr-spatial-field` backend, use schema as +is. You'll also need to [add JTS +library](https://solr.apache.org/guide/8_11/spatial-search.html#jts-and-polygons-flat) +to `server/solr-webapp/webapp/WEB-INF/lib/` folder of your Solr service. + +[Extra details about search +backend](https://docs.ckan.org/projects/ckanext-spatial/en/latest/spatial-search.html#choosing-a-backend-for-the-spatial-search). + + +### ckanext-toolbelt + +Different helpers that are often used but are too small for individual +extensions. + +Functionality of toolbelt usually does not require enabling plugins. Just +import and use it. + +### ckanext-unfold + +Views for archives + +Depending on the format of archive, requirements and configuration can be +different. Check [official +documentaion](https://github.com/mutantsan/ckanext-unfold). + +### ckanext-vip-portal + +Restrict access to specific pages globally(for anonymous user) or individually. + +Add `vip_portal` to the list of enabled plugins. + +### ckanext-xloader + +Load files into DataStore tables. + +Add `xloader` to the list of plugins. Configure `ckanext.xloader.api_token` +option. + + +## Additional tools + +This extension contains a set of tools for code quality control, executing +tasks, building assets. Some of them, like tests and benchmarks, will be +written by you. There are some examples available inside files for such +tools. Other, like code-style checker, already configured and you only need to +run specific command. + +Here's the overview of all additional tools that are available inside this +extension. + +### Git hooks: [pre-commit](https://pre-commit.com/) + +This extension contains git hooks that are automatically executed before making +commit. These hooks check *modified* files and prevent commit if you are trying +to include changes that violate project rules. + +Because hooks are executed before each commit, only actions that can be +performed instantly are added to hooks. + +Hooks described below are executed before every commit. They check modified +files and, if file has problems, reject the commit. You have to fix the issue, +add fixes to index `git add ...` and run commit command once again. Some +problems are fixed automatically, but commit is still rejected. You need to +review auto-fixes, add them to index and repeat the commit. + +| Hook | Effect | +|---------------------|-------------------------------------------------------------------------| +| end-of-file-fixer | Ensure that file contains a single new line in the end | +| trailing-whitespace | Ensure that there are no trailing whitespaces on every line of the file | +| ruff | Check standard code style issues | +| ruff-format | Format code using black-compatible rules(but faster than black) | + +Note: `ruff` hooks read configuration from `pyproject.toml`. + +In addition, as an example, before push repository is checked for presence of +debug statemens(`print`, `breakpoint`). If you left them in code, push is +rejected. + +#### Initialization + +```sh +pip install -U pre-commit +pre-commit install +``` + +Note: `pre-commit` dependency is added to `dev` extras of the package and +automatically installed when you run `pip install -e '.[dev]'`. Usually you +only need to run `pre-commit install`. + +This command needs to be executed when you created the extension and +initialized the repo. In addition, this command must be executed when you clone +the extension, because hooks are not automatically installed inside clonned +repo. + +Once you executed `pre-commit install` inside the repo, hooks will be +automatically applied. If you change configuration of hooks, changes are +applied automatically as well. There is no need to install hooks multiple +times. + +Hooks can be removed by running `pre-commit uninstall` or disabled for a single +commit via `-n` flag: `git commit -n ...`. + +#### Add new hooks + +Choose hook from [this list](https://pre-commit.com/hooks.html). Open +documentation of the corresponding repo and search an example of hook +configuration. + +Sometimes, there will be no example, like in case of [Markdown +lint](https://github.com/markdownlint/markdownlint). In this case, you can +manually write configuration of the hook. First, add a new item to `repos` list +inside `.pre-commit-config.yaml`. Add repository url to `repo` attribute of +this new item. + +```yaml +- repo: https://github.com/markdownlint/markdownlint +``` + +Now, choose the latest tag of the repository and set it as value of `rev`: + +```yaml +- repo: https://github.com/markdownlint/markdownlint + rev: v0.13.0 +``` + +Finally, open `.pre-commit-hooks.yaml` file of the [repository with +hooks](https://github.com/markdownlint/markdownlint/blob/main/.pre-commit-hooks.yaml). It +contains definitions of all hooks provided by the repo. Choose hook and add it +as `{"id": HOOK_ID}` inside `hooks` attribute of the configuration. + +```yaml +- repo: https://github.com/markdownlint/markdownlint + rev: v0.13.0 + hooks: + - id: markdownlint +``` + +#### Security + +`pre-commit` configuration contains configuration for +[gitleaks](https://github.com/gitleaks/gitleaks) and +[talisman](https://github.com/thoughtworks/talisman). + +These hooks can be pretty slow so they are disabled by default. But it's +recommended to enable at least one of them to prevent accidental commits with +credentials. + + +### Asset builder: [gulp](https://gulpjs.com/) + +For compiling SCSS into CSS and similar tasks, extension uses +`gulpfile.js`. It's a relatively simple task runner for NodeJS. + +Note: usually, any NodeJS version after v12 can be used with the gulpfile. But +it's recommended to use NodeJS specified in `.node-version`/`.nvmrc`. If you +are using `fnm`/`n`/`nvm`/any other NodeJS version manager, it should +automatically read this file and use expected version of NodeJS. + +#### Initialization + +```sh +npm ci +``` + +#### Execute task + +All available gulp tasks can be checked using `npx gulp --tasks`. Any of the +listed tasks can be executed as `npx gulp `, for example: `npx gulp +build`. + +For simplicity, two tasks are exposed via `npm` scripts: + +* `watch`: wait for changes, recompile styles and include sourcemaps. `npm run + dev` +* `build`: recompile and minify styles. `npm run build` + +#### Add task + +Create a function inside `gulpfile.js`. The simplest function starts from call +to `src`, that selects a file. Then you need to chain `.pipe` calls to specify +transformations applied to file. Finally, the last `.pipe` call should contain +result of `dest` call, which specifies the destination directory of the +file. The name of the file is not changed(but you can apply `.pipe` that +renames the file). + +For example, here's the function that copies `gulpfile.js` into `ooops`: + +```js +const cp = () => src('gulpfile.js').pipe(dest("ooops")) +``` + +When function is created, you need to register it as task. Assign the function +to any attribute of `exports` object. The name of the attribute is the name of +the task. For example, if you want to expose `cp` function defined above as +`COPY` task: + +```js +exports.COPY = cp; +``` + +Now you can call the task via `npx gulp COPY` and you'll see +`ooops/gulpfile.js` when command completed. + +### CKAN dependency management: [CDM](https://github.com/dataShades/ckan-deps-installer) + +CDM is a set of Make-rules that install CKAN extensions. Normal python +dependencies(not a CKAN extension) must be added to `install_requires` section +inside `setup.cfg` instead of using CDM. + +Things that CDM does can be done via pip and requirements.txt. Generally, we +are using CDM to hide complex commands from the person who installs or deploys +the project. + +You should always run `make prepare` before using CDM. This command initializes +and updates CDM. If you see something like `make: *** No rule to make target +'install'. Stop.`, most likely you forget to execute `make prepare`. + +The recommended way of using CDM is running `make full-upgrade`. This command +downloads CKAN source, all required extensions, switches everything to expected +branch/tag/commit and install everything. + +If you are going to modify extension, you probably want to install +dev-dependencies from `dev-requirements.txt` of CKAN and extensions. Add +`develop=1` to achieve this: + +```sh +make full-upgrade develop=1 +``` + +This command takes a lot of time, as it reinstalls every extension and CKAN +itself. You can make the process faster, if you want to update only specific +part of the codebase. + +If you want to synchronize(switch to expected branch/tag/commit) and install +only CKAN, run + +```sh +make ckan-sync ckan-install +``` + +If you want to synchronize and install all extensions(but not the CKAN), run + +```sh +make sync install +``` + +If you want to synchronize and install just a single extension, find it's name +inside `ext_list` variable of `Makefile`(you need to use the exact value, +including letter case, hyphens and underscores). Then run the next command +replacing `NAME` with the name of extension: + +```sh +make sync-NAME install-NAME +``` + + +#### Initialization + +```sh +make prepare +``` + +#### Upgrading CKAN + +Modify `ckan_tag` inside `Makefile`, using new version tag and run `make +full-upgrade`. + +#### Add dependency + +Modify `Makefile`: + +* add `remote-NAME` record replacing `NAME` with the name of new + dependency. Record is composed of the repo URL, reference type(`tag`, + `commit`, `branch`), and value of the reference. +* add `NAME` to `ext_list`. `NAME` added to `ext_list` must be exactly the same + as name used in `remote-NAME`. +* If you need extras(`pip install ckanext-something[extra1,extra2]`), specify + them as `package_extras-remote-NAME = extra1,extra2` after all `remote-` + lines. + +Run `make full-upgrade`. + +#### Use different version of the dependency on certain environments + +If you are using branch `master` on PROD, but want to test branch `develop` on +DEV or locally, you can add *alternative* remotes. + +Let's assume you already have `remote-NAME = https://github/url branch master` +inside Makefile. This is the default version of dependency, that is used by +`full-upgrade` and `sync` make-rules. + +Now, add `dev-NAME = https://github/url branch develop` to Makefile. The main +point here, you need to replace `remote-` prefix, with `dev-` prefix. You can +also change URL of the repo, type of the reference or reference value(in the +example branch `master` changed to `develop`). + +From this moment you can add `alternative=dev` to any command: + +```sh +make full-upgrade alternative=dev +make sync install alternative=dev +make sync-NAME install-NAME alternative=dev +``` + +When `alternative=...` is added, makefile tries to install dependency using +`-` prefix(`dev-` in our case) instead of `remote-`. If +dependency with such prefix is found, it will be installed. If there is no such +dependency, default version with `remote-` prefix is used. That's why all +dependencies that do not have `dev-` version are still available. + +You can add as many alternatives as you want: +```sh +dev-NAME = https://github/url branch develop +uat-NAME = https://github/url branch develop +local1-NAME = https://github/url branch develop +local2-NAME = https://github/url branch develop +super-local-NAME = https://github/url branch develop +``` + +Every alternative is used only when you run make-rule with corresponding value +of `alternative=...` argument. + +### Typechecker: [pyright](https://microsoft.github.io/pyright/) + +Extension uses `pyright` to verify correctness of types. To run the checker, +use `npx pyright` or `make typecheck` command + +Typechecker is not included into git hooks because it is not fast enough. But +you should always check types before the commit: any type error is as bad for +the project as any other code-style issue, or even more serious. Developer may +rely on typing system to simplify and optimize the code, so using uncertain or +invalid types is a bad habit. + +There are 3 recommendations regarding typing: + +* every function must use typed parameters and typed output if it's different + from `None`. +* generics/containers must include specification for the items. I.e, `list` + and `dict` are not allowed, use `list[Any]` and `dict[str, Any]` instead. +* `Any` is allowed, but not recommended. Prefer using specific type, union or + generic. + + +```python + +## GOOD +def sum(a: int, b: int) -> int: + return a + b + +## BAD: result should be specified, even if it's inferred +def sum(a: int, b: int): + return a + b + +## GOOD: result is `None`, so you can omit specification of return value +def remove(path: str): + os.path.unlink(path) + +## BAD: incomplete generic type should be avoided. +## It's better to use `list[Any]` instead of `list`. +def sort(items: list): + items.sort() + +## BAD: use union `list[Any] | dict[str, Any]` +def sort(items: Any): + if isinstance(items, list): + items.sort() + elif isinstance(items, dict) + ... + else: + raise TypeError +``` + +#### Initialization + +```sh +npm ci +``` + +#### Configuration + +Pyright configuration is managed by `[tool.pyright]` section of +`pyproject.toml`. + +### Code-style checker and formatter: [ruff](https://docs.astral.sh/ruff/) + +Extension uses `ruff` as linter and auto-formatter. Ruff contains +implementation of various code-checkers and can also do the same things as +`black` or `isort`. + +#### Check the code + +```sh +ruff check . +``` + +#### Fix problems(not every problem can be fixed automatically) + +```sh +ruff check --fix . +``` + +#### Format the code + +```sh +ruff format . +``` + +#### Configuration + +Ruff configuration is managed by `[tool.ruff.*]` sections of `pyproject.toml`. + + +### Unit tests: [pytest](https://docs.pytest.org/) + +Majority of tests for the extension is written using `pytest`. + +`ckanext/bulk/tests` contains examples of tests for standard +operations. Every `test_*.py` file contains tests. Every `conftest.py` file +defines fixtures that are available for modules on the same level and child +modules. + +`ckanext/bulk/tests/benchmarks` contains benchmarks. They +are written in the same way as normal tests, but we are using them to measure +code performance. By default, all benchmarks are excluded from selection when +pytest in running. You need to run benchmarks explicitely using `-m benchmark` +argument of `pytest` command. + +```sh +pytest -m benchmark +``` + +The bigger project grows, the more risks appear when you update something or +add a new functionality. Even though tests do not guarantee that nothing is +broken, they can help a lot. When you forget about certain feature, if it's +covered by test, you'll likely notice when it stop working. And upgrading CKAN +core becomes much more predictable when you have tests for main parts of you +project. + +If possible, try achieving 100% test coverage. To measure current coverage, use + +```sh +## print coverage to terminal +pytest --cov=ckanext.bulk + +## generate HTML report at htmlcov/index.html +pytest --cov=ckanext.bulk --cov-report html +``` + +#### Run tests + +Run all tests + +```sh +pytest +``` + +Run tests from `ckanext/bulk/tests/test_plugin.py` + +```sh +pytest ckanext/bulk/tests/test_plugin.py +``` + +Run only tests that failed during previous test session + +```sh +pytest --lf +``` + +Stop execution after first failed test + +```sh +pytest -x +``` + +Run only tests that contain `hello` and `world` in their full path. Full path +contains filepath, class and test name: `ckanext/bulk/tests/test_smth.py:TestSmth:test_smth` + +```sh +pytest -k "hello and world" +``` + +#### Produce coverage report + +```sh +pytest --cov=ckanext.bulk +``` + +#### Run benchmarks + +```sh +pytest -m benchmark +``` + +#### Configuration + +Pytest configuration is managed by `[tool.pytest.ini_options]` section of +`pyproject.toml`. + +### End-to-end tests: [cypress](https://www.cypress.io/) + +You can test functions, action, views using pytest. But testing JS modules +requires a different approach. And you may find writing e2e tests simpler with +cypress, that pytest, because you can visualize the process. + +Cypress is used by this extension to perform testing in browser. Cypress opens +application in a real browser and visits different pages, so you need a running +CKAN application to run cyppress tests. + +You can use any application that is served on localhost:5000 and has `admin` +user with password `password123`. There is a make-rule that starts such server +using `test.ini` and creates required user. As it uses `test.ini`, you have to +configure test environment before using it. + +```sh +make test-server +``` + +With test server started in a separate terminal, you can run e2e tests in +headless mode(without opening the browser): + +```sh +npx cypress run +``` + +But if you are not familiar with cypress, you may find running tests inside +interactive session more convenient: + +```sh +npx cypress open +``` + +#### Write tests + +Tests are defined inside `cypress/e2e/` directory. You'll find examples there. + +#### Run tests + +```sh +npx cypress run +``` + +#### Initialization + +```sh +npm ci +make test-server +``` diff --git a/ckanext/__init__.py b/ckanext/__init__.py new file mode 100644 index 0000000..6d83202 --- /dev/null +++ b/ckanext/__init__.py @@ -0,0 +1,9 @@ +# this is a namespace package +try: + import pkg_resources + + pkg_resources.declare_namespace(__name__) +except ImportError: + import pkgutil + + __path__ = pkgutil.extend_path(__path__, __name__) diff --git a/ckanext/bulk/__init__.py b/ckanext/bulk/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ckanext/bulk/assets/.gitignore b/ckanext/bulk/assets/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/ckanext/bulk/assets/scripts/bulk-datepicker.js b/ckanext/bulk/assets/scripts/bulk-datepicker.js new file mode 100644 index 0000000..7244782 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-datepicker.js @@ -0,0 +1,26 @@ +/** + * Daterangepicker adapter. + * https://www.daterangepicker.com/ + */ +ckan.module("bulk-datepicker", function ($) { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof $.fn.daterangepicker === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-datepicker] daterangepicker library is not loaded", + ); + return; + } + + const options = this.sandbox["bulk"].nestedOptions( + this.options, + ); + + this.el.daterangepicker(options); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-izi-modal.js b/ckanext/bulk/assets/scripts/bulk-izi-modal.js new file mode 100644 index 0000000..806f149 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-izi-modal.js @@ -0,0 +1,25 @@ +/** + * iziModal adapter. + * https://izimodal.marcelodolza.com + */ +ckan.module("bulk-izi-modal", function ($) { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof $.fn.iziModal === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-izi-modal] iziModal library is not loaded", + ); + return; + } + + this.modal = this.$("[data-izi-modal]").iziModal(this.options); + this.trigger = this.$("[data-izi-trigger]"); + + this.trigger.on("click", () => this.modal.iziModal("open")); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-izi-toast.js b/ckanext/bulk/assets/scripts/bulk-izi-toast.js new file mode 100644 index 0000000..1143152 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-izi-toast.js @@ -0,0 +1,22 @@ +/** + * iziToast adapter. + * https://izitoast.marcelodolza.com + */ +ckan.module("bulk-izi-toast", function ($) { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof iziToast === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-izi-toast] iziToast library is not loaded", + ); + return; + } + + this.el.on("click", () => iziToast.show(this.options)); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-scrollbar.js b/ckanext/bulk/assets/scripts/bulk-scrollbar.js new file mode 100644 index 0000000..cd89555 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-scrollbar.js @@ -0,0 +1,26 @@ +/** + * OverlayScrollbars adapter. + * https://kingsora.github.io/OverlayScrollbars/ + */ +ckan.module("bulk-scrollbar", function ($) { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof OverlayScrollbarsGlobal === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-scrollbar] OverlayScrollbars library is not loaded", + ); + return; + } + + const options = this.sandbox["bulk"].nestedOptions( + this.options, + ); + + OverlayScrollbarsGlobal.OverlayScrollbars(this.el[0], options) + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-slick.js b/ckanext/bulk/assets/scripts/bulk-slick.js new file mode 100644 index 0000000..db1e667 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-slick.js @@ -0,0 +1,22 @@ +/** + * Slick adapter. + * https://kenwheeler.github.io/slick/ + */ +ckan.module("bulk-slick", function ($) { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof $.fn.slick === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-slick] slick library is not loaded", + ); + return; + } + + this.el.slick(this.options); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-sortable.js b/ckanext/bulk/assets/scripts/bulk-sortable.js new file mode 100644 index 0000000..746b597 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-sortable.js @@ -0,0 +1,22 @@ +/** + * SortableJS adapter. + * https://sortablejs.github.io/Sortable/ + */ +ckan.module("bulk-sortable", function () { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof Sortable === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-sortable] SortableJS library is not loaded", + ); + return; + } + + Sortable.create(this.el[0]); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-swal.js b/ckanext/bulk/assets/scripts/bulk-swal.js new file mode 100644 index 0000000..a847e88 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-swal.js @@ -0,0 +1,25 @@ +/** + * SweetAlert2 adapter. + * https://sweetalert2.github.io/ + */ +ckan.module("bulk-swal", function () { + return { + options: {}, + + initialize() { + // stop execution if dependency is missing. + if (typeof Swal === "undefined") { + // reporting the source of the problem is always a good idea. + console.error( + "[bulk-swal] SweetAlert library is not loaded", + ); + return; + } + + const options = this.sandbox["bulk"].nestedOptions( + this.options, + ); + this.el.on("click", () => Swal.fire(options)); + }, + }; +}); diff --git a/ckanext/bulk/assets/scripts/bulk-tom-select.js b/ckanext/bulk/assets/scripts/bulk-tom-select.js new file mode 100644 index 0000000..b9870ec --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk-tom-select.js @@ -0,0 +1,38 @@ +/** + * TomSelect adapter. + * https://tom-select.js.org/ + */ +ckan.module("bulk-tom-select", function () { + + return { + // any attribute with `data-module-` prefix transforms into camelized + // option. `data-module-hello-world="1"` becomes `helloWorld: 1`. Case + // transformation happens only after hyphen. This is used to pass nested + // options. For example, `data-module-hello-world_bye-world` becomes + // `helloWorld_byeWorld`. Then options are processed by + // `this.sandbox.bulk.nestedOptions` and we receive + // `{helloWorld: {byeWorld: ...}}`. + options: { + + }, + + initialize() { + // stop execution if dependency is missing. + if (typeof TomSelect === "undefined") { + // reporting the source of the problem is always a good idea. + console.error("[bulk-tom-select] TomSelect library is not loaded"); + return + } + + // tom-select has a number of nested options. We are using + // `nestedOptions` helper defined inside `bulk.js` to + // convert flat options of CKAN JS module into nested object. + const options = this.sandbox["bulk"].nestedOptions(this.options); + + // in this case there is no value in keeping the reference to the + // widget. But if you are going to extend this module, sharing + // information between methods through `this` is a good choice. + this.widget = new TomSelect(this.el, options); + } + } +}) diff --git a/ckanext/bulk/assets/scripts/bulk.js b/ckanext/bulk/assets/scripts/bulk.js new file mode 100644 index 0000000..a6642a3 --- /dev/null +++ b/ckanext/bulk/assets/scripts/bulk.js @@ -0,0 +1,43 @@ +/** + * Code executed on every page. + * + * Avoid using this function and try extracting logic into CKAN JS modules. + */ +jQuery(function () { + // register plugin helpers inside Sandbox object, available as `this.sandbox` + // inside every module instance. + ckan.sandbox.extend({ + "bulk": { + /** + * Transform `{hello_world_prop: 1}` into `{hello:{world:{prop: 1}}}` + */ + nestedOptions(options) { + const nested = {}; + + for (let name in options) { + if (typeof name !== "string") continue; + + const path = name.split("_"); + const prop = path.pop(); + const target = path.reduce((container, part) => { + container[part] = container[part] || {}; + return container[part]; + }, nested); + target[prop] = options[name]; + } + + return nested; + }, + }, + }); + + // initialize CKAN modules inside fragments loaded by HTMX + if (typeof htmx !== "undefined") { + htmx.on("htmx:afterSettle", function (event) { + var elements = event.target.querySelectorAll("[data-module]"); + for (let node of elements) { + ckan.module.initializeElement(node); + } + }); + } +}); diff --git a/ckanext/bulk/assets/scss/_cssvars.scss b/ckanext/bulk/assets/scss/_cssvars.scss new file mode 100644 index 0000000..24010a4 --- /dev/null +++ b/ckanext/bulk/assets/scss/_cssvars.scss @@ -0,0 +1,20 @@ +@use "sass:map"; +@use "variables" as v; + +// if you never use variable inside SASS expression, consider using +// CSS-variables instead. CSS-variables are great for dynamic theme changes and +// do not visibly affect rendering performance in majority of scenarios. +:root { + --bulk-mobile-font-size: 14px; + --bulk-desktop-font-size: 16px; + + --bulk-font-main: "Noto Sans", serif; + --bulk-font-heading: "Bitter", serif; + + --bulk-color-brand: #{map.get(v.$pallette, "blue")}; + --bulk-color-accent: #{map.get(v.$pallette, "red")}; + --bulk-color-default: #{map.get(v.$pallette, "white")}; + --bulk-color-link: #{map.get(v.$pallette, "navy")}; + --bulk-color-text: #{map.get(v.$pallette, "black")}; + --bulk-color-outline: #{map.get(v.$pallette, "gray")}; +} diff --git a/ckanext/bulk/assets/scss/_fonts.scss b/ckanext/bulk/assets/scss/_fonts.scss new file mode 100644 index 0000000..7126e59 --- /dev/null +++ b/ckanext/bulk/assets/scss/_fonts.scss @@ -0,0 +1,2 @@ +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap'); diff --git a/ckanext/bulk/assets/scss/_footer.scss b/ckanext/bulk/assets/scss/_footer.scss new file mode 100644 index 0000000..9c2f379 --- /dev/null +++ b/ckanext/bulk/assets/scss/_footer.scss @@ -0,0 +1,11 @@ +@use "mixins" as m; +@use "utils" as u; +@use "variables" as v; + +.site-footer { + .nav .nav-item .nav-link { + + &:hover, &:focus, &:active { + } + } +} diff --git a/ckanext/bulk/assets/scss/_global.scss b/ckanext/bulk/assets/scss/_global.scss new file mode 100644 index 0000000..c365242 --- /dev/null +++ b/ckanext/bulk/assets/scss/_global.scss @@ -0,0 +1,20 @@ +@use "sass:map"; +@use "mixins" as m; +@use "variables" as v; + +html { + font-size: var(--bulk-mobile-font-size); + + @include m.breakpoint(md) { + font-size: var(--bulk-desktop-font-size); + } +} + +body { + font-family: var(--bulk-font-main); +} + +:focus, +:focus-visible { + outline: var(--bulk-color-outline) auto 1px; +} diff --git a/ckanext/bulk/assets/scss/_header.scss b/ckanext/bulk/assets/scss/_header.scss new file mode 100644 index 0000000..f2b5a8c --- /dev/null +++ b/ckanext/bulk/assets/scss/_header.scss @@ -0,0 +1,16 @@ +@use "mixins" as m; +@use "utils" as u; +@use "variables" as v; + +.account-masthead { + .account { + ul li { + a { + } + } + } +} + +.navbar { + +} diff --git a/ckanext/bulk/assets/scss/_mixins.scss b/ckanext/bulk/assets/scss/_mixins.scss new file mode 100644 index 0000000..b0c66f1 --- /dev/null +++ b/ckanext/bulk/assets/scss/_mixins.scss @@ -0,0 +1,14 @@ +@use "sass:map"; +@use "variables" as v; + +@mixin breakpoint($size) { + @media (min-width: #{map.get(v.$breakpoints, $size)}) { + @content; + } +} + +@mixin text-default { + font-size: 1rem; + font-weight: 400; + line-height: 1.5rem; +} diff --git a/ckanext/bulk/assets/scss/_utils.scss b/ckanext/bulk/assets/scss/_utils.scss new file mode 100644 index 0000000..fc50871 --- /dev/null +++ b/ckanext/bulk/assets/scss/_utils.scss @@ -0,0 +1,5 @@ +@use "sass:math"; + +@function rem($value) { + @return math.div($value, 16px) * 1rem; +} diff --git a/ckanext/bulk/assets/scss/_variables.scss b/ckanext/bulk/assets/scss/_variables.scss new file mode 100644 index 0000000..5d7a464 --- /dev/null +++ b/ckanext/bulk/assets/scss/_variables.scss @@ -0,0 +1,21 @@ +@use "sass:map"; + +// Use maps to group related values that are not used often. +$breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px, +); + +// use map for values that are accessed only once or with values that are +// processed in a loop. +$pallette: ( + "red": #ff0000, + "blue": #0000ff, + "navy": #000080, + "white": #ffffff, + "black": #000000, + "gray": #cccccc, +); diff --git a/ckanext/bulk/assets/scss/_vendor.scss b/ckanext/bulk/assets/scss/_vendor.scss new file mode 100644 index 0000000..81ddd71 --- /dev/null +++ b/ckanext/bulk/assets/scss/_vendor.scss @@ -0,0 +1,9 @@ +@use "tom-select/src/scss/tom-select"; +// @use "tom-select/src/scss/tom-select.default"; +@use "sweetalert2/src/scss/theming"; + +@use "slick-carousel/slick/slick"; +@use "slick-carousel/slick/slick-theme" with ( + $slick-font-path: "/slick-fonts/", + $slick-loader-path: "/", +); diff --git a/ckanext/bulk/assets/scss/bulk.scss b/ckanext/bulk/assets/scss/bulk.scss new file mode 100644 index 0000000..ea98212 --- /dev/null +++ b/ckanext/bulk/assets/scss/bulk.scss @@ -0,0 +1,28 @@ +@use "vendor"; +@use "fonts"; +@use "cssvars"; + +@use "global"; + +// Elements /////////////////////////////////////////////////////////////////// +@use "elements/breadcrumb"; +@use "elements/buttons"; +@use "elements/forms"; +@use "elements/pagination"; +@use "elements/tables"; + +// Global components ////////////////////////////////////////////////////////// +@use "header"; +@use "footer"; + +// Specific pages ///////////////////////////////////////////////////////////// +@use "pages/search"; +// @use "pages/group"; +// @use "pages/organization"; +// @use "pages/dataset"; +// @use "pages/admin"; +// @use "pages/home"; + +// Forms ////////////////////////////////////////////////////////////////////// +// @use "forms/package_form"; +// @use "forms/user_edit"; diff --git a/ckanext/bulk/assets/scss/elements/_breadcrumb.scss b/ckanext/bulk/assets/scss/elements/_breadcrumb.scss new file mode 100644 index 0000000..b37585b --- /dev/null +++ b/ckanext/bulk/assets/scss/elements/_breadcrumb.scss @@ -0,0 +1,25 @@ +.toolbar { + .breadcrumb { + li { + a { + } + + &.home { + i { + } + + span { + } + } + + &.active { + a { + } + } + + // arrow > + &:before { + } + } + } +} diff --git a/ckanext/bulk/assets/scss/elements/_buttons.scss b/ckanext/bulk/assets/scss/elements/_buttons.scss new file mode 100644 index 0000000..6739074 --- /dev/null +++ b/ckanext/bulk/assets/scss/elements/_buttons.scss @@ -0,0 +1,26 @@ +@use "mixins" as m; +@use "utils" as u; +@use "variables" as v; + +.btn { + &.btn-primary { + &:hover, + &:active, + &:focus { + + } + } + + + &.btn-default { + } + + &.btn-link { + } + + &.btn-white { + } + + &.btn-sm { + } +} diff --git a/ckanext/bulk/assets/scss/elements/_forms.scss b/ckanext/bulk/assets/scss/elements/_forms.scss new file mode 100644 index 0000000..72279d2 --- /dev/null +++ b/ckanext/bulk/assets/scss/elements/_forms.scss @@ -0,0 +1,12 @@ +@use "mixins" as m; +@use "utils" as u; +@use "variables" as v; + +.form-label { +} + +.control-required { +} + +.form-control { +} diff --git a/ckanext/bulk/assets/scss/elements/_pagination.scss b/ckanext/bulk/assets/scss/elements/_pagination.scss new file mode 100644 index 0000000..66bdcb7 --- /dev/null +++ b/ckanext/bulk/assets/scss/elements/_pagination.scss @@ -0,0 +1,5 @@ +.pagination-wrapper, +.dataTables_paginate { + .pagination { + } +} diff --git a/ckanext/bulk/assets/scss/elements/_tables.scss b/ckanext/bulk/assets/scss/elements/_tables.scss new file mode 100644 index 0000000..1b94bac --- /dev/null +++ b/ckanext/bulk/assets/scss/elements/_tables.scss @@ -0,0 +1,21 @@ +.table { + + thead { + + tr th, + tr td { + } + } + + tbody { + } + + tr { + + th, + td { + } + + } + +} diff --git a/ckanext/bulk/assets/scss/pages/_search.scss b/ckanext/bulk/assets/scss/pages/_search.scss new file mode 100644 index 0000000..e69de29 diff --git a/ckanext/bulk/assets/styles/bulk.css b/ckanext/bulk/assets/styles/bulk.css new file mode 100644 index 0000000..e69de29 diff --git a/ckanext/bulk/assets/vendor/Sortable.js b/ckanext/bulk/assets/vendor/Sortable.js new file mode 100644 index 0000000..bb99533 --- /dev/null +++ b/ckanext/bulk/assets/vendor/Sortable.js @@ -0,0 +1,2 @@ +/*! Sortable 1.15.2 - MIT | git://github.com/SortableJS/Sortable.git */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function I(o){for(var t=1;tt.length)&&(e=t.length);for(var n=0,o=new Array(e);n"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&p(t,e)||o&&t===n)return t}while(t!==n&&(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode))}var i;return null}var g,m=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(m," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(m," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function b(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function Bt(t){V&&V.parentNode[K]._isOutsideThisEl(t.target)}function Ft(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ft.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(n in W.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in kt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Nt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,x())}function jt(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Ht(t){t.draggable=!1}function Lt(){Tt=!1}function Kt(t){return setTimeout(t,0)}function Wt(t){return clearTimeout(t)}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(mt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){xt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&xt.push(o)}}(o),!V&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||tt===l)){if(ot=j(l),rt=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return q({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),G("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return q({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),G("filter",n,{evt:e}),!0}))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!V&&n.parentNode===r&&(o=X(n),Q=r,Z=(V=n).parentNode,J=V.nextSibling,tt=n,lt=a.group,ct={target:Ft.dragged=V,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ct.clientX-o.left,pt=ct.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,V.style["will-change"]="all",o=function(){G("delayEnded",i,{evt:t}),Ft.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(t,e),q({sortable:i,name:"choose",originalEvent:t}),k(V,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){b(V,t.trim(),Ht)}),h(l,"dragover",Yt),h(l,"mousemove",Yt),h(l,"touchmove",Yt),h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),G("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():Ft.eventCanceled?this._onDrop():(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Ht(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;f(t,"mouseup",this._disableDelayedDrag),f(t,"touchend",this._disableDelayedDrag),f(t,"touchcancel",this._disableDelayedDrag),f(t,"mousemove",this._delayedDragTouchMoveHandler),f(t,"touchmove",this._delayedDragTouchMoveHandler),f(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(V,"dragend",this),h(Q,"dragstart",this._onDragStart));try{document.selection?Kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;wt=!1,Q&&V?(G("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Bt),n=this.options,t||k(V,n.dragClass,!1),k(V,n.ghostClass,!0),Ft.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Rt();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY))!==e;)e=t;if(V.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Xt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=$&&v($,!0),a=$&&r&&r.a,l=$&&r&&r.d,e=Mt&&yt&&E(yt),a=(i.clientX-ct.clientX+o.x)/(a||1)+(e?e[0]-Ct[0]:0)/(a||1),l=(i.clientY-ct.clientY+o.y)/(l||1)+(e?e[1]-Ct[1]:0)/(l||1);if(!Ft.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))D.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>D.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,$),e?t.clientX<_.left-10||t.clientY' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '' + + '' + + ' ' + + '
' + + ''; + + this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); + this.container = $(options.template).appendTo(this.parentEl); + + // + // handle all the possible options overriding defaults + // + + if (typeof options.locale === 'object') { + + if (typeof options.locale.direction === 'string') + this.locale.direction = options.locale.direction; + + if (typeof options.locale.format === 'string') + this.locale.format = options.locale.format; + + if (typeof options.locale.separator === 'string') + this.locale.separator = options.locale.separator; + + if (typeof options.locale.daysOfWeek === 'object') + this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); + + if (typeof options.locale.monthNames === 'object') + this.locale.monthNames = options.locale.monthNames.slice(); + + if (typeof options.locale.firstDay === 'number') + this.locale.firstDay = options.locale.firstDay; + + if (typeof options.locale.applyLabel === 'string') + this.locale.applyLabel = options.locale.applyLabel; + + if (typeof options.locale.cancelLabel === 'string') + this.locale.cancelLabel = options.locale.cancelLabel; + + if (typeof options.locale.weekLabel === 'string') + this.locale.weekLabel = options.locale.weekLabel; + + if (typeof options.locale.customRangeLabel === 'string'){ + //Support unicode chars in the custom range name. + var elem = document.createElement('textarea'); + elem.innerHTML = options.locale.customRangeLabel; + var rangeHtml = elem.value; + this.locale.customRangeLabel = rangeHtml; + } + } + this.container.addClass(this.locale.direction); + + if (typeof options.startDate === 'string') + this.startDate = moment(options.startDate, this.locale.format); + + if (typeof options.endDate === 'string') + this.endDate = moment(options.endDate, this.locale.format); + + if (typeof options.minDate === 'string') + this.minDate = moment(options.minDate, this.locale.format); + + if (typeof options.maxDate === 'string') + this.maxDate = moment(options.maxDate, this.locale.format); + + if (typeof options.startDate === 'object') + this.startDate = moment(options.startDate); + + if (typeof options.endDate === 'object') + this.endDate = moment(options.endDate); + + if (typeof options.minDate === 'object') + this.minDate = moment(options.minDate); + + if (typeof options.maxDate === 'object') + this.maxDate = moment(options.maxDate); + + // sanity check for bad options + if (this.minDate && this.startDate.isBefore(this.minDate)) + this.startDate = this.minDate.clone(); + + // sanity check for bad options + if (this.maxDate && this.endDate.isAfter(this.maxDate)) + this.endDate = this.maxDate.clone(); + + if (typeof options.applyButtonClasses === 'string') + this.applyButtonClasses = options.applyButtonClasses; + + if (typeof options.applyClass === 'string') //backwards compat + this.applyButtonClasses = options.applyClass; + + if (typeof options.cancelButtonClasses === 'string') + this.cancelButtonClasses = options.cancelButtonClasses; + + if (typeof options.cancelClass === 'string') //backwards compat + this.cancelButtonClasses = options.cancelClass; + + if (typeof options.maxSpan === 'object') + this.maxSpan = options.maxSpan; + + if (typeof options.dateLimit === 'object') //backwards compat + this.maxSpan = options.dateLimit; + + if (typeof options.opens === 'string') + this.opens = options.opens; + + if (typeof options.drops === 'string') + this.drops = options.drops; + + if (typeof options.showWeekNumbers === 'boolean') + this.showWeekNumbers = options.showWeekNumbers; + + if (typeof options.showISOWeekNumbers === 'boolean') + this.showISOWeekNumbers = options.showISOWeekNumbers; + + if (typeof options.buttonClasses === 'string') + this.buttonClasses = options.buttonClasses; + + if (typeof options.buttonClasses === 'object') + this.buttonClasses = options.buttonClasses.join(' '); + + if (typeof options.showDropdowns === 'boolean') + this.showDropdowns = options.showDropdowns; + + if (typeof options.minYear === 'number') + this.minYear = options.minYear; + + if (typeof options.maxYear === 'number') + this.maxYear = options.maxYear; + + if (typeof options.showCustomRangeLabel === 'boolean') + this.showCustomRangeLabel = options.showCustomRangeLabel; + + if (typeof options.singleDatePicker === 'boolean') { + this.singleDatePicker = options.singleDatePicker; + if (this.singleDatePicker) + this.endDate = this.startDate.clone(); + } + + if (typeof options.timePicker === 'boolean') + this.timePicker = options.timePicker; + + if (typeof options.timePickerSeconds === 'boolean') + this.timePickerSeconds = options.timePickerSeconds; + + if (typeof options.timePickerIncrement === 'number') + this.timePickerIncrement = options.timePickerIncrement; + + if (typeof options.timePicker24Hour === 'boolean') + this.timePicker24Hour = options.timePicker24Hour; + + if (typeof options.autoApply === 'boolean') + this.autoApply = options.autoApply; + + if (typeof options.autoUpdateInput === 'boolean') + this.autoUpdateInput = options.autoUpdateInput; + + if (typeof options.linkedCalendars === 'boolean') + this.linkedCalendars = options.linkedCalendars; + + if (typeof options.isInvalidDate === 'function') + this.isInvalidDate = options.isInvalidDate; + + if (typeof options.isCustomDate === 'function') + this.isCustomDate = options.isCustomDate; + + if (typeof options.alwaysShowCalendars === 'boolean') + this.alwaysShowCalendars = options.alwaysShowCalendars; + + // update day names order to firstDay + if (this.locale.firstDay != 0) { + var iterator = this.locale.firstDay; + while (iterator > 0) { + this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); + iterator--; + } + } + + var start, end, range; + + //if no start/end dates set, check if an input element contains initial values + if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { + if ($(this.element).is(':text')) { + var val = $(this.element).val(), + split = val.split(this.locale.separator); + + start = end = null; + + if (split.length == 2) { + start = moment(split[0], this.locale.format); + end = moment(split[1], this.locale.format); + } else if (this.singleDatePicker && val !== "") { + start = moment(val, this.locale.format); + end = moment(val, this.locale.format); + } + if (start !== null && end !== null) { + this.setStartDate(start); + this.setEndDate(end); + } + } + } + + if (typeof options.ranges === 'object') { + for (range in options.ranges) { + + if (typeof options.ranges[range][0] === 'string') + start = moment(options.ranges[range][0], this.locale.format); + else + start = moment(options.ranges[range][0]); + + if (typeof options.ranges[range][1] === 'string') + end = moment(options.ranges[range][1], this.locale.format); + else + end = moment(options.ranges[range][1]); + + // If the start or end date exceed those allowed by the minDate or maxSpan + // options, shorten the range to the allowable period. + if (this.minDate && start.isBefore(this.minDate)) + start = this.minDate.clone(); + + var maxDate = this.maxDate; + if (this.maxSpan && maxDate && start.clone().add(this.maxSpan).isAfter(maxDate)) + maxDate = start.clone().add(this.maxSpan); + if (maxDate && end.isAfter(maxDate)) + end = maxDate.clone(); + + // If the end of the range is before the minimum or the start of the range is + // after the maximum, don't display this range option at all. + if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) + || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day'))) + continue; + + //Support unicode chars in the range names. + var elem = document.createElement('textarea'); + elem.innerHTML = range; + var rangeHtml = elem.value; + + this.ranges[rangeHtml] = [start, end]; + } + + var list = '
    '; + for (range in this.ranges) { + list += '
  • ' + range + '
  • '; + } + if (this.showCustomRangeLabel) { + list += '
  • ' + this.locale.customRangeLabel + '
  • '; + } + list += '
'; + this.container.find('.ranges').prepend(list); + } + + if (typeof cb === 'function') { + this.callback = cb; + } + + if (!this.timePicker) { + this.startDate = this.startDate.startOf('day'); + this.endDate = this.endDate.endOf('day'); + this.container.find('.calendar-time').hide(); + } + + //can't be used together for now + if (this.timePicker && this.autoApply) + this.autoApply = false; + + if (this.autoApply) { + this.container.addClass('auto-apply'); + } + + if (typeof options.ranges === 'object') + this.container.addClass('show-ranges'); + + if (this.singleDatePicker) { + this.container.addClass('single'); + this.container.find('.drp-calendar.left').addClass('single'); + this.container.find('.drp-calendar.left').show(); + this.container.find('.drp-calendar.right').hide(); + if (!this.timePicker && this.autoApply) { + this.container.addClass('auto-apply'); + } + } + + if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { + this.container.addClass('show-calendar'); + } + + this.container.addClass('opens' + this.opens); + + //apply CSS classes and labels to buttons + this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); + if (this.applyButtonClasses.length) + this.container.find('.applyBtn').addClass(this.applyButtonClasses); + if (this.cancelButtonClasses.length) + this.container.find('.cancelBtn').addClass(this.cancelButtonClasses); + this.container.find('.applyBtn').html(this.locale.applyLabel); + this.container.find('.cancelBtn').html(this.locale.cancelLabel); + + // + // event listeners + // + + this.container.find('.drp-calendar') + .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) + .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) + .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) + .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) + .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this)) + .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this)) + .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)); + + this.container.find('.ranges') + .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)); + + this.container.find('.drp-buttons') + .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) + .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)); + + if (this.element.is('input') || this.element.is('button')) { + this.element.on({ + 'click.daterangepicker': $.proxy(this.show, this), + 'focus.daterangepicker': $.proxy(this.show, this), + 'keyup.daterangepicker': $.proxy(this.elementChanged, this), + 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility + }); + } else { + this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); + this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this)); + } + + // + // if attached to a text input, set the initial value + // + + this.updateElement(); + + }; + + DateRangePicker.prototype = { + + constructor: DateRangePicker, + + setStartDate: function(startDate) { + if (typeof startDate === 'string') + this.startDate = moment(startDate, this.locale.format); + + if (typeof startDate === 'object') + this.startDate = moment(startDate); + + if (!this.timePicker) + this.startDate = this.startDate.startOf('day'); + + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + + if (this.minDate && this.startDate.isBefore(this.minDate)) { + this.startDate = this.minDate.clone(); + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + } + + if (this.maxDate && this.startDate.isAfter(this.maxDate)) { + this.startDate = this.maxDate.clone(); + if (this.timePicker && this.timePickerIncrement) + this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + } + + if (!this.isShowing) + this.updateElement(); + + this.updateMonthsInView(); + }, + + setEndDate: function(endDate) { + if (typeof endDate === 'string') + this.endDate = moment(endDate, this.locale.format); + + if (typeof endDate === 'object') + this.endDate = moment(endDate); + + if (!this.timePicker) + this.endDate = this.endDate.endOf('day'); + + if (this.timePicker && this.timePickerIncrement) + this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); + + if (this.endDate.isBefore(this.startDate)) + this.endDate = this.startDate.clone(); + + if (this.maxDate && this.endDate.isAfter(this.maxDate)) + this.endDate = this.maxDate.clone(); + + if (this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)) + this.endDate = this.startDate.clone().add(this.maxSpan); + + this.previousRightTime = this.endDate.clone(); + + this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); + + if (!this.isShowing) + this.updateElement(); + + this.updateMonthsInView(); + }, + + isInvalidDate: function() { + return false; + }, + + isCustomDate: function() { + return false; + }, + + updateView: function() { + if (this.timePicker) { + this.renderTimePicker('left'); + this.renderTimePicker('right'); + if (!this.endDate) { + this.container.find('.right .calendar-time select').prop('disabled', true).addClass('disabled'); + } else { + this.container.find('.right .calendar-time select').prop('disabled', false).removeClass('disabled'); + } + } + if (this.endDate) + this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); + this.updateMonthsInView(); + this.updateCalendars(); + this.updateFormInputs(); + }, + + updateMonthsInView: function() { + if (this.endDate) { + + //if both dates are visible already, do nothing + if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && + (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) + && + (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) + ) { + return; + } + + this.leftCalendar.month = this.startDate.clone().date(2); + if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) { + this.rightCalendar.month = this.endDate.clone().date(2); + } else { + this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); + } + + } else { + if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) { + this.leftCalendar.month = this.startDate.clone().date(2); + this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); + } + } + if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) { + this.rightCalendar.month = this.maxDate.clone().date(2); + this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month'); + } + }, + + updateCalendars: function() { + + if (this.timePicker) { + var hour, minute, second; + if (this.endDate) { + hour = parseInt(this.container.find('.left .hourselect').val(), 10); + minute = parseInt(this.container.find('.left .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); + } + second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; + if (!this.timePicker24Hour) { + var ampm = this.container.find('.left .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + } else { + hour = parseInt(this.container.find('.right .hourselect').val(), 10); + minute = parseInt(this.container.find('.right .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); + } + second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; + if (!this.timePicker24Hour) { + var ampm = this.container.find('.right .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + } + this.leftCalendar.month.hour(hour).minute(minute).second(second); + this.rightCalendar.month.hour(hour).minute(minute).second(second); + } + + this.renderCalendar('left'); + this.renderCalendar('right'); + + //highlight any predefined range matching the current start and end dates + this.container.find('.ranges li').removeClass('active'); + if (this.endDate == null) return; + + this.calculateChosenLabel(); + }, + + renderCalendar: function(side) { + + // + // Build the matrix of dates that will populate the calendar + // + + var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar; + var month = calendar.month.month(); + var year = calendar.month.year(); + var hour = calendar.month.hour(); + var minute = calendar.month.minute(); + var second = calendar.month.second(); + var daysInMonth = moment([year, month]).daysInMonth(); + var firstDay = moment([year, month, 1]); + var lastDay = moment([year, month, daysInMonth]); + var lastMonth = moment(firstDay).subtract(1, 'month').month(); + var lastYear = moment(firstDay).subtract(1, 'month').year(); + var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); + var dayOfWeek = firstDay.day(); + + //initialize a 6 rows x 7 columns array for the calendar + var calendar = []; + calendar.firstDay = firstDay; + calendar.lastDay = lastDay; + + for (var i = 0; i < 6; i++) { + calendar[i] = []; + } + + //populate the calendar with date objects + var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; + if (startDay > daysInLastMonth) + startDay -= 7; + + if (dayOfWeek == this.locale.firstDay) + startDay = daysInLastMonth - 6; + + var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]); + + var col, row; + for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) { + if (i > 0 && col % 7 === 0) { + col = 0; + row++; + } + calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second); + curDate.hour(12); + + if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') { + calendar[row][col] = this.minDate.clone(); + } + + if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') { + calendar[row][col] = this.maxDate.clone(); + } + + } + + //make the calendar object available to hoverDate/clickDate + if (side == 'left') { + this.leftCalendar.calendar = calendar; + } else { + this.rightCalendar.calendar = calendar; + } + + // + // Display the calendar + // + + var minDate = side == 'left' ? this.minDate : this.startDate; + var maxDate = this.maxDate; + var selected = side == 'left' ? this.startDate : this.endDate; + var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'}; + + var html = ''; + html += ''; + html += ''; + + // add empty cell for week number + if (this.showWeekNumbers || this.showISOWeekNumbers) + html += ''; + + if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) { + html += ''; + } else { + html += ''; + } + + var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); + + if (this.showDropdowns) { + var currentMonth = calendar[1][1].month(); + var currentYear = calendar[1][1].year(); + var maxYear = (maxDate && maxDate.year()) || (this.maxYear); + var minYear = (minDate && minDate.year()) || (this.minYear); + var inMinYear = currentYear == minYear; + var inMaxYear = currentYear == maxYear; + + var monthHtml = '"; + + var yearHtml = ''; + + dateHtml = monthHtml + yearHtml; + } + + html += ''; + if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) { + html += ''; + } else { + html += ''; + } + + html += ''; + html += ''; + + // add week number label + if (this.showWeekNumbers || this.showISOWeekNumbers) + html += ''; + + $.each(this.locale.daysOfWeek, function(index, dayOfWeek) { + html += ''; + }); + + html += ''; + html += ''; + html += ''; + + //adjust maxDate to reflect the maxSpan setting in order to + //grey out end dates beyond the maxSpan + if (this.endDate == null && this.maxSpan) { + var maxLimit = this.startDate.clone().add(this.maxSpan).endOf('day'); + if (!maxDate || maxLimit.isBefore(maxDate)) { + maxDate = maxLimit; + } + } + + for (var row = 0; row < 6; row++) { + html += ''; + + // add week number + if (this.showWeekNumbers) + html += ''; + else if (this.showISOWeekNumbers) + html += ''; + + for (var col = 0; col < 7; col++) { + + var classes = []; + + //highlight today's date + if (calendar[row][col].isSame(new Date(), "day")) + classes.push('today'); + + //highlight weekends + if (calendar[row][col].isoWeekday() > 5) + classes.push('weekend'); + + //grey out the dates in other months displayed at beginning and end of this calendar + if (calendar[row][col].month() != calendar[1][1].month()) + classes.push('off', 'ends'); + + //don't allow selection of dates before the minimum date + if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day')) + classes.push('off', 'disabled'); + + //don't allow selection of dates after the maximum date + if (maxDate && calendar[row][col].isAfter(maxDate, 'day')) + classes.push('off', 'disabled'); + + //don't allow selection of date if a custom function decides it's invalid + if (this.isInvalidDate(calendar[row][col])) + classes.push('off', 'disabled'); + + //highlight the currently selected start date + if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) + classes.push('active', 'start-date'); + + //highlight the currently selected end date + if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) + classes.push('active', 'end-date'); + + //highlight dates in-between the selected dates + if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate) + classes.push('in-range'); + + //apply custom classes for this date + var isCustom = this.isCustomDate(calendar[row][col]); + if (isCustom !== false) { + if (typeof isCustom === 'string') + classes.push(isCustom); + else + Array.prototype.push.apply(classes, isCustom); + } + + var cname = '', disabled = false; + for (var i = 0; i < classes.length; i++) { + cname += classes[i] + ' '; + if (classes[i] == 'disabled') + disabled = true; + } + if (!disabled) + cname += 'available'; + + html += ''; + + } + html += ''; + } + + html += ''; + html += '
' + dateHtml + '
' + this.locale.weekLabel + '' + dayOfWeek + '
' + calendar[row][0].week() + '' + calendar[row][0].isoWeek() + '' + calendar[row][col].date() + '
'; + + this.container.find('.drp-calendar.' + side + ' .calendar-table').html(html); + + }, + + renderTimePicker: function(side) { + + // Don't bother updating the time picker if it's currently disabled + // because an end date hasn't been clicked yet + if (side == 'right' && !this.endDate) return; + + var html, selected, minDate, maxDate = this.maxDate; + + if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))) + maxDate = this.startDate.clone().add(this.maxSpan); + + if (side == 'left') { + selected = this.startDate.clone(); + minDate = this.minDate; + } else if (side == 'right') { + selected = this.endDate.clone(); + minDate = this.startDate; + + //Preserve the time already selected + var timeSelector = this.container.find('.drp-calendar.right .calendar-time'); + if (timeSelector.html() != '') { + + selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val()); + selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val()); + selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val()); + + if (!this.timePicker24Hour) { + var ampm = timeSelector.find('.ampmselect option:selected').val(); + if (ampm === 'PM' && selected.hour() < 12) + selected.hour(selected.hour() + 12); + if (ampm === 'AM' && selected.hour() === 12) + selected.hour(0); + } + + } + + if (selected.isBefore(this.startDate)) + selected = this.startDate.clone(); + + if (maxDate && selected.isAfter(maxDate)) + selected = maxDate.clone(); + + } + + // + // hours + // + + html = ' '; + + // + // minutes + // + + html += ': '; + + // + // seconds + // + + if (this.timePickerSeconds) { + html += ': '; + } + + // + // AM/PM + // + + if (!this.timePicker24Hour) { + html += ''; + } + + this.container.find('.drp-calendar.' + side + ' .calendar-time').html(html); + + }, + + updateFormInputs: function() { + + if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) { + this.container.find('button.applyBtn').prop('disabled', false); + } else { + this.container.find('button.applyBtn').prop('disabled', true); + } + + }, + + move: function() { + var parentOffset = { top: 0, left: 0 }, + containerTop, + drops = this.drops; + + var parentRightEdge = $(window).width(); + if (!this.parentEl.is('body')) { + parentOffset = { + top: this.parentEl.offset().top - this.parentEl.scrollTop(), + left: this.parentEl.offset().left - this.parentEl.scrollLeft() + }; + parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; + } + + switch (drops) { + case 'auto': + containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; + if (containerTop + this.container.outerHeight() >= this.parentEl[0].scrollHeight) { + containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; + drops = 'up'; + } + break; + case 'up': + containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; + break; + default: + containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; + break; + } + + // Force the container to it's actual width + this.container.css({ + top: 0, + left: 0, + right: 'auto' + }); + var containerWidth = this.container.outerWidth(); + + this.container.toggleClass('drop-up', drops == 'up'); + + if (this.opens == 'left') { + var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth(); + if (containerWidth + containerRight > $(window).width()) { + this.container.css({ + top: containerTop, + right: 'auto', + left: 9 + }); + } else { + this.container.css({ + top: containerTop, + right: containerRight, + left: 'auto' + }); + } + } else if (this.opens == 'center') { + var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2 + - containerWidth / 2; + if (containerLeft < 0) { + this.container.css({ + top: containerTop, + right: 'auto', + left: 9 + }); + } else if (containerLeft + containerWidth > $(window).width()) { + this.container.css({ + top: containerTop, + left: 'auto', + right: 0 + }); + } else { + this.container.css({ + top: containerTop, + left: containerLeft, + right: 'auto' + }); + } + } else { + var containerLeft = this.element.offset().left - parentOffset.left; + if (containerLeft + containerWidth > $(window).width()) { + this.container.css({ + top: containerTop, + left: 'auto', + right: 0 + }); + } else { + this.container.css({ + top: containerTop, + left: containerLeft, + right: 'auto' + }); + } + } + }, + + show: function(e) { + if (this.isShowing) return; + + // Create a click proxy that is private to this instance of datepicker, for unbinding + this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this); + + // Bind global datepicker mousedown for hiding and + $(document) + .on('mousedown.daterangepicker', this._outsideClickProxy) + // also support mobile devices + .on('touchend.daterangepicker', this._outsideClickProxy) + // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them + .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) + // and also close when focus changes to outside the picker (eg. tabbing between controls) + .on('focusin.daterangepicker', this._outsideClickProxy); + + // Reposition the picker if the window is resized while it's open + $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this)); + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + this.previousRightTime = this.endDate.clone(); + + this.updateView(); + this.container.show(); + this.move(); + this.element.trigger('show.daterangepicker', this); + this.isShowing = true; + }, + + hide: function(e) { + if (!this.isShowing) return; + + //incomplete date selection, revert to last values + if (!this.endDate) { + this.startDate = this.oldStartDate.clone(); + this.endDate = this.oldEndDate.clone(); + } + + //if a new date range was selected, invoke the user callback function + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel); + + //if picker is attached to a text input, update it + this.updateElement(); + + $(document).off('.daterangepicker'); + $(window).off('.daterangepicker'); + this.container.hide(); + this.element.trigger('hide.daterangepicker', this); + this.isShowing = false; + }, + + toggle: function(e) { + if (this.isShowing) { + this.hide(); + } else { + this.show(); + } + }, + + outsideClick: function(e) { + var target = $(e.target); + // if the page is clicked anywhere except within the daterangerpicker/button + // itself then call this.hide() + if ( + // ie modal dialog fix + e.type == "focusin" || + target.closest(this.element).length || + target.closest(this.container).length || + target.closest('.calendar-table').length + ) return; + this.hide(); + this.element.trigger('outsideClick.daterangepicker', this); + }, + + showCalendars: function() { + this.container.addClass('show-calendar'); + this.move(); + this.element.trigger('showCalendar.daterangepicker', this); + }, + + hideCalendars: function() { + this.container.removeClass('show-calendar'); + this.element.trigger('hideCalendar.daterangepicker', this); + }, + + clickRange: function(e) { + var label = e.target.getAttribute('data-range-key'); + this.chosenLabel = label; + if (label == this.locale.customRangeLabel) { + this.showCalendars(); + } else { + var dates = this.ranges[label]; + this.startDate = dates[0]; + this.endDate = dates[1]; + + if (!this.timePicker) { + this.startDate.startOf('day'); + this.endDate.endOf('day'); + } + + if (!this.alwaysShowCalendars) + this.hideCalendars(); + this.clickApply(); + } + }, + + clickPrev: function(e) { + var cal = $(e.target).parents('.drp-calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.subtract(1, 'month'); + if (this.linkedCalendars) + this.rightCalendar.month.subtract(1, 'month'); + } else { + this.rightCalendar.month.subtract(1, 'month'); + } + this.updateCalendars(); + }, + + clickNext: function(e) { + var cal = $(e.target).parents('.drp-calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.add(1, 'month'); + } else { + this.rightCalendar.month.add(1, 'month'); + if (this.linkedCalendars) + this.leftCalendar.month.add(1, 'month'); + } + this.updateCalendars(); + }, + + hoverDate: function(e) { + + //ignore dates that can't be selected + if (!$(e.target).hasClass('available')) return; + + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.drp-calendar'); + var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; + + //highlight the dates between the start date and the date being hovered as a potential end date + var leftCalendar = this.leftCalendar; + var rightCalendar = this.rightCalendar; + var startDate = this.startDate; + if (!this.endDate) { + this.container.find('.drp-calendar tbody td').each(function(index, el) { + + //skip week numbers, only look at dates + if ($(el).hasClass('week')) return; + + var title = $(el).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(el).parents('.drp-calendar'); + var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col]; + + if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) { + $(el).addClass('in-range'); + } else { + $(el).removeClass('in-range'); + } + + }); + } + + }, + + clickDate: function(e) { + + if (!$(e.target).hasClass('available')) return; + + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.drp-calendar'); + var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; + + // + // this function needs to do a few things: + // * alternate between selecting a start and end date for the range, + // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date + // * if autoapply is enabled, and an end date was chosen, apply the selection + // * if single date picker mode, and time picker isn't enabled, apply the selection immediately + // * if one of the inputs above the calendars was focused, cancel that manual input + // + + if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start + if (this.timePicker) { + var hour = parseInt(this.container.find('.left .hourselect').val(), 10); + if (!this.timePicker24Hour) { + var ampm = this.container.find('.left .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + var minute = parseInt(this.container.find('.left .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; + date = date.clone().hour(hour).minute(minute).second(second); + } + this.endDate = null; + this.setStartDate(date.clone()); + } else if (!this.endDate && date.isBefore(this.startDate)) { + //special case: clicking the same date for start/end, + //but the time of the end date is before the start date + this.setEndDate(this.startDate.clone()); + } else { // picking end + if (this.timePicker) { + var hour = parseInt(this.container.find('.right .hourselect').val(), 10); + if (!this.timePicker24Hour) { + var ampm = this.container.find('.right .ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + var minute = parseInt(this.container.find('.right .minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; + date = date.clone().hour(hour).minute(minute).second(second); + } + this.setEndDate(date.clone()); + if (this.autoApply) { + this.calculateChosenLabel(); + this.clickApply(); + } + } + + if (this.singleDatePicker) { + this.setEndDate(this.startDate); + if (!this.timePicker && this.autoApply) + this.clickApply(); + } + + this.updateView(); + + //This is to cancel the blur event handler if the mouse was in one of the inputs + e.stopPropagation(); + + }, + + calculateChosenLabel: function () { + var customRange = true; + var i = 0; + for (var range in this.ranges) { + if (this.timePicker) { + var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm"; + //ignore times when comparing dates if time picker seconds is not enabled + if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); + break; + } + } else { + //ignore times when comparing dates if time picker is not enabled + if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); + break; + } + } + i++; + } + if (customRange) { + if (this.showCustomRangeLabel) { + this.chosenLabel = this.container.find('.ranges li:last').addClass('active').attr('data-range-key'); + } else { + this.chosenLabel = null; + } + this.showCalendars(); + } + }, + + clickApply: function(e) { + this.hide(); + this.element.trigger('apply.daterangepicker', this); + }, + + clickCancel: function(e) { + this.startDate = this.oldStartDate; + this.endDate = this.oldEndDate; + this.hide(); + this.element.trigger('cancel.daterangepicker', this); + }, + + monthOrYearChanged: function(e) { + var isLeft = $(e.target).closest('.drp-calendar').hasClass('left'), + leftOrRight = isLeft ? 'left' : 'right', + cal = this.container.find('.drp-calendar.'+leftOrRight); + + // Month must be Number for new moment versions + var month = parseInt(cal.find('.monthselect').val(), 10); + var year = cal.find('.yearselect').val(); + + if (!isLeft) { + if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) { + month = this.startDate.month(); + year = this.startDate.year(); + } + } + + if (this.minDate) { + if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) { + month = this.minDate.month(); + year = this.minDate.year(); + } + } + + if (this.maxDate) { + if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) { + month = this.maxDate.month(); + year = this.maxDate.year(); + } + } + + if (isLeft) { + this.leftCalendar.month.month(month).year(year); + if (this.linkedCalendars) + this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month'); + } else { + this.rightCalendar.month.month(month).year(year); + if (this.linkedCalendars) + this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month'); + } + this.updateCalendars(); + }, + + timeChanged: function(e) { + + var cal = $(e.target).closest('.drp-calendar'), + isLeft = cal.hasClass('left'); + + var hour = parseInt(cal.find('.hourselect').val(), 10); + var minute = parseInt(cal.find('.minuteselect').val(), 10); + if (isNaN(minute)) { + minute = parseInt(cal.find('.minuteselect option:last').val(), 10); + } + var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0; + + if (!this.timePicker24Hour) { + var ampm = cal.find('.ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + + if (isLeft) { + var start = this.startDate.clone(); + start.hour(hour); + start.minute(minute); + start.second(second); + this.setStartDate(start); + if (this.singleDatePicker) { + this.endDate = this.startDate.clone(); + } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) { + this.setEndDate(start.clone()); + } + } else if (this.endDate) { + var end = this.endDate.clone(); + end.hour(hour); + end.minute(minute); + end.second(second); + this.setEndDate(end); + } + + //update the calendars so all clickable dates reflect the new time component + this.updateCalendars(); + + //update the form inputs above the calendars with the new time + this.updateFormInputs(); + + //re-render the time pickers because changing one selection can affect what's enabled in another + this.renderTimePicker('left'); + this.renderTimePicker('right'); + + }, + + elementChanged: function() { + if (!this.element.is('input')) return; + if (!this.element.val().length) return; + + var dateString = this.element.val().split(this.locale.separator), + start = null, + end = null; + + if (dateString.length === 2) { + start = moment(dateString[0], this.locale.format); + end = moment(dateString[1], this.locale.format); + } + + if (this.singleDatePicker || start === null || end === null) { + start = moment(this.element.val(), this.locale.format); + end = start; + } + + if (!start.isValid() || !end.isValid()) return; + + this.setStartDate(start); + this.setEndDate(end); + this.updateView(); + }, + + keydown: function(e) { + //hide on tab or enter + if ((e.keyCode === 9) || (e.keyCode === 13)) { + this.hide(); + } + + //hide on esc and prevent propagation + if (e.keyCode === 27) { + e.preventDefault(); + e.stopPropagation(); + + this.hide(); + } + }, + + updateElement: function() { + if (this.element.is('input') && this.autoUpdateInput) { + var newValue = this.startDate.format(this.locale.format); + if (!this.singleDatePicker) { + newValue += this.locale.separator + this.endDate.format(this.locale.format); + } + if (newValue !== this.element.val()) { + this.element.val(newValue).trigger('change'); + } + } + }, + + remove: function() { + this.container.remove(); + this.element.off('.daterangepicker'); + this.element.removeData(); + } + + }; + + $.fn.daterangepicker = function(options, callback) { + var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options); + this.each(function() { + var el = $(this); + if (el.data('daterangepicker')) + el.data('daterangepicker').remove(); + el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback)); + }); + return this; + }; + + return DateRangePicker; + +})); diff --git a/ckanext/bulk/assets/vendor/htmx.js b/ckanext/bulk/assets/vendor/htmx.js new file mode 100644 index 0000000..de5f0f1 --- /dev/null +++ b/ckanext/bulk/assets/vendor/htmx.js @@ -0,0 +1 @@ +(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(e,t){var r=dr(e,t||"post");return r.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get"],selfRequestsOnly:false,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=Q.config.wsBinaryType;return t},version:"1.9.12"};var r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R};var w=["get","post","put","delete","patch"];var i=w.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");var S=e("head"),q=e("title"),H=e("svg",true);function e(e,t){return new RegExp("<"+e+"(\\s[^>]*>|>)([\\s\\S]*?)<\\/"+e+">",!!t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){return e.parentElement}function re(){return document}function c(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function L(e,t,r){var n=te(t,r);var i=te(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function ne(t,r){var n=null;c(t,function(e){return n=L(t,e,r)});if(n!=="unset"){return n}}function h(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function A(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function s(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=re().createDocumentFragment()}return i}function N(e){return/",0);var a=i.querySelector("template").content;if(Q.config.allowScriptTags){oe(a.querySelectorAll("script"),function(e){if(Q.config.inlineScriptNonce){e.nonce=Q.config.inlineScriptNonce}e.htmxExecuted=navigator.userAgent.indexOf("Firefox")===-1})}else{oe(a.querySelectorAll("script"),function(e){_(e)})}return a}switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s(""+n+"
",1);case"col":return s(""+n+"
",2);case"tr":return s(""+n+"
",2);case"td":case"th":return s(""+n+"
",3);case"script":case"style":return s("
"+n+"
",1);default:return s(n,0)}}function ie(e){if(e){e()}}function I(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return I(e,"Function")}function P(e){return I(e,"Object")}function ae(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function M(e){var t=[];if(e){for(var r=0;r=0}function se(e){if(e.getRootNode&&e.getRootNode()instanceof window.ShadowRoot){return re().body.contains(e.getRootNode().host)}else{return re().body.contains(e)}}function D(e){return e.trim().split(/\s+/)}function le(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function E(e){try{return JSON.parse(e)}catch(e){b(e);return null}}function U(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function B(t){try{var e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(t){var e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function V(){Q.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function j(){Q.logger=null}function C(e,t){if(t){return e.querySelector(t)}else{return C(re(),e)}}function f(e,t){if(t){return e.querySelectorAll(t)}else{return f(re(),e)}}function _(e,t){e=p(e);if(t){setTimeout(function(){_(e);e=null},t)}else{e.parentElement.removeChild(e)}}function z(e,t,r){e=p(e);if(r){setTimeout(function(){z(e,t);e=null},r)}else{e.classList&&e.classList.add(t)}}function n(e,t,r){e=p(e);if(r){setTimeout(function(){n(e,t);e=null},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function $(e,t){e=p(e);e.classList.toggle(t)}function W(e,t){e=p(e);oe(e.parentElement.children,function(e){n(e,t)});z(e,t)}function v(e,t){e=p(e);if(e.closest){return e.closest(t)}else{do{if(e==null||h(e,t)){return e}}while(e=e&&u(e));return null}}function g(e,t){return e.substring(0,t.length)===t}function G(e,t){return e.substring(e.length-t.length)===t}function J(e){var t=e.trim();if(g(t,"<")&&G(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function Z(e,t){if(t.indexOf("closest ")===0){return[v(e,J(t.substr(8)))]}else if(t.indexOf("find ")===0){return[C(e,J(t.substr(5)))]}else if(t==="next"){return[e.nextElementSibling]}else if(t.indexOf("next ")===0){return[K(e,J(t.substr(5)))]}else if(t==="previous"){return[e.previousElementSibling]}else if(t.indexOf("previous ")===0){return[Y(e,J(t.substr(9)))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else{return re().querySelectorAll(J(t))}}var K=function(e,t){var r=re().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ue(e,t){if(t){return Z(e,t)[0]}else{return Z(re().body,e)[0]}}function p(e){if(I(e,"String")){return C(e)}else{return e}}function ve(e,t,r){if(k(t)){return{target:re().body,event:e,listener:t}}else{return{target:p(e),event:t,listener:r}}}function de(t,r,n){jr(function(){var e=ve(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=k(r);return e?r:n}function ge(t,r,n){jr(function(){var e=ve(t,r,n);e.target.removeEventListener(e.event,e.listener)});return k(r)?r:n}var pe=re().createElement("output");function me(e,t){var r=ne(e,t);if(r){if(r==="this"){return[xe(e,t)]}else{var n=Z(e,r);if(n.length===0){b('The selector "'+r+'" on '+t+" returned no matches!");return[pe]}else{return n}}}}function xe(e,t){return c(e,function(e){return te(e,t)!=null})}function ye(e){var t=ne(e,"hx-target");if(t){if(t==="this"){return xe(e,"hx-target")}else{return ue(e,t)}}else{var r=ae(e);if(r.boosted){return re().body}else{return e}}}function be(e){var t=Q.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=re().querySelectorAll(t);if(r){oe(r,function(e){var t;var r=i.cloneNode(true);t=re().createDocumentFragment();t.appendChild(r);if(!Se(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ce(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Fe(o,e,e,t,a)}oe(a.elts,function(e){ce(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);fe(re().body,"htmx:oobErrorNoTarget",{content:i})}return e}function Ce(e,t,r){var n=ne(e,"hx-select-oob");if(n){var i=n.split(",");for(var a=0;a0){var r=t.replace("'","\\'");var n=e.tagName.replace(":","\\:");var i=o.querySelector(n+"[id='"+r+"']");if(i&&i!==o){var a=e.cloneNode();we(e,i);s.tasks.push(function(){we(e,a)})}}})}function Oe(e){return function(){n(e,Q.config.addedClass);zt(e);Nt(e);qe(e);ce(e,"htmx:load")}}function qe(e){var t="[autofocus]";var r=h(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function a(e,t,r,n){Te(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;z(i,Q.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Oe(i))}}}function He(e,t){var r=0;while(r-1){var t=e.replace(H,"");var r=t.match(q);if(r){return r[2]}}}function je(e,t,r,n,i,a){i.title=Ve(n);var o=l(n);if(o){Ce(r,o,i);o=Be(r,o,a);Re(o);return Fe(e,r,t,o,i)}}function _e(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=E(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!P(o)){o={value:o}}ce(r,a,o)}}}else{var s=n.split(",");for(var l=0;l0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Tr(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){fe(re().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Qe(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function y(e,t){var r="";while(e.length>0&&!t.test(e[0])){r+=e.shift()}return r}function tt(e){var t;if(e.length>0&&Ze.test(e[0])){e.shift();t=y(e,Ke).trim();e.shift()}else{t=y(e,x)}return t}var rt="input, textarea, select";function nt(e,t,r){var n=[];var i=Ye(t);do{y(i,Je);var a=i.length;var o=y(i,/[,\[\s]/);if(o!==""){if(o==="every"){var s={trigger:"every"};y(i,Je);s.pollInterval=d(y(i,/[,\[\s]/));y(i,Je);var l=et(e,i,"event");if(l){s.eventFilter=l}n.push(s)}else if(o.indexOf("sse:")===0){n.push({trigger:"sse",sseEvent:o.substr(4)})}else{var u={trigger:o};var l=et(e,i,"event");if(l){u.eventFilter=l}while(i.length>0&&i[0]!==","){y(i,Je);var f=i.shift();if(f==="changed"){u.changed=true}else if(f==="once"){u.once=true}else if(f==="consume"){u.consume=true}else if(f==="delay"&&i[0]===":"){i.shift();u.delay=d(y(i,x))}else if(f==="from"&&i[0]===":"){i.shift();if(Ze.test(i[0])){var c=tt(i)}else{var c=y(i,x);if(c==="closest"||c==="find"||c==="next"||c==="previous"){i.shift();var h=tt(i);if(h.length>0){c+=" "+h}}}u.from=c}else if(f==="target"&&i[0]===":"){i.shift();u.target=tt(i)}else if(f==="throttle"&&i[0]===":"){i.shift();u.throttle=d(y(i,x))}else if(f==="queue"&&i[0]===":"){i.shift();u.queue=y(i,x)}else if(f==="root"&&i[0]===":"){i.shift();u[f]=tt(i)}else if(f==="threshold"&&i[0]===":"){i.shift();u[f]=y(i,x)}else{fe(e,"htmx:syntax:error",{token:i.shift()})}}n.push(u)}}if(i.length===a){fe(e,"htmx:syntax:error",{token:i.shift()})}y(i,Je)}while(i[0]===","&&i.shift());if(r){r[t]=n}return n}function it(e){var t=te(e,"hx-trigger");var r=[];if(t){var n=Q.config.triggerSpecsCache;r=n&&n[t]||nt(e,t,n)}if(r.length>0){return r}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,rt)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function at(e){ae(e).cancelled=true}function ot(e,t,r){var n=ae(e);n.timeout=setTimeout(function(){if(se(e)&&n.cancelled!==true){if(!ct(r,e,Wt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}ot(e,t,r)}},r.pollInterval)}function st(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function lt(t,r,e){if(t.tagName==="A"&&st(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=ee(t,"href")}else{var a=ee(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=ee(t,"action")}e.forEach(function(e){ht(t,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(n,i,e,t)},r,e,true)})}}function ut(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(h(t,'input[type="submit"], button')&&v(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function ft(e,t){return ae(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function ct(e,t,r){var n=e.eventFilter;if(n){try{return n.call(t,r)!==true}catch(e){fe(re().body,"htmx:eventFilter:error",{error:e,source:n.source});return true}}return false}function ht(a,o,e,s,l){var u=ae(a);var t;if(s.from){t=Z(a,s.from)}else{t=[a]}if(s.changed){t.forEach(function(e){var t=ae(e);t.lastValue=e.value})}oe(t,function(n){var i=function(e){if(!se(a)){n.removeEventListener(s.trigger,i);return}if(ft(a,e)){return}if(l||ut(e,a)){e.preventDefault()}if(ct(s,a,e)){return}var t=ae(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!h(e.target,s.target)){return}}if(s.once){if(u.triggeredOnce){return}else{u.triggeredOnce=true}}if(s.changed){var r=ae(n);if(r.lastValue===n.value){return}r.lastValue=n.value}if(u.delayed){clearTimeout(u.delayed)}if(u.throttle){return}if(s.throttle>0){if(!u.throttle){o(a,e);u.throttle=setTimeout(function(){u.throttle=null},s.throttle)}}else if(s.delay>0){u.delayed=setTimeout(function(){o(a,e)},s.delay)}else{ce(a,"htmx:trigger");o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var vt=false;var dt=null;function gt(){if(!dt){dt=function(){vt=true};window.addEventListener("scroll",dt);setInterval(function(){if(vt){vt=false;oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){pt(e)})}},200)}}function pt(t){if(!o(t,"data-hx-revealed")&&X(t)){t.setAttribute("data-hx-revealed","true");var e=ae(t);if(e.initHash){ce(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){ce(t,"revealed")},{once:true})}}}function mt(e,t,r){var n=D(r);for(var i=0;i=0){var t=wt(n);setTimeout(function(){xt(s,r,n+1)},t)}};t.onopen=function(e){n=0};ae(s).webSocket=t;t.addEventListener("message",function(e){if(yt(s)){return}var t=e.data;R(s,function(e){t=e.transformResponse(t,null,s)});var r=T(s);var n=l(t);var i=M(n.children);for(var a=0;a0){ce(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(ut(e,u)){e.preventDefault()}})}else{fe(u,"htmx:noWebSocketSourceError")}}function wt(e){var t=Q.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(e,t,r){var n=D(r);for(var i=0;i0){setTimeout(i,n)}else{i()}}function Ht(t,i,e){var a=false;oe(w,function(r){if(o(t,"hx-"+r)){var n=te(t,"hx-"+r);a=true;i.path=n;i.verb=r;e.forEach(function(e){Lt(t,e,i,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(r,n,e,t)})})}});return a}function Lt(n,e,t,r){if(e.sseEvent){Rt(n,r,e.sseEvent)}else if(e.trigger==="revealed"){gt();ht(n,r,t,e);pt(n)}else if(e.trigger==="intersect"){var i={};if(e.root){i.root=ue(n,e.root)}if(e.threshold){i.threshold=parseFloat(e.threshold)}var a=new IntersectionObserver(function(e){for(var t=0;t0){t.polling=true;ot(n,r,e)}else{ht(n,r,t,e)}}function At(e){if(!e.htmxExecuted&&Q.config.allowScriptTags&&(e.type==="text/javascript"||e.type==="module"||e.type==="")){var t=re().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}var r=e.parentElement;try{r.insertBefore(t,e)}catch(e){b(e)}finally{if(e.parentElement){e.parentElement.removeChild(e)}}}}function Nt(e){if(h(e,"script")){At(e)}oe(f(e,"script"),function(e){At(e)})}function It(e){var t=e.attributes;if(!t){return false}for(var r=0;r0){var o=n.shift();var s=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);if(a===0&&s){o.split(":");i=s[1].slice(0,-1);r[i]=s[2]}else{r[i]+=o}a+=Bt(o)}for(var l in r){Ft(e,l,r[l])}}}function jt(e){Ae(e);for(var t=0;tQ.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(re().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Yt(e){if(!U()){return null}e=B(e);var t=E(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",o);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=Zt();var r=T(t);var n=Ve(this.response);if(n){var i=C("title");if(i){i.innerHTML=n}else{window.document.title=n}}Ue(t,e,r);nr(r.tasks);Jt=a;ce(re().body,"htmx:historyRestore",{path:a,cacheMiss:true,serverResponse:this.response})}else{fe(re().body,"htmx:historyCacheMissLoadError",o)}};e.send()}function ar(e){er();e=e||location.pathname+location.search;var t=Yt(e);if(t){var r=l(t.content);var n=Zt();var i=T(n);Ue(n,r,i);nr(i.tasks);document.title=t.title;setTimeout(function(){window.scrollTo(0,t.scroll)},0);Jt=e;ce(re().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{ir(e)}}}function or(e){var t=me(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.classList["add"].call(e.classList,Q.config.requestClass)});return t}function sr(e){var t=me(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function lr(e,t){oe(e,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList["remove"].call(e.classList,Q.config.requestClass)}});oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function ur(e,t){for(var r=0;r=0}function wr(e,t){var r=t?t:ne(e,"hx-swap");var n={swapStyle:ae(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(e).boosted&&!br(e)){n["show"]="top"}if(r){var i=D(r);if(i.length>0){for(var a=0;a0?l.join(":"):null;n["scroll"]=u;n["scrollTarget"]=f}else if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var f=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=f}else if(o.indexOf("focus-scroll:")===0){var v=o.substr("focus-scroll:".length);n["focusScroll"]=v=="true"}else if(a==0){n["swapStyle"]=o}else{b("Unknown modifier in hx-swap: "+o)}}}}return n}function Sr(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function Er(t,r,n){var i=null;R(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(Sr(r)){return mr(n)}else{return pr(n)}}}function T(e){return{tasks:[],elts:[e]}}function Cr(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=ue(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=ue(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Rr(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=te(e,t);if(i){var a=i.trim();var o=r;if(a==="unset"){return null}if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Tr(e,function(){return Function("return ("+a+")")()},{})}else{s=E(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return Rr(u(e),t,r,n)}function Tr(e,t,r){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return r}}function Or(e,t){return Rr(e,"hx-vars",true,t)}function qr(e,t){return Rr(e,"hx-vals",false,t)}function Hr(e){return le(Or(e),qr(e))}function Lr(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function Ar(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function O(e,t){return t.test(e.getAllResponseHeaders())}function Nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||I(r,"String")){return he(e,t,null,null,{targetOverride:p(r),returnPromise:true})}else{return he(e,t,p(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:p(r.target),swapOverride:r.swap,select:r.select,returnPromise:true})}}else{return he(e,t,null,null,{returnPromise:true})}}function Ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function kr(e,t,r){var n;var i;if(typeof URL==="function"){i=new URL(t,document.location.href);var a=document.location.origin;n=a===i.origin}else{i=t;n=g(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!n){return false}}return ce(e,"htmx:validateUrl",le({url:i,sameHost:n},r))}function he(t,r,n,i,a,e){var o=null;var s=null;a=a!=null?a:{};if(a.returnPromise&&typeof Promise!=="undefined"){var l=new Promise(function(e,t){o=e;s=t})}if(n==null){n=re().body}var M=a.handler||Mr;var X=a.select||null;if(!se(n)){ie(o);return l}var u=a.targetOverride||ye(n);if(u==null||u==pe){fe(n,"htmx:targetError",{target:te(n,"hx-target")});ie(s);return l}var f=ae(n);var c=f.lastButtonClicked;if(c){var h=ee(c,"formaction");if(h!=null){r=h}var v=ee(c,"formmethod");if(v!=null){if(v.toLowerCase()!=="dialog"){t=v}}}var d=ne(n,"hx-confirm");if(e===undefined){var D=function(e){return he(t,r,n,i,a,!!e)};var U={target:u,elt:n,path:r,verb:t,triggeringEvent:i,etc:a,issueRequest:D,question:d};if(ce(n,"htmx:confirm",U)===false){ie(o);return l}}var g=n;var p=ne(n,"hx-sync");var m=null;var x=false;if(p){var B=p.split(":");var F=B[0].trim();if(F==="this"){g=xe(n,"hx-sync")}else{g=ue(n,F)}p=(B[1]||"drop").trim();f=ae(g);if(p==="drop"&&f.xhr&&f.abortable!==true){ie(o);return l}else if(p==="abort"){if(f.xhr){ie(o);return l}else{x=true}}else if(p==="replace"){ce(g,"htmx:abort")}else if(p.indexOf("queue")===0){var V=p.split(" ");m=(V[1]||"last").trim()}}if(f.xhr){if(f.abortable){ce(g,"htmx:abort")}else{if(m==null){if(i){var y=ae(i);if(y&&y.triggerSpec&&y.triggerSpec.queue){m=y.triggerSpec.queue}}if(m==null){m="last"}}if(f.queuedRequests==null){f.queuedRequests=[]}if(m==="first"&&f.queuedRequests.length===0){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="all"){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="last"){f.queuedRequests=[];f.queuedRequests.push(function(){he(t,r,n,i,a)})}ie(o);return l}}var b=new XMLHttpRequest;f.xhr=b;f.abortable=x;var w=function(){f.xhr=null;f.abortable=false;if(f.queuedRequests!=null&&f.queuedRequests.length>0){var e=f.queuedRequests.shift();e()}};var j=ne(n,"hx-prompt");if(j){var S=prompt(j);if(S===null||!ce(n,"htmx:prompt",{prompt:S,target:u})){ie(o);w();return l}}if(d&&!e){if(!confirm(d)){ie(o);w();return l}}var E=xr(n,u,S);if(t!=="get"&&!Sr(n)){E["Content-Type"]="application/x-www-form-urlencoded"}if(a.headers){E=le(E,a.headers)}var _=dr(n,t);var C=_.errors;var R=_.values;if(a.values){R=le(R,a.values)}var z=Hr(n);var $=le(R,z);var T=yr($,n);if(Q.config.getCacheBusterParam&&t==="get"){T["org.htmx.cache-buster"]=ee(u,"id")||"true"}if(r==null||r===""){r=re().location.href}var O=Rr(n,"hx-request");var W=ae(n).boosted;var q=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;var H={boosted:W,useUrlParams:q,parameters:T,unfilteredParameters:$,headers:E,target:u,verb:t,errors:C,withCredentials:a.credentials||O.credentials||Q.config.withCredentials,timeout:a.timeout||O.timeout||Q.config.timeout,path:r,triggeringEvent:i};if(!ce(n,"htmx:configRequest",H)){ie(o);w();return l}r=H.path;t=H.verb;E=H.headers;T=H.parameters;C=H.errors;q=H.useUrlParams;if(C&&C.length>0){ce(n,"htmx:validation:halted",H);ie(o);w();return l}var G=r.split("#");var J=G[0];var L=G[1];var A=r;if(q){A=J;var Z=Object.keys(T).length!==0;if(Z){if(A.indexOf("?")<0){A+="?"}else{A+="&"}A+=pr(T);if(L){A+="#"+L}}}if(!kr(n,A,H)){fe(n,"htmx:invalidPath",H);ie(s);return l}b.open(t.toUpperCase(),A,true);b.overrideMimeType("text/html");b.withCredentials=H.withCredentials;b.timeout=H.timeout;if(O.noHeaders){}else{for(var N in E){if(E.hasOwnProperty(N)){var K=E[N];Lr(b,N,K)}}}var I={xhr:b,target:u,requestConfig:H,etc:a,boosted:W,select:X,pathInfo:{requestPath:r,finalRequestPath:A,anchor:L}};b.onload=function(){try{var e=Ir(n);I.pathInfo.responsePath=Ar(b);M(n,I);lr(k,P);ce(n,"htmx:afterRequest",I);ce(n,"htmx:afterOnLoad",I);if(!se(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(se(r)){t=r}}if(t){ce(t,"htmx:afterRequest",I);ce(t,"htmx:afterOnLoad",I)}}ie(o);w()}catch(e){fe(n,"htmx:onLoadError",le({error:e},I));throw e}};b.onerror=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendError",I);ie(s);w()};b.onabort=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendAbort",I);ie(s);w()};b.ontimeout=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:timeout",I);ie(s);w()};if(!ce(n,"htmx:beforeRequest",I)){ie(o);w();return l}var k=or(n);var P=sr(n);oe(["loadstart","loadend","progress","abort"],function(t){oe([b,b.upload],function(e){e.addEventListener(t,function(e){ce(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ce(n,"htmx:beforeSend",I);var Y=q?null:Er(b,n,T);b.send(Y);return l}function Pr(e,t){var r=t.xhr;var n=null;var i=null;if(O(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(O(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(O(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=ne(e,"hx-push-url");var l=ne(e,"hx-replace-url");var u=ae(e).boosted;var f=null;var c=null;if(s){f="push";c=s}else if(l){f="replace";c=l}else if(u){f="push";c=o||a}if(c){if(c==="false"){return{}}if(c==="true"){c=o||a}if(t.pathInfo.anchor&&c.indexOf("#")===-1){c=c+"#"+t.pathInfo.anchor}return{type:f,path:c}}else{return{}}}function Mr(l,u){var f=u.xhr;var c=u.target;var e=u.etc;var t=u.requestConfig;var h=u.select;if(!ce(l,"htmx:beforeOnLoad",u))return;if(O(f,/HX-Trigger:/i)){_e(f,"HX-Trigger",l)}if(O(f,/HX-Location:/i)){er();var r=f.getResponseHeader("HX-Location");var v;if(r.indexOf("{")===0){v=E(r);r=v["path"];delete v["path"]}Nr("GET",r,v).then(function(){tr(r)});return}var n=O(f,/HX-Refresh:/i)&&"true"===f.getResponseHeader("HX-Refresh");if(O(f,/HX-Redirect:/i)){location.href=f.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(O(f,/HX-Retarget:/i)){if(f.getResponseHeader("HX-Retarget")==="this"){u.target=l}else{u.target=ue(l,f.getResponseHeader("HX-Retarget"))}}var d=Pr(l,u);var i=f.status>=200&&f.status<400&&f.status!==204;var g=f.response;var a=f.status>=400;var p=Q.config.ignoreTitle;var o=le({shouldSwap:i,serverResponse:g,isError:a,ignoreTitle:p},u);if(!ce(c,"htmx:beforeSwap",o))return;c=o.target;g=o.serverResponse;a=o.isError;p=o.ignoreTitle;u.target=c;u.failed=a;u.successful=!a;if(o.shouldSwap){if(f.status===286){at(l)}R(l,function(e){g=e.transformResponse(g,f,l)});if(d.type){er()}var s=e.swapOverride;if(O(f,/HX-Reswap:/i)){s=f.getResponseHeader("HX-Reswap")}var v=wr(l,s);if(v.hasOwnProperty("ignoreTitle")){p=v.ignoreTitle}c.classList.add(Q.config.swappingClass);var m=null;var x=null;var y=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var r;if(h){r=h}if(O(f,/HX-Reselect:/i)){r=f.getResponseHeader("HX-Reselect")}if(d.type){ce(re().body,"htmx:beforeHistoryUpdate",le({history:d},u));if(d.type==="push"){tr(d.path);ce(re().body,"htmx:pushedIntoHistory",{path:d.path})}else{rr(d.path);ce(re().body,"htmx:replacedInHistory",{path:d.path})}}var n=T(c);je(v.swapStyle,c,l,g,n,r);if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){var i=document.getElementById(ee(t.elt,"id"));var a={preventScroll:v.focusScroll!==undefined?!v.focusScroll:!Q.config.defaultFocusScroll};if(i){if(t.start&&i.setSelectionRange){try{i.setSelectionRange(t.start,t.end)}catch(e){}}i.focus(a)}}c.classList.remove(Q.config.swappingClass);oe(n.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}ce(e,"htmx:afterSwap",u)});if(O(f,/HX-Trigger-After-Swap:/i)){var o=l;if(!se(l)){o=re().body}_e(f,"HX-Trigger-After-Swap",o)}var s=function(){oe(n.tasks,function(e){e.call()});oe(n.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}ce(e,"htmx:afterSettle",u)});if(u.pathInfo.anchor){var e=re().getElementById(u.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title&&!p){var t=C("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Cr(n.elts,v);if(O(f,/HX-Trigger-After-Settle:/i)){var r=l;if(!se(l)){r=re().body}_e(f,"HX-Trigger-After-Settle",r)}ie(m)};if(v.settleDelay>0){setTimeout(s,v.settleDelay)}else{s()}}catch(e){fe(l,"htmx:swapError",u);ie(x);throw e}};var b=Q.config.globalViewTransitions;if(v.hasOwnProperty("transition")){b=v.transition}if(b&&ce(l,"htmx:beforeTransition",u)&&typeof Promise!=="undefined"&&document.startViewTransition){var w=new Promise(function(e,t){m=e;x=t});var S=y;y=function(){document.startViewTransition(function(){S();return w})}}if(v.swapDelay>0){setTimeout(y,v.swapDelay)}else{y()}}if(a){fe(l,"htmx:responseError",le({error:"Response Status Error Code "+f.status+" from "+u.pathInfo.requestPath},u))}}var Xr={};function Dr(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function Ur(e,t){if(t.init){t.init(r)}Xr[e]=le(Dr(),t)}function Br(e){delete Xr[e]}function Fr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=te(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=Xr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return Fr(u(e),r,n)}var Vr=false;re().addEventListener("DOMContentLoaded",function(){Vr=true});function jr(e){if(Vr||re().readyState==="complete"){e()}else{re().addEventListener("DOMContentLoaded",e)}}function _r(){if(Q.config.includeIndicatorStyles!==false){re().head.insertAdjacentHTML("beforeend","")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()}); \ No newline at end of file diff --git a/ckanext/bulk/assets/vendor/hyperscript.js b/ckanext/bulk/assets/vendor/hyperscript.js new file mode 100644 index 0000000..355c78a --- /dev/null +++ b/ckanext/bulk/assets/vendor/hyperscript.js @@ -0,0 +1 @@ +(function(e,t){const r=t(e);if(typeof exports==="object"&&typeof exports["nodeName"]!=="string"){module.exports=r}else{e["_hyperscript"]=r;if("document"in e)e["_hyperscript"].browserInit()}})(typeof self!=="undefined"?self:this,(e=>{"use strict";const t={dynamicResolvers:[function(e,t){if(e==="Fixed"){return Number(t).toFixed()}else if(e.indexOf("Fixed:")===0){let r=e.split(":")[1];return Number(t).toFixed(parseInt(r))}}],String:function(e){if(e.toString){return e.toString()}else{return""+e}},Int:function(e){return parseInt(e)},Float:function(e){return parseFloat(e)},Number:function(e){return Number(e)},Date:function(e){return new Date(e)},Array:function(e){return Array.from(e)},JSON:function(e){return JSON.stringify(e)},Object:function(e){if(e instanceof String){e=e.toString()}if(typeof e==="string"){return JSON.parse(e)}else{return Object.assign({},e)}}};const r={attributes:"_, script, data-script",defaultTransition:"all 500ms ease-in",disableSelector:"[disable-scripting], [data-disable-scripting]",hideShowStrategies:{},conversions:t};class n{static OP_TABLE={"+":"PLUS","-":"MINUS","*":"MULTIPLY","/":"DIVIDE",".":"PERIOD","..":"ELLIPSIS","\\":"BACKSLASH",":":"COLON","%":"PERCENT","|":"PIPE","!":"EXCLAMATION","?":"QUESTION","#":"POUND","&":"AMPERSAND",$:"DOLLAR",";":"SEMI",",":"COMMA","(":"L_PAREN",")":"R_PAREN","<":"L_ANG",">":"R_ANG","<=":"LTE_ANG",">=":"GTE_ANG","==":"EQ","===":"EQQ","!=":"NEQ","!==":"NEQQ","{":"L_BRACE","}":"R_BRACE","[":"L_BRACKET","]":"R_BRACKET","=":"EQUALS"};static isValidCSSClassChar(e){return n.isAlpha(e)||n.isNumeric(e)||e==="-"||e==="_"||e===":"}static isValidCSSIDChar(e){return n.isAlpha(e)||n.isNumeric(e)||e==="-"||e==="_"||e===":"}static isWhitespace(e){return e===" "||e==="\t"||n.isNewline(e)}static positionString(e){return"[Line: "+e.line+", Column: "+e.column+"]"}static isNewline(e){return e==="\r"||e==="\n"}static isNumeric(e){return e>="0"&&e<="9"}static isAlpha(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}static isIdentifierChar(e,t){return e==="_"||e==="$"}static isReservedChar(e){return e==="`"||e==="^"}static isValidSingleQuoteStringStart(e){if(e.length>0){var t=e[e.length-1];if(t.type==="IDENTIFIER"||t.type==="CLASS_REF"||t.type==="ID_REF"){return false}if(t.op&&(t.value===">"||t.value===")")){return false}}return true}static tokenize(e,t){var r=[];var a=e;var o=0;var s=0;var u=1;var l="";var c=0;function f(){return t&&c===0}while(o=0){return this.consumeToken()}}requireToken(e,t){var r=this.matchToken(e,t);if(r){return r}else{this.raiseError(this,"Expected '"+e+"' but found '"+this.currentToken().value+"'")}}peekToken(e,t,r){t=t||0;r=r||"IDENTIFIER";if(this.tokens[t]&&this.tokens[t].value===e&&this.tokens[t].type===r){return this.tokens[t]}}matchToken(e,t){if(this.follows.indexOf(e)!==-1){return}t=t||"IDENTIFIER";if(this.currentToken()&&this.currentToken().value===e&&this.currentToken().type===t){return this.consumeToken()}}consumeToken(){var e=this.tokens.shift();this.consumed.push(e);this._lastConsumed=e;this.consumeWhitespace();return e}consumeUntil(e,t){var r=[];var n=this.token(0,true);while((t==null||n.type!==t)&&(e==null||n.value!==e)&&n.type!=="EOF"){var i=this.tokens.shift();this.consumed.push(i);r.push(n);n=this.token(0,true)}this.consumeWhitespace();return r}lastWhitespace(){if(this.consumed[this.consumed.length-1]&&this.consumed[this.consumed.length-1].type==="WHITESPACE"){return this.consumed[this.consumed.length-1].value}else{return""}}consumeUntilWhitespace(){return this.consumeUntil(null,"WHITESPACE")}hasMore(){return this.tokens.length>0}token(e,t){var r;var n=0;do{if(!t){while(this.tokens[n]&&this.tokens[n].type==="WHITESPACE"){n++}}r=this.tokens[n];e--;n++}while(e>-1);if(r){return r}else{return{type:"EOF",value:"<<>>"}}}currentToken(){return this.token(0)}lastMatch(){return this._lastConsumed}static sourceFor=function(){return this.programSource.substring(this.startToken.start,this.endToken.end)};static lineFor=function(){return this.programSource.split("\n")[this.startToken.line-1]};follows=[];pushFollow(e){this.follows.push(e)}popFollow(){this.follows.pop()}clearFollows(){var e=this.follows;this.follows=[];return e}restoreFollows(e){this.follows=e}}class a{constructor(e){this.runtime=e;this.possessivesDisabled=false;this.addGrammarElement("feature",(function(e,t,r){if(r.matchOpToken("(")){var n=e.requireElement("feature",r);r.requireOpToken(")");return n}var i=e.FEATURES[r.currentToken().value||""];if(i){return i(e,t,r)}}));this.addGrammarElement("command",(function(e,t,r){if(r.matchOpToken("(")){const t=e.requireElement("command",r);r.requireOpToken(")");return t}var n=e.COMMANDS[r.currentToken().value||""];let i;if(n){i=n(e,t,r)}else if(r.currentToken().type==="IDENTIFIER"){i=e.parseElement("pseudoCommand",r)}if(i){return e.parseElement("indirectStatement",r,i)}return i}));this.addGrammarElement("commandList",(function(e,t,r){if(r.hasMore()){var n=e.parseElement("command",r);if(n){r.matchToken("then");const t=e.parseElement("commandList",r);if(t)n.next=t;return n}}return{type:"emptyCommandListCommand",op:function(e){return t.findNext(this,e)},execute:function(e){return t.unifiedExec(this,e)}}}));this.addGrammarElement("leaf",(function(e,t,r){var n=e.parseAnyOf(e.LEAF_EXPRESSIONS,r);if(n==null){return e.parseElement("symbol",r)}return n}));this.addGrammarElement("indirectExpression",(function(e,t,r,n){for(var i=0;i{this.unifiedExec(e,t)})).catch((e=>{this.unifiedExec({op:function(){throw e}},t)}));return}else if(r===o.HALT){if(t.meta.finallyHandler&&!t.meta.handlingFinally){t.meta.handlingFinally=true;e=t.meta.finallyHandler}else{if(t.meta.onHalt){t.meta.onHalt()}if(t.meta.currentException){if(t.meta.reject){t.meta.reject(t.meta.currentException);return}else{throw t.meta.currentException}}else{return}}}else{e=r}}}unifiedEval(e,t){var r=[t];var n=false;var i=false;if(e.args){for(var a=0;a{r=this.wrapArrays(r);Promise.all(r).then((function(r){if(i){this.unwrapAsyncs(r)}try{var a=e.op.apply(e,r);t(a)}catch(e){n(e)}})).catch((function(e){n(e)}))}))}else{if(i){this.unwrapAsyncs(r)}return e.op.apply(e,r)}}_scriptAttrs=null;getScriptAttributes(){if(this._scriptAttrs==null){this._scriptAttrs=r.attributes.replace(/ /g,"").split(",")}return this._scriptAttrs}getScript(e){for(var t=0;t{this.initElement(e,e instanceof HTMLScriptElement&&e.type==="text/hyperscript"?document.body:e)}))}}initElement(e,t){if(e.closest&&e.closest(r.disableSelector)){return}var n=this.getInternalData(e);if(!n.initialized){var i=this.getScript(e);if(i){try{n.initialized=true;n.script=i;const r=this.lexer,s=this.parser;var a=r.tokenize(i);var o=s.parseHyperScript(a);if(!o)return;o.apply(t||e,e);setTimeout((()=>{this.triggerEvent(t||e,"load",{hyperscript:true})}),1)}catch(t){this.triggerEvent(e,"exception",{error:t});console.error("hyperscript errors were found on the following element:",e,"\n\n",t.message,t.stack)}}}}internalDataMap=new WeakMap;getInternalData(e){var t=this.internalDataMap.get(e);if(typeof t==="undefined"){this.internalDataMap.set(e,t={})}return t}typeCheck(e,t,r){if(e==null&&r){return true}var n=Object.prototype.toString.call(e).slice(8,-1);return n===t}getElementScope(e){var t=e.meta&&e.meta.owner;if(t){var r=this.getInternalData(t);var n="elementScope";if(e.meta.feature&&e.meta.feature.behavior){n=e.meta.feature.behavior+"Scope"}var i=h(r,n);return i}else{return{}}}isReservedWord(e){return["meta","it","result","locals","event","target","detail","sender","body"].includes(e)}isHyperscriptContext(e){return e instanceof f}resolveSymbol(t,r,n){if(t==="me"||t==="my"||t==="I"){return r.me}if(t==="it"||t==="its"||t==="result"){return r.result}if(t==="you"||t==="your"||t==="yourself"){return r.you}else{if(n==="global"){return e[t]}else if(n==="element"){var i=this.getElementScope(r);return i[t]}else if(n==="local"){return r.locals[t]}else{if(r.meta&&r.meta.context){var a=r.meta.context[t];if(typeof a!=="undefined"){return a}if(r.meta.context.detail){a=r.meta.context.detail[t];if(typeof a!=="undefined"){return a}}}if(this.isHyperscriptContext(r)&&!this.isReservedWord(t)){var o=r.locals[t]}else{var o=r[t]}if(typeof o!=="undefined"){return o}else{var i=this.getElementScope(r);o=i[t];if(typeof o!=="undefined"){return o}else{return e[t]}}}}}setSymbol(t,r,n,i){if(n==="global"){e[t]=i}else if(n==="element"){var a=this.getElementScope(r);a[t]=i}else if(n==="local"){r.locals[t]=i}else{if(this.isHyperscriptContext(r)&&!this.isReservedWord(t)&&typeof r.locals[t]!=="undefined"){r.locals[t]=i}else{var a=this.getElementScope(r);var o=a[t];if(typeof o!=="undefined"){a[t]=i}else{if(this.isHyperscriptContext(r)&&!this.isReservedWord(t)){r.locals[t]=i}else{r[t]=i}}}}}findNext(e,t){if(e){if(e.resolveNext){return e.resolveNext(t)}else if(e.next){return e.next}else{return this.findNext(e.parent,t)}}}flatGet(e,t,r){if(e!=null){var n=r(e,t);if(typeof n!=="undefined"){return n}if(this.shouldAutoIterate(e)){var i=[];for(var a of e){var o=r(a,t);i.push(o)}return i}}}resolveProperty(e,t){return this.flatGet(e,t,((e,t)=>e[t]))}resolveAttribute(e,t){return this.flatGet(e,t,((e,t)=>e.getAttribute&&e.getAttribute(t)))}resolveStyle(e,t){return this.flatGet(e,t,((e,t)=>e.style&&e.style[t]))}resolveComputedStyle(e,t){return this.flatGet(e,t,((e,t)=>getComputedStyle(e).getPropertyValue(t)))}assignToNamespace(t,r,n,i){let a;if(typeof document!=="undefined"&&t===document.body){a=e}else{a=this.getHyperscriptFeatures(t)}var o;while((o=r.shift())!==undefined){var s=a[o];if(s==null){s={};a[o]=s}a=s}a[n]=i}getHyperTrace(e,t){var r=[];var n=e;while(n.meta.caller){n=n.meta.caller}if(n.meta.traceMap){return n.meta.traceMap.get(t,r)}}registerHyperTrace(e,t){var r=[];var n=null;while(e!=null){r.push(e);n=e;e=e.meta.caller}if(n.meta.traceMap==null){n.meta.traceMap=new Map}if(!n.meta.traceMap.get(t)){var i={trace:r,print:function(e){e=e||console.error;e("hypertrace /// ");var t=0;for(var n=0;n",i.meta.feature.displayName.padEnd(t+2),"-",i.meta.owner)}}};n.meta.traceMap.set(t,i)}}escapeSelector(e){return e.replace(/:/g,(function(e){return"\\"+e}))}nullCheck(e,t){if(e==null){throw new Error("'"+t.sourceFor()+"' is null")}}isEmpty(e){return e==undefined||e.length===0}doesExist(e){if(e==null){return false}if(this.shouldAutoIterate(e)){for(const t of e){return true}return false}return true}getRootNode(e){if(e&&e instanceof Node){var t=e.getRootNode();if(t instanceof Document||t instanceof ShadowRoot)return t}return document}getEventQueueFor(e,t){let r=this.getInternalData(e);var n=r.eventQueues;if(n==null){n=new Map;r.eventQueues=n}var i=n.get(t);if(i==null){i={queue:[],executing:false};n.set(t,i)}return i}beepValueToConsole(e,t,r){if(this.triggerEvent(e,"hyperscript:beep",{element:e,expression:t,value:r})){var n;if(r){if(r instanceof m){n="ElementCollection"}else if(r.constructor){n=r.constructor.name}else{n="unknown"}}else{n="object (null)"}var a=r;if(n==="String"){a='"'+a+'"'}else if(r instanceof m){a=Array.from(r)}console.log("///_ BEEP! The expression ("+i.sourceFor.call(t).replace("beep! ","")+") evaluates to:",a,"of type "+n)}}hyperscriptUrl="document"in e&&document.currentScript?document.currentScript.src:null}function s(){let e=document.cookie.split("; ").map((e=>{let t=e.split("=");return{name:t[0],value:decodeURIComponent(t[1])}}));return e}function u(e){document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}function l(){for(const e of s()){u(e.name)}}const c=new Proxy({},{get(e,t){if(t==="then"||t==="asyncWrapper"){return null}else if(t==="length"){return s().length}else if(t==="clear"){return u}else if(t==="clearAll"){return l}else if(typeof t==="string"){if(!isNaN(t)){return s()[parseInt(t)]}else{let e=document.cookie.split("; ").find((e=>e.startsWith(t+"=")))?.split("=")[1];if(e){return decodeURIComponent(e)}}}else if(t===Symbol.iterator){return s()[t]}},set(e,t,r){var n=null;if("string"===typeof r){n=encodeURIComponent(r);n+=";samesite=lax"}else{n=encodeURIComponent(r.value);if(r.expires){n+=";expires="+r.maxAge}if(r.maxAge){n+=";max-age="+r.maxAge}if(r.partitioned){n+=";partitioned="+r.partitioned}if(r.path){n+=";path="+r.path}if(r.samesite){n+=";samesite="+r.path}if(r.secure){n+=";secure="+r.path}}document.cookie=t+"="+n;return true}});class f{constructor(t,r,n,i,a){this.meta={parser:a.parser,lexer:a.lexer,runtime:a,owner:t,feature:r,iterators:{},ctx:this};this.locals={cookies:c};this.me=n,this.you=undefined;this.result=undefined;this.event=i;this.target=i?i.target:null;this.detail=i?i.detail:null;this.sender=i?i.detail?i.detail.sender:null:null;this.body="document"in e?document.body:null;a.addFeatures(t,this)}}class m{constructor(e,t,r){this._css=e;this.relativeToElement=t;this.escape=r;this[p]=true}get css(){if(this.escape){return o.prototype.escapeSelector(this._css)}else{return this._css}}get className(){return this._css.substr(1)}get id(){return this.className()}contains(e){for(let t of this){if(t.contains(e)){return true}}return false}get length(){return this.selectMatches().length}[Symbol.iterator](){let e=this.selectMatches();return e[Symbol.iterator]()}selectMatches(){let e=o.prototype.getRootNode(this.relativeToElement).querySelectorAll(this.css);return e}}const p=Symbol();function h(e,t){var r=e[t];if(r){return r}else{var n={};e[t]=n;return n}}function v(e){try{return JSON.parse(e)}catch(e){d(e);return null}}function d(e){if(console.error){console.error(e)}else if(console.log){console.log("ERROR: ",e)}}function E(e,t){return new(e.bind.apply(e,[e].concat(t)))}function T(t){t.addLeafExpression("parenthesized",(function(e,t,r){if(r.matchOpToken("(")){var n=r.clearFollows();try{var i=e.requireElement("expression",r)}finally{r.restoreFollows(n)}r.requireOpToken(")");return i}}));t.addLeafExpression("string",(function(e,t,r){var i=r.matchTokenType("STRING");if(!i)return;var a=i.value;var o;if(i.template){var s=n.tokenize(a,true);o=e.parseStringTemplate(s)}else{o=[]}return{type:"string",token:i,args:o,op:function(e){var t="";for(var r=1;re instanceof Element))}get css(){let e="",t=0;for(const r of this.templateParts){if(r instanceof Element){e+="[data-hs-query-id='"+t+++"']"}else e+=r}return e}[Symbol.iterator](){this.elements.forEach(((e,t)=>e.dataset.hsQueryId=t));const e=super[Symbol.iterator]();this.elements.forEach((e=>e.removeAttribute("data-hs-query-id")));return e}}t.addLeafExpression("queryRef",(function(e,t,i){var a=i.matchOpToken("<");if(!a)return;var o=i.consumeUntil("/");i.requireOpToken("/");i.requireOpToken(">");var s=o.map((function(e){if(e.type==="STRING"){return'"'+e.value+'"'}else{return e.value}})).join("");var u,l,c;if(s.indexOf("$")>=0){u=true;l=n.tokenize(s,true);c=e.parseStringTemplate(l)}return{type:"queryRef",css:s,args:c,op:function(e,...t){if(u){return new r(s,e.me,t)}else{return new m(s,e.me)}},evaluate:function(e){return t.unifiedEval(this,e)}}}));t.addLeafExpression("attributeRef",(function(e,t,r){var n=r.matchTokenType("ATTRIBUTE_REF");if(!n)return;if(!n.value)return;var i=n.value;if(i.indexOf("[")===0){var a=i.substring(2,i.length-1)}else{var a=i.substring(1)}var o="["+a+"]";var s=a.split("=");var u=s[0];var l=s[1];if(l){if(l.indexOf('"')===0){l=l.substring(1,l.length-1)}}return{type:"attributeRef",name:u,css:o,value:l,op:function(e){var t=e.you||e.me;if(t){return t.getAttribute(u)}},evaluate:function(e){return t.unifiedEval(this,e)}}}));t.addLeafExpression("styleRef",(function(e,t,r){var n=r.matchTokenType("STYLE_REF");if(!n)return;if(!n.value)return;var i=n.value.substr(1);if(i.startsWith("computed-")){i=i.substr("computed-".length);return{type:"computedStyleRef",name:i,op:function(e){var r=e.you||e.me;if(r){return t.resolveComputedStyle(r,i)}},evaluate:function(e){return t.unifiedEval(this,e)}}}else{return{type:"styleRef",name:i,op:function(e){var r=e.you||e.me;if(r){return t.resolveStyle(r,i)}},evaluate:function(e){return t.unifiedEval(this,e)}}}}));t.addGrammarElement("objectKey",(function(e,t,r){var n;if(n=r.matchTokenType("STRING")){return{type:"objectKey",key:n.value,evaluate:function(){return n.value}}}else if(r.matchOpToken("[")){var i=e.parseElement("expression",r);r.requireOpToken("]");return{type:"objectKey",expr:i,args:[i],op:function(e,t){return t},evaluate:function(e){return t.unifiedEval(this,e)}}}else{var a="";do{n=r.matchTokenType("IDENTIFIER")||r.matchOpToken("-");if(n)a+=n.value}while(n);return{type:"objectKey",key:a,evaluate:function(){return a}}}}));t.addLeafExpression("objectLiteral",(function(e,t,r){if(!r.matchOpToken("{"))return;var n=[];var i=[];if(!r.matchOpToken("}")){do{var a=e.requireElement("objectKey",r);r.requireOpToken(":");var o=e.requireElement("expression",r);i.push(o);n.push(a)}while(r.matchOpToken(","));r.requireOpToken("}")}return{type:"objectLiteral",args:[n,i],op:function(e,t,r){var n={};for(var i=0;i");var a=e.requireElement("expression",r);return{type:"blockLiteral",args:n,expr:a,evaluate:function(e){var t=function(){for(var t=0;t=0;a--){var o=i[a];if(o.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return o}}if(n){return i[i.length-1]}};var l=function(e,t,r,n){var i=[];o.prototype.forEach(t,(function(t){if(t.matches(r)||t===e){i.push(t)}}));for(var a=0;a","<=",">=","==","===","!=","!==");var a=i?i.value:null;var o=true;var s=false;if(a==null){if(r.matchToken("is")||r.matchToken("am")){if(r.matchToken("not")){if(r.matchToken("in")){a="not in"}else if(r.matchToken("a")){a="not a";s=true}else if(r.matchToken("empty")){a="not empty";o=false}else{if(r.matchToken("really")){a="!=="}else{a="!="}if(r.matchToken("equal")){r.matchToken("to")}}}else if(r.matchToken("in")){a="in"}else if(r.matchToken("a")){a="a";s=true}else if(r.matchToken("empty")){a="empty";o=false}else if(r.matchToken("less")){r.requireToken("than");if(r.matchToken("or")){r.requireToken("equal");r.requireToken("to");a="<="}else{a="<"}}else if(r.matchToken("greater")){r.requireToken("than");if(r.matchToken("or")){r.requireToken("equal");r.requireToken("to");a=">="}else{a=">"}}else{if(r.matchToken("really")){a="==="}else{a="=="}if(r.matchToken("equal")){r.matchToken("to")}}}else if(r.matchToken("equals")){a="=="}else if(r.matchToken("really")){r.requireToken("equals");a="==="}else if(r.matchToken("exist")||r.matchToken("exists")){a="exist";o=false}else if(r.matchToken("matches")||r.matchToken("match")){a="match"}else if(r.matchToken("contains")||r.matchToken("contain")){a="contain"}else if(r.matchToken("includes")||r.matchToken("include")){a="include"}else if(r.matchToken("do")||r.matchToken("does")){r.requireToken("not");if(r.matchToken("matches")||r.matchToken("match")){a="not match"}else if(r.matchToken("contains")||r.matchToken("contain")){a="not contain"}else if(r.matchToken("exist")||r.matchToken("exist")){a="not exist";o=false}else if(r.matchToken("include")){a="not include"}else{e.raiseParseError(r,"Expected matches or contains")}}}if(a){var u,l,c;if(s){u=r.requireTokenType("IDENTIFIER");l=!r.matchOpToken("!")}else if(o){c=e.requireElement("mathExpression",r);if(a==="match"||a==="not match"){c=c.css?c.css:c}}var m=n;n={type:"comparisonOperator",operator:a,typeName:u,nullOk:l,lhs:n,rhs:c,args:[n,c],op:function(e,r,n){if(a==="=="){return r==n}else if(a==="!="){return r!=n}if(a==="==="){return r===n}else if(a==="!=="){return r!==n}if(a==="match"){return r!=null&&p(m,r,n)}if(a==="not match"){return r==null||!p(m,r,n)}if(a==="in"){return n!=null&&f(c,n,r)}if(a==="not in"){return n==null||!f(c,n,r)}if(a==="contain"){return r!=null&&f(m,r,n)}if(a==="not contain"){return r==null||!f(m,r,n)}if(a==="include"){return r!=null&&f(m,r,n)}if(a==="not include"){return r==null||!f(m,r,n)}if(a==="==="){return r===n}else if(a==="!=="){return r!==n}else if(a==="<"){return r"){return r>n}else if(a==="<="){return r<=n}else if(a===">="){return r>=n}else if(a==="empty"){return t.isEmpty(r)}else if(a==="not empty"){return!t.isEmpty(r)}else if(a==="exist"){return t.doesExist(r)}else if(a==="not exist"){return!t.doesExist(r)}else if(a==="a"){return t.typeCheck(r,u.value,l)}else if(a==="not a"){return!t.typeCheck(r,u.value,l)}else{throw"Unknown comparison : "+a}},evaluate:function(e){return t.unifiedEval(this,e)}}}return n}));t.addGrammarElement("comparisonExpression",(function(e,t,r){return e.parseAnyOf(["comparisonOperator","mathExpression"],r)}));t.addGrammarElement("logicalOperator",(function(e,t,r){var n=e.parseElement("comparisonExpression",r);var i,a=null;i=r.matchToken("and")||r.matchToken("or");while(i){a=a||i;if(a.value!==i.value){e.raiseParseError(r,"You must parenthesize logical operations with different operators")}var o=e.requireElement("comparisonExpression",r);const s=i.value;n={type:"logicalOperator",operator:s,lhs:n,rhs:o,args:[n,o],op:function(e,t,r){if(s==="and"){return t&&r}else{return t||r}},evaluate:function(e){return t.unifiedEval(this,e)}};i=r.matchToken("and")||r.matchToken("or")}return n}));t.addGrammarElement("logicalExpression",(function(e,t,r){return e.parseAnyOf(["logicalOperator","mathExpression"],r)}));t.addGrammarElement("asyncExpression",(function(e,t,r){if(r.matchToken("async")){var n=e.requireElement("logicalExpression",r);var i={type:"asyncExpression",value:n,evaluate:function(e){return{asyncWrapper:true,value:this.value.evaluate(e)}}};return i}else{return e.parseElement("logicalExpression",r)}}));t.addGrammarElement("expression",(function(e,t,r){r.matchToken("the");return e.parseElement("asyncExpression",r)}));t.addGrammarElement("assignableExpression",(function(e,t,r){r.matchToken("the");var n=e.parseElement("primaryExpression",r);if(n&&(n.type==="symbol"||n.type==="ofExpression"||n.type==="propertyAccess"||n.type==="attributeRefAccess"||n.type==="attributeRef"||n.type==="styleRef"||n.type==="arrayIndex"||n.type==="possessive")){return n}else{e.raiseParseError(r,"A target expression must be writable. The expression type '"+(n&&n.type)+"' is not.")}return n}));t.addGrammarElement("hyperscript",(function(e,t,r){var n=[];if(r.hasMore()){while(e.featureStart(r.currentToken())||r.currentToken().value==="("){var i=e.requireElement("feature",r);n.push(i);r.matchToken("end")}}return{type:"hyperscript",features:n,apply:function(e,t,r){for(const i of n){i.install(e,t,r)}}}}));var v=function(e){var t=[];if(e.token(0).value==="("&&(e.token(1).value===")"||e.token(2).value===","||e.token(2).value===")")){e.matchOpToken("(");do{t.push(e.requireTokenType("IDENTIFIER"))}while(e.matchOpToken(","));e.requireOpToken(")")}return t};t.addFeature("on",(function(e,t,r){if(!r.matchToken("on"))return;var n=false;if(r.matchToken("every")){n=true}var i=[];var a=null;do{var o=e.requireElement("eventName",r,"Expected event name");var s=o.evaluate();if(a){a=a+" or "+s}else{a="on "+s}var u=v(r);var l=null;if(r.matchOpToken("[")){l=e.requireElement("expression",r);r.requireOpToken("]")}var c,f,m;if(r.currentToken().type==="NUMBER"){var p=r.consumeToken();if(!p.value)return;c=parseInt(p.value);if(r.matchToken("to")){var h=r.consumeToken();if(!h.value)return;f=parseInt(h.value)}else if(r.matchToken("and")){m=true;r.requireToken("on")}}var d,E;if(s==="intersection"){d={};if(r.matchToken("with")){d["with"]=e.requireElement("expression",r).evaluate()}if(r.matchToken("having")){do{if(r.matchToken("margin")){d["rootMargin"]=e.requireElement("stringLike",r).evaluate()}else if(r.matchToken("threshold")){d["threshold"]=e.requireElement("expression",r).evaluate()}else{e.raiseParseError(r,"Unknown intersection config specification")}}while(r.matchToken("and"))}}else if(s==="mutation"){E={};if(r.matchToken("of")){do{if(r.matchToken("anything")){E["attributes"]=true;E["subtree"]=true;E["characterData"]=true;E["childList"]=true}else if(r.matchToken("childList")){E["childList"]=true}else if(r.matchToken("attributes")){E["attributes"]=true;E["attributeOldValue"]=true}else if(r.matchToken("subtree")){E["subtree"]=true}else if(r.matchToken("characterData")){E["characterData"]=true;E["characterDataOldValue"]=true}else if(r.currentToken().type==="ATTRIBUTE_REF"){var T=r.consumeToken();if(E["attributeFilter"]==null){E["attributeFilter"]=[]}if(T.value.indexOf("@")==0){E["attributeFilter"].push(T.value.substring(1))}else{e.raiseParseError(r,"Only shorthand attribute references are allowed here")}}else{e.raiseParseError(r,"Unknown mutation config specification")}}while(r.matchToken("or"))}else{E["attributes"]=true;E["characterData"]=true;E["childList"]=true}}var y=null;var k=false;if(r.matchToken("from")){if(r.matchToken("elsewhere")){k=true}else{r.pushFollow("or");try{y=e.requireElement("expression",r)}finally{r.popFollow()}if(!y){e.raiseParseError(r,'Expected either target value or "elsewhere".')}}}if(y===null&&k===false&&r.matchToken("elsewhere")){k=true}if(r.matchToken("in")){var x=e.parseElement("unaryExpression",r)}if(r.matchToken("debounced")){r.requireToken("at");var g=e.requireElement("unaryExpression",r);var b=g.evaluate({})}else if(r.matchToken("throttled")){r.requireToken("at");var g=e.requireElement("unaryExpression",r);var w=g.evaluate({})}i.push({execCount:0,every:n,on:s,args:u,filter:l,from:y,inExpr:x,elsewhere:k,startCount:c,endCount:f,unbounded:m,debounceTime:b,throttleTime:w,mutationSpec:E,intersectionSpec:d,debounced:undefined,lastExec:undefined})}while(r.matchToken("or"));var S=true;if(!n){if(r.matchToken("queue")){if(r.matchToken("all")){var q=true;var S=false}else if(r.matchToken("first")){var N=true}else if(r.matchToken("none")){var I=true}else{r.requireToken("last")}}}var C=e.requireElement("commandList",r);e.ensureTerminated(C);var R,A;if(r.matchToken("catch")){R=r.requireTokenType("IDENTIFIER").value;A=e.requireElement("commandList",r);e.ensureTerminated(A)}if(r.matchToken("finally")){var L=e.requireElement("commandList",r);e.ensureTerminated(L)}var O={displayName:a,events:i,start:C,every:n,execCount:0,errorHandler:A,errorSymbol:R,execute:function(e){let r=t.getEventQueueFor(e.me,O);if(r.executing&&n===false){if(I||N&&r.queue.length>0){return}if(S){r.queue.length=0}r.queue.push(e);return}O.execCount++;r.executing=true;e.meta.onHalt=function(){r.executing=false;var e=r.queue.shift();if(e){setTimeout((function(){O.execute(e)}),1)}};e.meta.reject=function(r){console.error(r.message?r.message:r);var n=t.getHyperTrace(e,r);if(n){n.print()}t.triggerEvent(e.me,"exception",{error:r})};C.execute(e)},install:function(e,r){for(const r of O.events){var n;if(r.elsewhere){n=[document]}else if(r.from){n=r.from.evaluate(t.makeContext(e,O,e,null))}else{n=[e]}t.implicitLoop(n,(function(n){var i=r.on;if(n==null){console.warn("'%s' feature ignored because target does not exists:",a,e);return}if(r.mutationSpec){i="hyperscript:mutation";const e=new MutationObserver((function(e,r){if(!O.executing){t.triggerEvent(n,i,{mutationList:e,observer:r})}}));e.observe(n,r.mutationSpec)}if(r.intersectionSpec){i="hyperscript:intersection";const e=new IntersectionObserver((function(r){for(const o of r){var a={observer:e};a=Object.assign(a,o);a["intersecting"]=o.isIntersecting;t.triggerEvent(n,i,a)}}),r.intersectionSpec);e.observe(n)}var o=n.addEventListener||n.on;o.call(n,i,(function a(o){if(typeof Node!=="undefined"&&e instanceof Node&&n!==e&&!e.isConnected){n.removeEventListener(i,a);return}var s=t.makeContext(e,O,e,o);if(r.elsewhere&&e.contains(o.target)){return}if(r.from){s.result=n}for(const e of r.args){let t=s.event[e.value];if(t!==undefined){s.locals[e.value]=t}else if("detail"in s.event){s.locals[e.value]=s.event["detail"][e.value]}}s.meta.errorHandler=A;s.meta.errorSymbol=R;s.meta.finallyHandler=L;if(r.filter){var u=s.meta.context;s.meta.context=s.event;try{var l=r.filter.evaluate(s);if(l){}else{return}}finally{s.meta.context=u}}if(r.inExpr){var c=o.target;while(true){if(c.matches&&c.matches(r.inExpr.css)){s.result=c;break}else{c=c.parentElement;if(c==null){return}}}}r.execCount++;if(r.startCount){if(r.endCount){if(r.execCountr.endCount){return}}else if(r.unbounded){if(r.execCount{var a=false;for(const s of i){var o=n=>{e.result=n;if(s.args){for(const t of s.args){e.locals[t.value]=n[t.value]||(n.detail?n.detail[t.value]:null)}}if(!a){a=true;r(t.findNext(this,e))}};if(s.name){n.addEventListener(s.name,o,{once:true})}else if(s.time!=null){setTimeout(o,s.time,s.time)}}}))}};return n}else{var s;if(r.matchToken("a")){r.requireToken("tick");s=0}else{s=e.requireElement("expression",r)}n={type:"waitCmd",time:s,args:[s],op:function(e,r){return new Promise((n=>{setTimeout((()=>{n(t.findNext(this,e))}),r)}))},execute:function(e){return t.unifiedExec(this,e)}};return n}}));t.addGrammarElement("dotOrColonPath",(function(e,t,r){var n=r.matchTokenType("IDENTIFIER");if(n){var i=[n.value];var a=r.matchOpToken(".")||r.matchOpToken(":");if(a){do{i.push(r.requireTokenType("IDENTIFIER","NUMBER").value)}while(r.matchOpToken(a.value))}return{type:"dotOrColonPath",path:i,evaluate:function(){return i.join(a?a.value:"")}}}}));t.addGrammarElement("eventName",(function(e,t,r){var n;if(n=r.matchTokenType("STRING")){return{evaluate:function(){return n.value}}}return e.parseElement("dotOrColonPath",r)}));function d(e,t,r,n){var i=t.requireElement("eventName",n);var a=t.parseElement("namedArgumentList",n);if(e==="send"&&n.matchToken("to")||e==="trigger"&&n.matchToken("on")){var o=t.requireElement("expression",n)}else{var o=t.requireElement("implicitMeTarget",n)}var s={eventName:i,details:a,to:o,args:[o,i,a],op:function(e,t,n,i){r.nullCheck(t,o);r.implicitLoop(t,(function(t){r.triggerEvent(t,n,i,e.me)}));return r.findNext(s,e)}};return s}t.addCommand("trigger",(function(e,t,r){if(r.matchToken("trigger")){return d("trigger",e,t,r)}}));t.addCommand("send",(function(e,t,r){if(r.matchToken("send")){return d("send",e,t,r)}}));var T=function(e,t,r,n){if(n){if(e.commandBoundary(r.currentToken())){e.raiseParseError(r,"'return' commands must return a value. If you do not wish to return a value, use 'exit' instead.")}else{var i=e.requireElement("expression",r)}}var a={value:i,args:[i],op:function(e,r){var n=e.meta.resolve;e.meta.returned=true;e.meta.returnValue=r;if(n){if(r){n(r)}else{n()}}return t.HALT}};return a};t.addCommand("return",(function(e,t,r){if(r.matchToken("return")){return T(e,t,r,true)}}));t.addCommand("exit",(function(e,t,r){if(r.matchToken("exit")){return T(e,t,r,false)}}));t.addCommand("halt",(function(e,t,r){if(r.matchToken("halt")){if(r.matchToken("the")){r.requireToken("event");if(r.matchOpToken("'")){r.requireToken("s")}var n=true}if(r.matchToken("bubbling")){var i=true}else if(r.matchToken("default")){var a=true}var o=T(e,t,r,false);var s={keepExecuting:true,bubbling:i,haltDefault:a,exit:o,op:function(e){if(e.event){if(i){e.event.stopPropagation()}else if(a){e.event.preventDefault()}else{e.event.stopPropagation();e.event.preventDefault()}if(n){return t.findNext(this,e)}else{return o}}}};return s}}));t.addCommand("log",(function(e,t,r){if(!r.matchToken("log"))return;var n=[e.parseElement("expression",r)];while(r.matchOpToken(",")){n.push(e.requireElement("expression",r))}if(r.matchToken("with")){var i=e.requireElement("expression",r)}var a={exprs:n,withExpr:i,args:[i,n],op:function(e,r,n){if(r){r.apply(null,n)}else{console.log.apply(null,n)}return t.findNext(this,e)}};return a}));t.addCommand("beep!",(function(e,t,r){if(!r.matchToken("beep!"))return;var n=[e.parseElement("expression",r)];while(r.matchOpToken(",")){n.push(e.requireElement("expression",r))}var i={exprs:n,args:[n],op:function(e,r){for(let i=0;i{if(!r.matchToken("pick"))return;r.matchToken("the");if(r.matchToken("item")||r.matchToken("items")||r.matchToken("character")||r.matchToken("characters")){const n=g(e,t,r);r.requireToken("from");const i=e.requireElement("expression",r);return{args:[i,n.from,n.to],op(e,r,i,a){if(n.toEnd)a=r.length;if(!n.includeStart)i++;if(n.includeEnd)a++;if(a==null||a==undefined)a=i+1;e.result=r.slice(i,a);return t.findNext(this,e)}}}if(r.matchToken("match")){r.matchToken("of");const n=e.parseElement("expression",r);let i="";if(r.matchOpToken("|")){i=r.requireToken("identifier").value}r.requireToken("from");const a=e.parseElement("expression",r);return{args:[a,n],op(e,r,n){e.result=new RegExp(n,i).exec(r);return t.findNext(this,e)}}}if(r.matchToken("matches")){r.matchToken("of");const n=e.parseElement("expression",r);let i="gu";if(r.matchOpToken("|")){i="g"+r.requireToken("identifier").value.replace("g","")}console.log("flags",i);r.requireToken("from");const a=e.parseElement("expression",r);return{args:[a,n],op(e,r,n){e.result=new w(n,i,r);return t.findNext(this,e)}}}}));t.addCommand("increment",(function(e,t,r){if(!r.matchToken("increment"))return;var n;var i=e.parseElement("assignableExpression",r);if(r.matchToken("by")){n=e.requireElement("expression",r)}var a={type:"implicitIncrementOp",target:i,args:[i,n],op:function(e,t,r){t=t?parseFloat(t):0;r=n?parseFloat(r):1;var i=t+r;e.result=i;return i},evaluate:function(e){return t.unifiedEval(this,e)}};return k(e,t,r,i,a)}));t.addCommand("decrement",(function(e,t,r){if(!r.matchToken("decrement"))return;var n;var i=e.parseElement("assignableExpression",r);if(r.matchToken("by")){n=e.requireElement("expression",r)}var a={type:"implicitDecrementOp",target:i,args:[i,n],op:function(e,t,r){t=t?parseFloat(t):0;r=n?parseFloat(r):1;var i=t-r;e.result=i;return i},evaluate:function(e){return t.unifiedEval(this,e)}};return k(e,t,r,i,a)}));function S(e,t){var r="text";var n;e.matchToken("a")||e.matchToken("an");if(e.matchToken("json")||e.matchToken("Object")){r="json"}else if(e.matchToken("response")){r="response"}else if(e.matchToken("html")){r="html"}else if(e.matchToken("text")){}else{n=t.requireElement("dotOrColonPath",e).evaluate()}return{type:r,conversion:n}}t.addCommand("fetch",(function(e,t,r){if(!r.matchToken("fetch"))return;var n=e.requireElement("stringLike",r);if(r.matchToken("as")){var i=S(r,e)}if(r.matchToken("with")&&r.currentToken().value!=="{"){var a=e.parseElement("nakedNamedArgumentList",r)}else{var a=e.parseElement("objectLiteral",r)}if(i==null&&r.matchToken("as")){i=S(r,e)}var o=i?i.type:"text";var s=i?i.conversion:null;var u={url:n,argExpressions:a,args:[n,a],op:function(e,r,n){var i=n||{};i["sender"]=e.me;i["headers"]=i["headers"]||{};var a=new AbortController;let l=e.me.addEventListener("fetch:abort",(function(){a.abort()}),{once:true});i["signal"]=a.signal;t.triggerEvent(e.me,"hyperscript:beforeFetch",i);t.triggerEvent(e.me,"fetch:beforeRequest",i);n=i;var c=false;if(n.timeout){setTimeout((function(){if(!c){a.abort()}}),n.timeout)}return fetch(r,n).then((function(r){let n={response:r};t.triggerEvent(e.me,"fetch:afterResponse",n);r=n.response;if(o==="response"){e.result=r;t.triggerEvent(e.me,"fetch:afterRequest",{result:r});c=true;return t.findNext(u,e)}if(o==="json"){return r.json().then((function(r){e.result=r;t.triggerEvent(e.me,"fetch:afterRequest",{result:r});c=true;return t.findNext(u,e)}))}return r.text().then((function(r){if(s)r=t.convertValue(r,s);if(o==="html")r=t.convertValue(r,"Fragment");e.result=r;t.triggerEvent(e.me,"fetch:afterRequest",{result:r});c=true;return t.findNext(u,e)}))})).catch((function(r){t.triggerEvent(e.me,"fetch:error",{reason:r});throw r})).finally((function(){e.me.removeEventListener("fetch:abort",l)}))}};return u}))}function y(e){e.addCommand("settle",(function(e,t,r){if(r.matchToken("settle")){if(!e.commandBoundary(r.currentToken())){var n=e.requireElement("expression",r)}else{var n=e.requireElement("implicitMeTarget",r)}var i={type:"settleCmd",args:[n],op:function(e,r){t.nullCheck(r,n);var a=null;var o=false;var s=false;var u=new Promise((function(e){a=e}));r.addEventListener("transitionstart",(function(){s=true}),{once:true});setTimeout((function(){if(!s&&!o){a(t.findNext(i,e))}}),500);r.addEventListener("transitionend",(function(){if(!o){a(t.findNext(i,e))}}),{once:true});return u},execute:function(e){return t.unifiedExec(this,e)}};return i}}));e.addCommand("add",(function(e,t,r){if(r.matchToken("add")){var n=e.parseElement("classRef",r);var i=null;var a=null;if(n==null){i=e.parseElement("attributeRef",r);if(i==null){a=e.parseElement("styleLiteral",r);if(a==null){e.raiseParseError(r,"Expected either a class reference or attribute expression")}}}else{var o=[n];while(n=e.parseElement("classRef",r)){o.push(n)}}if(r.matchToken("to")){var s=e.requireElement("expression",r)}else{var s=e.requireElement("implicitMeTarget",r)}if(r.matchToken("when")){if(a){e.raiseParseError(r,"Only class and properties are supported with a when clause")}var u=e.requireElement("expression",r)}if(o){return{classRefs:o,to:s,args:[s,o],op:function(e,r,n){t.nullCheck(r,s);t.forEach(n,(function(n){t.implicitLoop(r,(function(r){if(u){e.result=r;let i=t.evaluateNoPromise(u,e);if(i){if(r instanceof Element)r.classList.add(n.className)}else{if(r instanceof Element)r.classList.remove(n.className)}e.result=null}else{if(r instanceof Element)r.classList.add(n.className)}}))}));return t.findNext(this,e)}}}else if(i){return{type:"addCmd",attributeRef:i,to:s,args:[s],op:function(e,r,n){t.nullCheck(r,s);t.implicitLoop(r,(function(r){if(u){e.result=r;let n=t.evaluateNoPromise(u,e);if(n){r.setAttribute(i.name,i.value)}else{r.removeAttribute(i.name)}e.result=null}else{r.setAttribute(i.name,i.value)}}));return t.findNext(this,e)},execute:function(e){return t.unifiedExec(this,e)}}}else{return{type:"addCmd",cssDeclaration:a,to:s,args:[s,a],op:function(e,r,n){t.nullCheck(r,s);t.implicitLoop(r,(function(e){e.style.cssText+=n}));return t.findNext(this,e)},execute:function(e){return t.unifiedExec(this,e)}}}}}));e.addGrammarElement("styleLiteral",(function(e,t,r){if(!r.matchOpToken("{"))return;var n=[""];var i=[];while(r.hasMore()){if(r.matchOpToken("\\")){r.consumeToken()}else if(r.matchOpToken("}")){break}else if(r.matchToken("$")){var a=r.matchOpToken("{");var o=e.parseElement("expression",r);if(a)r.requireOpToken("}");i.push(o);n.push("")}else{var s=r.consumeToken();n[n.length-1]+=r.source.substring(s.start,s.end)}n[n.length-1]+=r.lastWhitespace()}return{type:"styleLiteral",args:[i],op:function(e,t){var r="";n.forEach((function(e,n){r+=e;if(n in t)r+=t[n]}));return r},evaluate:function(e){return t.unifiedEval(this,e)}}}));e.addCommand("remove",(function(e,t,r){if(r.matchToken("remove")){var n=e.parseElement("classRef",r);var i=null;var a=null;if(n==null){i=e.parseElement("attributeRef",r);if(i==null){a=e.parseElement("expression",r);if(a==null){e.raiseParseError(r,"Expected either a class reference, attribute expression or value expression")}}}else{var o=[n];while(n=e.parseElement("classRef",r)){o.push(n)}}if(r.matchToken("from")){var s=e.requireElement("expression",r)}else{if(a==null){var s=e.requireElement("implicitMeTarget",r)}}if(a){return{elementExpr:a,from:s,args:[a,s],op:function(e,r,n){t.nullCheck(r,a);t.implicitLoop(r,(function(e){if(e.parentElement&&(n==null||n.contains(e))){e.parentElement.removeChild(e)}}));return t.findNext(this,e)}}}else{return{classRefs:o,attributeRef:i,elementExpr:a,from:s,args:[o,s],op:function(e,r,n){t.nullCheck(n,s);if(r){t.forEach(r,(function(e){t.implicitLoop(n,(function(t){t.classList.remove(e.className)}))}))}else{t.implicitLoop(n,(function(e){e.removeAttribute(i.name)}))}return t.findNext(this,e)}}}}}));e.addCommand("toggle",(function(e,t,r){if(r.matchToken("toggle")){r.matchAnyToken("the","my");if(r.currentToken().type==="STYLE_REF"){let t=r.consumeToken();var n=t.value.substr(1);var a=true;var o=i(e,r,n);if(r.matchToken("of")){r.pushFollow("with");try{var s=e.requireElement("expression",r)}finally{r.popFollow()}}else{var s=e.requireElement("implicitMeTarget",r)}}else if(r.matchToken("between")){var u=true;var l=e.parseElement("classRef",r);r.requireToken("and");var c=e.requireElement("classRef",r)}else{var l=e.parseElement("classRef",r);var f=null;if(l==null){f=e.parseElement("attributeRef",r);if(f==null){e.raiseParseError(r,"Expected either a class reference or attribute expression")}}else{var m=[l];while(l=e.parseElement("classRef",r)){m.push(l)}}}if(a!==true){if(r.matchToken("on")){var s=e.requireElement("expression",r)}else{var s=e.requireElement("implicitMeTarget",r)}}if(r.matchToken("for")){var p=e.requireElement("expression",r)}else if(r.matchToken("until")){var h=e.requireElement("dotOrColonPath",r,"Expected event name");if(r.matchToken("from")){var v=e.requireElement("expression",r)}}var d={classRef:l,classRef2:c,classRefs:m,attributeRef:f,on:s,time:p,evt:h,from:v,toggle:function(e,r,n,i){t.nullCheck(e,s);if(a){t.implicitLoop(e,(function(e){o("toggle",e)}))}else if(u){t.implicitLoop(e,(function(e){if(e.classList.contains(r.className)){e.classList.remove(r.className);e.classList.add(n.className)}else{e.classList.add(r.className);e.classList.remove(n.className)}}))}else if(i){t.forEach(i,(function(r){t.implicitLoop(e,(function(e){e.classList.toggle(r.className)}))}))}else{t.forEach(e,(function(e){if(e.hasAttribute(f.name)){e.removeAttribute(f.name)}else{e.setAttribute(f.name,f.value)}}))}},args:[s,p,h,v,l,c,m],op:function(e,r,n,i,a,o,s,u){if(n){return new Promise((function(i){d.toggle(r,o,s,u);setTimeout((function(){d.toggle(r,o,s,u);i(t.findNext(d,e))}),n)}))}else if(i){return new Promise((function(n){var l=a||e.me;l.addEventListener(i,(function(){d.toggle(r,o,s,u);n(t.findNext(d,e))}),{once:true});d.toggle(r,o,s,u)}))}else{this.toggle(r,o,s,u);return t.findNext(d,e)}}};return d}}));var t={display:function(r,n,i){if(i){n.style.display=i}else if(r==="toggle"){if(getComputedStyle(n).display==="none"){t.display("show",n,i)}else{t.display("hide",n,i)}}else if(r==="hide"){const t=e.runtime.getInternalData(n);if(t.originalDisplay==null){t.originalDisplay=n.style.display}n.style.display="none"}else{const t=e.runtime.getInternalData(n);if(t.originalDisplay&&t.originalDisplay!=="none"){n.style.display=t.originalDisplay}else{n.style.removeProperty("display")}}},visibility:function(e,r,n){if(n){r.style.visibility=n}else if(e==="toggle"){if(getComputedStyle(r).visibility==="hidden"){t.visibility("show",r,n)}else{t.visibility("hide",r,n)}}else if(e==="hide"){r.style.visibility="hidden"}else{r.style.visibility="visible"}},opacity:function(e,r,n){if(n){r.style.opacity=n}else if(e==="toggle"){if(getComputedStyle(r).opacity==="0"){t.opacity("show",r,n)}else{t.opacity("hide",r,n)}}else if(e==="hide"){r.style.opacity="0"}else{r.style.opacity="1"}}};var n=function(e,t,r){var n;var i=r.currentToken();if(i.value==="when"||i.value==="with"||e.commandBoundary(i)){n=e.parseElement("implicitMeTarget",r)}else{n=e.parseElement("expression",r)}return n};var i=function(e,n,i){var a=r.defaultHideShowStrategy;var o=t;if(r.hideShowStrategies){o=Object.assign(o,r.hideShowStrategies)}i=i||a||"display";var s=o[i];if(s==null){e.raiseParseError(n,"Unknown show/hide strategy : "+i)}return s};e.addCommand("hide",(function(e,t,r){if(r.matchToken("hide")){var a=n(e,t,r);var o=null;if(r.matchToken("with")){o=r.requireTokenType("IDENTIFIER","STYLE_REF").value;if(o.indexOf("*")===0){o=o.substr(1)}}var s=i(e,r,o);return{target:a,args:[a],op:function(e,r){t.nullCheck(r,a);t.implicitLoop(r,(function(e){s("hide",e)}));return t.findNext(this,e)}}}}));e.addCommand("show",(function(e,t,r){if(r.matchToken("show")){var a=n(e,t,r);var o=null;if(r.matchToken("with")){o=r.requireTokenType("IDENTIFIER","STYLE_REF").value;if(o.indexOf("*")===0){o=o.substr(1)}}var s=null;if(r.matchOpToken(":")){var u=r.consumeUntilWhitespace();r.matchTokenType("WHITESPACE");s=u.map((function(e){return e.value})).join("")}if(r.matchToken("when")){var l=e.requireElement("expression",r)}var c=i(e,r,o);return{target:a,when:l,args:[a],op:function(e,r){t.nullCheck(r,a);t.implicitLoop(r,(function(r){if(l){e.result=r;let n=t.evaluateNoPromise(l,e);if(n){c("show",r,s)}else{c("hide",r)}e.result=null}else{c("show",r,s)}}));return t.findNext(this,e)}}}}));e.addCommand("take",(function(e,t,r){if(r.matchToken("take")){let u=null;let l=[];while(u=e.parseElement("classRef",r)){l.push(u)}var n=null;var i=null;let c=l.length>0;if(!c){n=e.parseElement("attributeRef",r);if(n==null){e.raiseParseError(r,"Expected either a class reference or attribute expression")}if(r.matchToken("with")){i=e.requireElement("expression",r)}}if(r.matchToken("from")){var a=e.requireElement("expression",r)}if(r.matchToken("for")){var o=e.requireElement("expression",r)}else{var o=e.requireElement("implicitMeTarget",r)}if(c){var s={classRefs:l,from:a,forElt:o,args:[l,a,o],op:function(e,r,n,i){t.nullCheck(i,o);t.implicitLoop(r,(function(e){var r=e.className;if(n){t.implicitLoop(n,(function(e){e.classList.remove(r)}))}else{t.implicitLoop(e,(function(e){e.classList.remove(r)}))}t.implicitLoop(i,(function(e){e.classList.add(r)}))}));return t.findNext(this,e)}};return s}else{var s={attributeRef:n,from:a,forElt:o,args:[a,o,i],op:function(e,r,i,s){t.nullCheck(r,a);t.nullCheck(i,o);t.implicitLoop(r,(function(e){if(!s){e.removeAttribute(n.name)}else{e.setAttribute(n.name,s)}}));t.implicitLoop(i,(function(e){e.setAttribute(n.name,n.value||"")}));return t.findNext(this,e)}};return s}}}));function a(t,r,n,i){if(n!=null){var a=t.resolveSymbol(n,r)}else{var a=r}if(a instanceof Element||a instanceof HTMLDocument){while(a.firstChild)a.removeChild(a.firstChild);a.append(e.runtime.convertValue(i,"Fragment"));t.processNode(a)}else{if(n!=null){t.setSymbol(n,r,null,i)}else{throw"Don't know how to put a value into "+typeof r}}}e.addCommand("put",(function(e,t,r){if(r.matchToken("put")){var n=e.requireElement("expression",r);var i=r.matchAnyToken("into","before","after");if(i==null&&r.matchToken("at")){r.matchToken("the");i=r.matchAnyToken("start","end");r.requireToken("of")}if(i==null){e.raiseParseError(r,"Expected one of 'into', 'before', 'at start of', 'at end of', 'after'")}var o=e.requireElement("expression",r);var s=i.value;var u=false;var l=false;var c=null;var f=null;if(o.type==="arrayIndex"&&s==="into"){u=true;f=o.prop;c=o.root}else if(o.prop&&o.root&&s==="into"){f=o.prop.value;c=o.root}else if(o.type==="symbol"&&s==="into"){l=true;f=o.name}else if(o.type==="attributeRef"&&s==="into"){var m=true;f=o.name;c=e.requireElement("implicitMeTarget",r)}else if(o.type==="styleRef"&&s==="into"){var p=true;f=o.name;c=e.requireElement("implicitMeTarget",r)}else if(o.attribute&&s==="into"){var m=o.attribute.type==="attributeRef";var p=o.attribute.type==="styleRef";f=o.attribute.name;c=o.root}else{c=o}var h={target:o,operation:s,symbolWrite:l,value:n,args:[c,f,n],op:function(e,r,n,i){if(l){a(t,e,n,i)}else{t.nullCheck(r,c);if(s==="into"){if(m){t.implicitLoop(r,(function(e){e.setAttribute(n,i)}))}else if(p){t.implicitLoop(r,(function(e){e.style[n]=i}))}else if(u){r[n]=i}else{t.implicitLoop(r,(function(e){a(t,e,n,i)}))}}else{var o=s==="before"?Element.prototype.before:s==="after"?Element.prototype.after:s==="start"?Element.prototype.prepend:s==="end"?Element.prototype.append:Element.prototype.append;t.implicitLoop(r,(function(e){o.call(e,i instanceof Node?i:t.convertValue(i,"Fragment"));if(e.parentElement){t.processNode(e.parentElement)}else{t.processNode(e)}}))}}return t.findNext(this,e)}};return h}}));function o(e,t,r){var n;if(r.matchToken("the")||r.matchToken("element")||r.matchToken("elements")||r.currentToken().type==="CLASS_REF"||r.currentToken().type==="ID_REF"||r.currentToken().op&&r.currentToken().value==="<"){e.possessivesDisabled=true;try{n=e.parseElement("expression",r)}finally{delete e.possessivesDisabled}if(r.matchOpToken("'")){r.requireToken("s")}}else if(r.currentToken().type==="IDENTIFIER"&&r.currentToken().value==="its"){var i=r.matchToken("its");n={type:"pseudopossessiveIts",token:i,name:i.value,evaluate:function(e){return t.resolveSymbol("it",e)}}}else{r.matchToken("my")||r.matchToken("me");n=e.parseElement("implicitMeTarget",r)}return n}e.addCommand("transition",(function(e,t,n){if(n.matchToken("transition")){var i=o(e,t,n);var a=[];var s=[];var u=[];var l=n.currentToken();while(!e.commandBoundary(l)&&l.value!=="over"&&l.value!=="using"){if(n.currentToken().type==="STYLE_REF"){let e=n.consumeToken();let t=e.value.substr(1);a.push({type:"styleRefValue",evaluate:function(){return t}})}else{a.push(e.requireElement("stringLike",n))}if(n.matchToken("from")){s.push(e.requireElement("expression",n))}else{s.push(null)}n.requireToken("to");if(n.matchToken("initial")){u.push({type:"initial_literal",evaluate:function(){return"initial"}})}else{u.push(e.requireElement("expression",n))}l=n.currentToken()}if(n.matchToken("over")){var c=e.requireElement("expression",n)}else if(n.matchToken("using")){var f=e.requireElement("expression",n)}var m={to:u,args:[i,a,s,u,f,c],op:function(e,n,a,o,s,u,l){t.nullCheck(n,i);var c=[];t.implicitLoop(n,(function(e){var n=new Promise((function(n,i){var c=e.style.transition;if(l){e.style.transition="all "+l+"ms ease-in"}else if(u){e.style.transition=u}else{e.style.transition=r.defaultTransition}var f=t.getInternalData(e);var m=getComputedStyle(e);var p={};for(var h=0;he.forEach((e=>S(e))))).then((()=>n((function(){a();k.processNode(document.documentElement);e.document.addEventListener("htmx:load",(function(e){k.processNode(e.detail.elt)}))}))));function n(e){if(document.readyState!=="loading"){setTimeout(e)}else{document.addEventListener("DOMContentLoaded",e)}}function i(){var e=document.querySelector('meta[name="htmx-config"]');if(e){return v(e.content)}else{return null}}function a(){var e=i();if(e){Object.assign(r,e)}}}const S=Object.assign(b,{config:r,use(e){e(S)},internals:{lexer:x,parser:g,runtime:k,Lexer:n,Tokens:i,Parser:a,Runtime:o},ElementCollection:m,addFeature:g.addFeature.bind(g),addCommand:g.addCommand.bind(g),addLeafExpression:g.addLeafExpression.bind(g),addIndirectExpression:g.addIndirectExpression.bind(g),evaluate:k.evaluate.bind(k),parse:k.parse.bind(k),processNode:k.processNode.bind(k),version:"0.9.12",browserInit:w});return S})); diff --git a/ckanext/bulk/assets/vendor/iziModal.css b/ckanext/bulk/assets/vendor/iziModal.css new file mode 100644 index 0000000..447dfb4 --- /dev/null +++ b/ckanext/bulk/assets/vendor/iziModal.css @@ -0,0 +1,1292 @@ +/* +* iziModal | v1.6.1 +* https://izimodal.marcelodolza.com +* by Marcelo Dolza. +*/ +.iziModal { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; + background: #FFF; + box-shadow: 0 0 8px rgba(0,0,0,.3); + transition: margin-top 0.3s ease, height 0.3s ease; + transform: translateZ(0); + box-sizing: border-box; +} +.iziModal *{ + box-sizing: border-box; + -webkit-font-smoothing: antialiased; +} +.iziModal::after{ + content: ''; + width: 100%; + height: 0px; + opacity: 0; + position: absolute; + left: 0; + bottom: 0; + z-index: 1; + background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.35))); + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.35) 100%); + background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.35) 100%); + background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.35) 100%); + background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.35) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#59000000',GradientType=0 ); + transition: height 0.3s ease-in-out, opacity 0.3s ease-in-out; + pointer-events: none; +} +.iziModal.hasShadow::after{ + height: 30px; + opacity: 1; +} +.iziModal .iziModal-progressbar{ + position: absolute; + left: 0; + top: 0px; + width: 100%; + z-index: 1; +} +.iziModal .iziModal-progressbar > div{ + height: 2px; + width: 100%; +} + + +.iziModal .iziModal-header { + background: #88A0B9; + padding: 14px 18px 15px 18px; + box-shadow: inset 0 -10px 15px -12px rgba(0, 0, 0, 0.3), 0 0 0px #555; + overflow: hidden; + position: relative; + z-index: 10; +} +.iziModal .iziModal-header-icon{ + font-size: 40px; + color: rgba(255, 255, 255, 0.5); + padding: 0 15px 0 0; + margin: 0; + float: left; +} +.iziModal .iziModal-header-title { + color: #FFF; + font-size: 18px; + font-weight: 600; + line-height: 1.3; +} +.iziModal .iziModal-header-subtitle { + color: rgba(255, 255, 255, 0.6); + font-size: 12px; + line-height: 1.45; +} +.iziModal .iziModal-header-title, .iziModal .iziModal-header-subtitle{ + display: block; + margin: 0; + padding: 0; + font-family: 'Lato', Arial; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: left; +} +.iziModal .iziModal-header-buttons { + position: absolute; + top: 50%; + right: 10px; + margin: -17px 0 0 0; +} + +.iziModal .iziModal-button{ + display: block; + float: right; + z-index: 2; + outline: none; + height: 34px; + width: 34px; + border: 0; + padding: 0; + margin: 0; + opacity: 0.3; + border-radius: 50%; + transition: transform 0.3s cubic-bezier(.16,.81,.32,1), opacity 0.3s ease; + background-size: 67% !important; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-tap-highlight-color: transparent; /* For some Androids */ +} +.iziModal .iziModal-button-close{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODZCQkIzQ0I0RTg0MTFFNjlBODI4QTFBRTRBMkFCMDQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODZCQkIzQ0M0RTg0MTFFNjlBODI4QTFBRTRBMkFCMDQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4NkJCQjNDOTRFODQxMUU2OUE4MjhBMUFFNEEyQUIwNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4NkJCQjNDQTRFODQxMUU2OUE4MjhBMUFFNEEyQUIwNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsgTJLcAAALJSURBVHja3JnLS1VBHMfvQ7g9dBXRRrwEFRciAhMi1JRW1aIHVEIYEkW0iVpUhOD/ICK6cFMgSbUpC6VFkQa9NtpjkauriRY9Noa3pHT8/mIODMM5Or85o87pC5/NPf5mvmc8M7+Z36SFEKkY2gj2gUawF2wHW8A6+fwv+A6KYAQMg+dg2rbDtKXhGnAaHJIms4zYz9J4HxgAf1g9k2EGteAhWBBuNApaQNrUg6nRTaAbzIuV0RCocWW4DoyJlVcJXI5ruFk2tJqi/2TWxvA5sXbqA2Ucw01i7dVjargazAo/dE33p6/DlAheg50pP0SJpwG8CH7IaH/Q5pFZUhnoArkwwwVwJeWfdoMLYYZvqG+yTGo9CerAoIWBT+A4qAdPDWOugwo1NVcxJtpFZRLkwH3GJCqCghJfxVjnz1JMMMKnwAbGRAg0B5rAA4O4CblZ+qj8tkBjZthvSzDCtFIMM0ZpQhslk5Eej4jpZ/T7G+ygwG1ghrk+jjNMFy1eMPJzpOAzlou6iWmXZkm91EBHjEwUZXoQTDk2SxqhRh7HTJ9hpstB3rFZ0ldq6J2DnB9m2rXZfxOPlrX1DrJRXiaBXSHPaMHvB0cd9JPLpBImMvzLQTuUFA6A9yHPfoIjhsllOc1l5N4grtmDWgYrl5+JTUZcSjNkeMyxWdpA3ZN72IJj01OJTByJS82J2/wQVxmB5y1HK8x0JWMf/kzdD98FJcY5S51gdwyTQl6eUAraspo27PeWXgy8afim0+CELAwOWHyH9EkdkyWwJ4Yxk6BCP+bTm48anutWW5dAp34IpbW03UOzb0FPVEHbx0LKfvAyqpAyKw97JU8Mt6pml6rAJ6oY6Eu5NfvfF7QTeWWQyEsZr6694lwsNoPD8mKRo29gCNwGj7gXi7aGA1EBcY+8vq0GW8FmJb3Pgx9gEnwAr8Ab8MW2w0UBBgAVyyyaohV7ewAAAABJRU5ErkJggg==') no-repeat 50% 50%; +} +.iziModal .iziModal-button-fullscreen{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTBBOUI4RUM0RTg0MTFFNjk0NTY4NUNFRkZFNEFEQzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTBBOUI4RUQ0RTg0MTFFNjk0NTY4NUNFRkZFNEFEQzIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFMEE5QjhFQTRFODQxMUU2OTQ1Njg1Q0VGRkU0QURDMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFMEE5QjhFQjRFODQxMUU2OTQ1Njg1Q0VGRkU0QURDMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrQO6gAAAANmSURBVHjazJlbSBRRGMd3x92i0ForRRMiKiUoX4ouiFlJkRVBDxW9GJERwUasvdRT9FD00osRQtAFqegGBUHRBY0uaCVKEkSRpVR0tSwrQtp1+p/4Bk7D7M45M/Ot/uGHu+Psmf+c+eY753wnbJpmyIfGgvmgiv6WgkKQBwzwE3wBr0AnuAta6ZgnhT0aFuY2ghoyGdH4bS+4Dc6CZjCkdWVhWIPF4JoZnB6CDToeVE8sBidNPt0E5UEZrgG9Jr8GwHa/huMgaWZXDSDsxfBuc/jUBAwdw3Fz+NWoang5SJkjQwm7P3seLqQEX2LLfgfBdZcMORMcBqNDwekPqASP0uXhpjR3Ok0x/fUw9HIHGGVdw5DuRtzJpgxDsJui2qOWmuaAOuuLbHivz4YLwLgQj/aAXNmwuItlHhtbA7pAG5jEZHgKWCcbrhUTIY+NPQVjqFFObbYMi/hc6aOhl2AJ9TKnFoIyYXgemKEzJQXVVkyR3oFVzKZFuqw2qHdyFPKhrHPgMoWC3fRjRtNVVg+7SR5IiqmXxUt60cG0CK/vTIZniZVCmcKJF0C3ZNjKBqvJ9Hrwm46tsN1EkCoRQ/M3fBjvs6GrYAvdwHEfGcd1qBaGkwoxrKI+xjz83yJ0iLFHApd46X4xX+M+WECh4lepCNUIcpnMijrEWtAvTRHrbOd8FZNG8uA2Nf0hpmwtjBPwpQ5T0GPS/+tBAZhIq+b3Lu09EyHRwRgO+0C+7dhWcII+PwCf6Sk/Aa9d2vtn+A7nyASugJiD6YSDQcOlvVbxiCaAN8xrs3sgprBiac/QhlhnzjUo6JuZM0UlDS5FPtoQIdNlPYJTWUihFaDex+9Pg6T1KHJAJ2NI7ASllA28hEQ/KJIXoSlwgKlnh+jFe+GjLtwIPtjfyktUt+UaUZWqvw7H3oJD1peI7eQdoF1xWa+zQikHH13OmwqmOxxP0EiZtgK/DRwNuIcHwSeXc2K01WAPhbhKBb5hBNTVbskVH7fqpZGhbJUNtYF83fqwQSXPbOsGjb6etwx2gcEsmT3iFAZeNmUqaMeHSz2qu0k6W15Rqsx3B2i0D+xXGAHTFrRVlEeFuVoqH+ku6VNUbDkPzlAtg30nVK66i8rRIjAbTKaSQVQyN0DD6nOqcLZQld9TLfmvAAMAeMcvp3eCFqQAAAAASUVORK5CYII=') no-repeat 50% 50%; +} +.iziModal.isFullscreen .iziModal-button-fullscreen{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkFFRTU5NDA0RTg1MTFFNjk0NEZFQzBGMkVBMDYyRDkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkFFRTU5NDE0RTg1MTFFNjk0NEZFQzBGMkVBMDYyRDkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyQUVFNTkzRTRFODUxMUU2OTQ0RkVDMEYyRUEwNjJEOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyQUVFNTkzRjRFODUxMUU2OTQ0RkVDMEYyRUEwNjJEOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuDFfX8AAANASURBVHjazJlZSBVRGMfHcWlB0xZM68GKukQLYaGkmEUR2EsvRfQS+BSJPUQE+lTR8hqIZY8hFS0ERVCRoW3gpUApghYpszLTVnCB3O70/+K7MAwzc78Z58z4hx8XzpzvzJ+Zc+d85ztphmFoU9BsUAoq+XcFyAc5QAfD4BfoBp3gCWjnNl9K82mYzO0FVWwyw0NsD3gIroBWkPB0ZzLsgc3grhGcnoE9XjxIOxaCC4Y6tYC1QRmuAj2Geg2CA1M1XAsmjHDVANL8GK4zolMz0L0YrjWiV5PU8HYw6TBIf8imD6UynA96HYKPg3mgMUTDY6DUzXCzQ+AxSz+r6QEQZz4HbLoDZNkZrnAIoOlRZjN1Gk3XS0zty/gTFaRq7Ay3uAR8BcU2ps/z9QJTWw74HrDhTyDbbHg9SKQI+sb9rKa3mV8ZmAt+KJjP1TS+zinFPkqEUqQdBeAOKLa0UwIzpqlXtcYpIKWIO4RBZPoRKNfC10YQI8MlYLkwaAB8ABsiMDwDbKU8dgtIFwRMgJ3guRadKpNPWBMa7tOi1WoyHJPuTsC4oN+IQsOLM3gPJlEWqOE/neMGBqwDeYoMz6G8c0I4h6eFyHBC8A2eVoaH8JutaPwuUA/+uvSht1sHKgTjTWZwjUCVYdrK3xT0iwkND+lc5FClUQ9fINHCRYY7FBrWPSz5Er2lAR9H9P+hpfYGl64OCmPadQ7ojcDwOJetysBMQX/6mrWS4d+cIoYtMnAEnBT2fwVeJufYxZBMFoKFlrajQtOX/uczvEtIB50Kdgn1lt3JGdANltjsXE64jPMnuQ1LPuFJcFrBE11gzQXAUnAPFNk86esO4zSBfmu5lVa9toCf8DC4Ba6C22DEdO01KDLdP5fLr1Z94X2ibV1ilWVQ1XrDpvPAU4c+u1KVqvaHXI7q43ltp3PSYmDDNCgGPrCUD1wN6y5lqzAUN89baX1Y55Jn2LrPRUffRwaHwWhIZs/aTQM/hzLlDp+coPRReprk5cgrkyvz7wM0+hOcAvOlPvwcLNIp526ux1H5aJbHeFpVX4Br4LLXWoffk9CkVnLlaBNYAxaBXJBpMjfIy+o7EAdtfIyb8HPDfwIMAM1WPs8F9tcxAAAAAElFTkSuQmCC') no-repeat 50% 50%; +} +.iziModal .iziModal-button-close:hover{ + transform: rotate(180deg); +} +.iziModal .iziModal-button:hover{ + opacity: 0.8; +} + + + .iziModal .iziModal-header.iziModal-noSubtitle{ + height: auto; + padding: 10px 15px 12px 15px; + } + .iziModal .iziModal-header.iziModal-noSubtitle .iziModal-header-icon{ + font-size: 23px; + padding-right: 13px; + } + .iziModal .iziModal-header.iziModal-noSubtitle .iziModal-header-title{ + font-size: 15px; + margin: 3px 0 0 0; + font-weight: 400; + } + .iziModal .iziModal-header.iziModal-noSubtitle .iziModal-header-buttons{ + right: 6px; + margin: -16px 0 0 0; + } + .iziModal .iziModal-header.iziModal-noSubtitle .iziModal-button{ + height: 30px; + width: 30px; + } + + + /* RTL */ + + .iziModal-rtl { + direction: rtl; + } + .iziModal-rtl .iziModal-header { + padding: 14px 18px 15px 40px; + } + .iziModal-rtl .iziModal-header-icon { + float: right; + padding: 0 0 0 15px; + } + .iziModal-rtl .iziModal-header-buttons{ + right: initial !important; + left: 10px; + } + .iziModal-rtl .iziModal-button{ + float: left; + } + .iziModal-rtl .iziModal-header-title, .iziModal-rtl .iziModal-header-subtitle{ + text-align: right; + font-family: Tahoma, 'Lato', Arial; + font-weight: 500; + } + .iziModal-rtl .iziModal-header.iziModal-noSubtitle { + padding: 10px 15px 12px 40px; + } + .iziModal-rtl .iziModal-header.iziModal-noSubtitle .iziModal-header-icon { + padding: 0 0 0 13px; + } + + /* LIGHT THEME */ + + .iziModal.iziModal-light .iziModal-header-icon{ + color: rgba(0, 0, 0, 0.5); + } + .iziModal.iziModal-light .iziModal-header-title{ + color: #000; + } + .iziModal.iziModal-light .iziModal-header-subtitle{ + color: rgba(0, 0, 0, 0.6); + } + .iziModal.iziModal-light .iziModal-button-close{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyQTU1RUZDNzRFODQxMUU2ODAxOEUwQzg0QjBDQjI3OSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NEM4MTU1MEI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0RTNFNENDMkI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjZjYzMwMmE1LWFlMjEtNDI3ZS1hMmE4LTJlYjhlMmZlY2E3NSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjdmYmU3NGE3LTAxMDUtMTE3YS1hYmM3LWEzNWNkOWU1Yzc4NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po24QssAAANtSURBVHja3JlJaBRBFIa7ZxyTSXADHUkikuAawZNLEOOGGrwJQYko8R4RBQ+OICoqghJQUVwPYjzFY0QUBQU1kogoKO6CG0pcIwbiNibj/8JraNvu6Xo9NTOtP3xzSKe6/65+Ve9VlWlkp2IwGUwFE0E5GA4G8/U+0APegWfgHrgPuq0bpNNp0QPNgEYngHlgGpuMCNp2s+kr4BYM/8ql4WqwHEzP4mXteg7awOW0YlerPnQIaARLNBl1ikLlBDw/1WF4ClgHKozc6idogekz2RheANbaBlE+dB4chfF+qeHF3LOF0FWwF6b7nBe8RvecApolzQVr3C64GR4H1huFV51pmvV+hikRbABFRji0GqarMxluAGON8CgKmmA65mZ4DFhqhE9VPP//ZXgZiCmm1t1gI6XWAAY+gF0gCe4qtqlHL8fthkeBWsXGreA6eMgPviEw+x5sBZ3gAdjPCcNPI8Fsu+FawUCzz40psEfRNJndBl7b/pZmVLTQMkzJo0bQSys43iWm3cxS+DUJOmoSwqKCRmEZWKkYv6RSMBPc5lqXRGm0A1Q6XiaT2aSwo8jrK/qZwZlFIlXTusxa6iXDddTdARpnMj2ek9AWjWYH7h/lubcs4A28THdyAdOl0ezAmKNBNyLLiT0Btjti9zuHg06zpJKIprohwXNypcu1OIdGjYbnxCLGPyYy/EPDfejzbwYvXK59AzuFGdFLKTL8WYNZ59RVzGESJCNm0teI40E6zNIA2wSaA2REP32iaW0omKXRbJKTUVyYEVV0J8oxvEiQmiUZrFSz6XNkuJe3nBKCelaSbjOZrhLsd1BInYxweSeJq9YA6dYtuZCBI4JZ6jGW/W+sebhd0DAaMIO5mTYFW1+X6GeQ7TO3W0WyQj3cw0ulBg4nSUbcAY7zPVYp7ip95FXOH29Hb35AOPjypWMIh7PORSjFZVsIzdKW7AWvfYnTVNWHyCytHw+jd1Nehqks3KepvtChUzD7yGvE2/cduqxldQF1EWZb/PbWLF3jAVgo0WrlkN+c6hSd+rzlaSuaR7O0oX0wyIa2pVAdGaj0HCUVOqIq4dVwrg5lmmG2w+8f/9tjL6foYHE+Gy8Xtv3CPUpf7WauDxadKuIwoeNbOmoYDYbZ0ns/1wxUC7ykigs8sS/LpEe3vwUYALiKDDDSgEiSAAAAAElFTkSuQmCC') no-repeat 50% 50%; + } + .iziModal.iziModal-light .iziModal-button-fullscreen{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpEQTg1NTA2NTRFODQxMUU2OTQ0N0VERjY2Q0M5ODYwRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0RTNFNENCQkI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0RTNFNENCQUI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFlNTQwYzczLTVhZmEtNDJlYi04YzJlLWMwMzFlYmFiYmIyNiIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmVkYmRiMzM1LTAxMDUtMTE3YS1hYmM3LWEzNWNkOWU1Yzc4NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvIicdUAAAOvSURBVHjaxJlZbA1hFMe/qaItUUsspakg1laJ7UUisQuRvvTFA15sQSRCLBFrQryhHqxNHxEPtaQ8CCUkIrVVRbVBJdZYSrXVonr9/3pGxnTunZk78/X+k1+aO+1899/vnnvO+c4YKpi6ghEgW34OBD1BKjBAM6gH78Fz8BhUyrW/ikQivt7QiNMozU0DE8RkJx/3fgCPwA1QHvHp2K/hHJAPJqpwVA2K4flW2IZ7gyVgptKjh6AQxl+GYZi7uRr0U3rVBIpg+nIQwwvACpCkOk4XwYlosR3LMGN1qUqMroGDTqaNGDu7SiVWl+D3iP2i00c9HqxUidd8wzDy3HY4HRwCfWzXz4L7Lm+QKfHeOUTTLWAzdro6muH1YIbDjculWrmpUEM2YYXcCNMt9pAYE8WsWYLdlAxaNYTGMDDHKYYXBVy4B0jTFM/5iOcUc1fM/2JcnItNAYtBNzGtQ33BVHDV3OHpARqhV6CLLKpTs8yQYHxOCrDQO7AV1Gg2PBJhMYiGh4MMnx1eLkixXKsFuzSbZrrMpeGxHnqFFtvrTWCbhILd9AuNpnPMHXaTtZD0kl1mRdwSxXSjJsNZfONjcmqIJR5p3lp6Y+sXrAzsBz/lNXvmtZYMFKbqafi0pKQgKpOSPhmsC5BxXEs1Fz4fUr/7TWMe/q9bC2s3tJs1Df/Q/B5PwAZwJYS1WpPlo0zRZJZziL2gQU7I1GyHL7QSD26taVOytI26DpinxKypApvpk+C6dHlMnXskbUbT1yTpN3WJHWB327UCS3hUoc+tA/VyxP/ost5rGq7QWZnAdoe0eZgnYweDbgmgkoafgk8aTfNgsMNmmqfhC+Czj3V4T3mSBH255kxB0ztd4tNNDJkas2CUdkAKHQ3yAtxfijj/bdb7Cumyhmoyexzcs6Qwv2qUbPKvJDOtnNFklrF3R5qneA2XYHe/2A+ht1Xb3FZXRY1XTAjFTgtxJ45qKtWDpZK1g6dhIQuvBzjcy8FgQ6y8Nw+sCdnwL1Dn8jdMe6m2a+3ma9ESNUdOC1VixSH3bnPiYyraswnO0fqDIQkyW8WmCWab7b+I9TCF3+x0j2e+MPUA7LPGrVfD1F3VNsrPVR0zhS8BB5x21muzYa1Sy1Tb4y4d4qOwIi9Pk/wcj1gV50p5zQjJKAsJH8KcY4vpdYrjV0w9HMxxHjfKNpfwdMyRNuAmyy2M1vq5OegBNFMmR9lSHDizSLPMJGjuO2BZfSOtLKvpMylUvh/d/hFgAOH4+ibxGTZuAAAAAElFTkSuQmCC') no-repeat 50% 50%; + } + .iziModal.iziModal-light.isFullscreen .iziModal-button-fullscreen{ + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyRUUxMkYxODRFODUxMUU2Qjc3RDk0MUUzMzJDRjBEOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0RTNFNENCRkI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0RTNFNENCRUI4QUExMUU2QjNGOEVBMjg4OTRBRTg2NyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoTWFjaW50b3NoKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjgzM2MwOWZiLWJjOTEtNGVlZS05MDM1LTRkMmU2ZmE1ZjBmMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRUUxMkYxODRFODUxMUU2Qjc3RDk0MUUzMzJDRjBEOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv1Q9Z8AAAOXSURBVHjaxJlLbA1RGMfPjIs+EvoIRYt4FVUl2EkkRTxKUqQbG0SEho2FjUQ8YtEICbEgTdFYeK1KaGvVeoUltyStt0UlNE17aWhV2+v/9X5XJpMzc8/0zpn5kl+aO3Nm7r/fnPu9xhDp2URQDJbw3xkgB2QCAwyAPvANfARvQDsfG7V4PO7pC40xCiVxa8AKFjnOw7VdoA08BtG4R8VeBZeCKrBS+GPvQAM0P/NbcB7YBdYJPfYKXIXwL34IJm8eBFOFXusH9RDdnI7gLWA/MEVwdh/UOe1tN8G0V3eLcKwFXJCJNl08G5ZYsrWgWnZCJng5OOBwo1iAoisMw6hMJXgyOOywVW7xj+9BgKL3QHSxm+C9IF9y4U2GMlStRPQP8Jbp9lFwhJwE0RHrgaSV8N6xG238l7Zjtfx3K58/Bd7zsWngIqdnP2we2ACa7B7e6RL6joK5EtHNfL7b5u1Bn7dGFbycYRVM/8WyFJnuJK+z2iVwzFrMcF1h+Cx4ClhtFVyu8CW54ITE01EwFMAPcH1SMJWIqxQvItE1YHEIsXkhtkUhCV4ApiteFOPadn4IgseDMooSSxVrhWFwmkvCsKw06WGhKLhHhGuzSHChh9pZ5cc1oFFwfoTTsWrWqQCvXdZQEpkDsjUJziSv3Qu43k3LTA1BXqvRY/4DMjTd/yu4niJVm9wslCjcb4QE/9Qo+Al44baAmgpKCIqC+01OBLrsr8/de8zkiYwuUxWSq7iuM8JhantIqfYItkOepKBysnbycIfPXYKqURL6DhaBCQrrKcZHTa5loyEIJgHXwG3F9TQV+pxMGK0BiaTHn2OLEjcURbdi7XBSMO3jTxoEjtg+7wDnhG3spSD6F3hk7Tjoxnc0CJ5k+5wFCrhplYl2mmI24nyvvWumAE9z2zIfBW8WifnxIHc2yb6xiHtEoms0/hlGtpAPHCkgNDjFyZngPN88COvkPpEe+XGHbFcD7z53C+ybwKEAo0UPZ8QCybkmiL3sNvkheygSI08RYOSQiaUhd52sUpIZLWwJsYqkkdcZeHfIS66nc9XcZQRpNBY7C7F9Yy1OtonErDgSgNhGcEXmWa/VFA1O9onE6y4dRqGtXuVtkpf2iDy8EVR6GLykMnrsNFC867QF0hH8v3MVicFcuYdKy56uqQx4SukWQj3NOtJtQIt4ckSvbmdziMqy7HcS9xv0cn/Xwdn0A1drnl/d/hNgAGQa6Lgarp6BAAAAAElFTkSuQmCC') no-repeat 50% 50%; + } + + +.iziModal .iziModal-loader{ + background: #FFF url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM5OTkiPiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS13aWR0aD0iMiI+ICAgICAgICA8Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMS40cyIgICAgICAgICAgICAgICAgdmFsdWVzPSIxOyAyMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2Utb3BhY2l0eSIgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjEuNHMiICAgICAgICAgICAgICAgIHZhbHVlcz0iMTsgMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMywgMC42MSwgMC4zNTUsIDEiICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPiAgICAgICAgPC9jaXJjbGU+ICAgICAgICA8Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiAgICAgICAgICAgICAgICBiZWdpbj0iLTAuOXMiIGR1cj0iMS40cyIgICAgICAgICAgICAgICAgdmFsdWVzPSIxOyAyMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2Utb3BhY2l0eSIgICAgICAgICAgICAgICAgYmVnaW49Ii0wLjlzIiBkdXI9IjEuNHMiICAgICAgICAgICAgICAgIHZhbHVlcz0iMTsgMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMywgMC42MSwgMC4zNTUsIDEiICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPiAgICAgICAgPC9jaXJjbGU+ICAgIDwvZz48L3N2Zz4=) no-repeat 50% 50%; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 9; +} + +.iziModal .iziModal-content-loader{ + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiM5OTkiPiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS13aWR0aD0iMiI+ICAgICAgICA8Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiAgICAgICAgICAgICAgICBiZWdpbj0iMHMiIGR1cj0iMS40cyIgICAgICAgICAgICAgICAgdmFsdWVzPSIxOyAyMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2Utb3BhY2l0eSIgICAgICAgICAgICAgICAgYmVnaW49IjBzIiBkdXI9IjEuNHMiICAgICAgICAgICAgICAgIHZhbHVlcz0iMTsgMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMywgMC42MSwgMC4zNTUsIDEiICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPiAgICAgICAgPC9jaXJjbGU+ICAgICAgICA8Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiAgICAgICAgICAgICAgICBiZWdpbj0iLTAuOXMiIGR1cj0iMS40cyIgICAgICAgICAgICAgICAgdmFsdWVzPSIxOyAyMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4gICAgICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2Utb3BhY2l0eSIgICAgICAgICAgICAgICAgYmVnaW49Ii0wLjlzIiBkdXI9IjEuNHMiICAgICAgICAgICAgICAgIHZhbHVlcz0iMTsgMCIgICAgICAgICAgICAgICAgY2FsY01vZGU9InNwbGluZSIgICAgICAgICAgICAgICAga2V5VGltZXM9IjA7IDEiICAgICAgICAgICAgICAgIGtleVNwbGluZXM9IjAuMywgMC42MSwgMC4zNTUsIDEiICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPiAgICAgICAgPC9jaXJjbGU+ICAgIDwvZz48L3N2Zz4=) no-repeat 50% 50%; +} + +.iziModal .iziModal-content:before, +.iziModal .iziModal-content:after { content:''; display:table } +.iziModal .iziModal-content:after { clear:both } +.iziModal .iziModal-content{ + zoom:1; + width: 100%; +} +.iziModal .iziModal-wrap{ + width: 100%; + position: relative; +} +.iziModal .iziModal-iframe{ + border: 0; + margin: 0 0 -6px 0; + width: 100%; + transition: height 0.3s ease; +} +.iziModal-overlay{ + display: block; + position: fixed; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.iziModal-navigate{ + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + pointer-events: none; +} +.iziModal-navigate-caption{ + position: absolute; + left: 10px; + top: 10px; + color: white; + line-height: 16px; + font-size: 9px; + font-family: 'Lato', Arial; + letter-spacing: 0.1em; + text-indent: 0; + text-align: center; + width: 70px; + padding: 5px 0; + text-transform: uppercase; + display: none; +} +.iziModal-navigate-caption::before, .iziModal-navigate-caption::after { + position: absolute; + top: 2px; + width: 20px; + height: 20px; + text-align: center; + line-height: 14px; + font-size: 12px; + content: ''; + background-size: 100% !important; +} +.iziModal-navigate-caption:before{ + left: 0; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAYAAACFFRgXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyNmFjNjAyMy04OWU0LWE0NDAtYmMxMy1kOTA5MTQ3MmYzYjAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDREQ0YwRjA1MzQzMTFFNkE5NUNDRDkyQzEwMzM5RTMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDREQ0YwRUY1MzQzMTFFNkE5NUNDRDkyQzEwMzM5RTMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpmNmM0Nzk3Ni1mNzE3LTk5NDAtYTgyYS1mNTdjNmNiYmU0NWMiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDowZGVmYTEyZC01MzM0LTExZTYtYWRkYi04Y2NmYjI5ZTAxNjYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7oo0ptAAACWklEQVR42uyZTWsTYRSFZybxo4kWk5g2NC5qTAU3Kq30A9udi1oXolV/hWuhv6R/Q6utioi4LbbVFHemamlRU0OCEk0wZjwXzwtDoBDopHMHcuFJMplZnLm5ue+589qu61qeOApyYAjEgG0FEyLqN/gKiqBuTtgewWlwCZw056xgwwirgU3wxSv4NJgCUV5YBRXQDEhsBJwCSSauBVZFdJRlIJk9Av7wbj577jDIOENtRmPVwcsw6KfAAvikRKzEDlhnhuU/lRPBWaa9wsxqC6ndPX7OiOA4D8qW3vjO9z7H0w3+KhZstNmOFbLoCQ6DYGmL+bAInmGfLFC4asFXwRJIgB+goVmw+I7HXO+/gevGnGgUPEGxktkSmAMbWmt4HDwBKS6XN1jDKrvEFYoVK7oLroE3h93Woh1eNwqWafJ/gQV65vM+ail34mc6EZwBK2CAx8fAIjjeBYMzDT4cVHCEXtRbRvEu/Nr9HCIOnGGp15vgEec9KYn74B0nAT/CZnv86FcNvwK3wENwAjwAs2Bbs5d4CW5zir0AXvv8p+tKH34B5lkW4h2egRHtbu05uMMHHWfB0zC4NRF5l09kzvE4rd2tyUJyjy4tz7akZqXbL8QETbJ/FsMgWOJtb6brCQ5YsBsC8Uab63DVkkgqFpzie93h8OhScFah2LTHi5ccWroaLd5l6//+hpYQoWP05LKqFs2WQYbTsNxAi+5fxpWmdfh7HS7XhwSzG+H3a2JnvZsyktmLbdOFhpDMvrf4sN1u2/aK0cwMcmYLcturweceW+CnOfFPgAEA8uWFFylBJYoAAAAASUVORK5CYII=') no-repeat 50% 50%; +} +.iziModal-navigate-caption:after{ + right: 0; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAYAAACFFRgXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADhmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzIgNzkuMTU5Mjg0LCAyMDE2LzA0LzE5LTEzOjEzOjQwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjI2YWM2MDIzLTg5ZTQtYTQ0MC1iYzEzLWQ5MDkxNDcyZjNiMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0NERDRjBGMDUzNDMxMUU2QTk1Q0NEOTJDMTAzMzlFMyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0NERDRjBFRjUzNDMxMUU2QTk1Q0NEOTJDMTAzMzlFMyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNS41IChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmY2YzQ3OTc2LWY3MTctOTk0MC1hODJhLWY1N2M2Y2JiZTQ1YyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjBkZWZhMTJkLTUzMzQtMTFlNi1hZGRiLThjY2ZiMjllMDE2NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuijSm0AAAKbSURBVFhH7ZnJj0xRGEerzFoIMTaCZmOIedhaiJj55yz8DaYdNhIJEUMQbCTG3rQ02hDSiEY553XdTpHS3nv96taV9ElO6lVt6peb7933fffVG41GrYW5uBaX4EysYzcw1Fd8hc/wM2a0Bl6Nm3BW9i0dDPsQX/olBF6FO72AH/gG3+N3jL3KBpqGC3ERTsGfeAsHDTyHi71oCXzBe/gaU2A5bscZOIxXTb8OLQNX9i6mElYsg/voqruwfQb2BhODWgqpMYDv0NLsNXC4yd42P1PEwNJj4HBTWdipErLVDfxfMRm408QMvBu3jV6WJ1Zg9/rbeBOP+UNZYgX+iE/Rp+lpPIKliBXYB9IhtPNy3z/T/F6YmDXsChvyBc7Gs3gACxEzsDzBg9iPPXgO92NuYgeWx2h3+AhtaM7jPsyF7aV37XR8gNZYO/pwKY51+xPkG27Fk2joT3gCr2A7NuJ6HMkTeAPadlp3VeMChF7G0P6X3dmfjAXOUxIj6LZkv1ylNuStDZejkL+PS96ScFzRqnDAtI5PoTefvbg7iNNOOwqVRCfYghdxBbpHH8Y7+DcKlUTV7MLLaNghPIrjhf2N2IF34AVcjE44hrXHyE3MwE6/loEzpEcIlqKjeyFiBe7FS+he/gENewMLEyuwXdo8dGWP43UsRazA9g7uDNbwNX8oS8watlsz+ISIGbgSJgN3GgOHlnFq8zNFQraGgT1iFc9iUyU0XsMGHhy9zh6XbvCp4ZuBBWglDBj4OdqLeu0+uRJTwMZ+Dbp/e21P3m97yWe2snsw1LTHmz5C/9lQdwhfGbiq89GwvrrwUT4UAouhN6MzloTRpVuEYI5O9urZYXtrYPGQw2OlZegM163QhrJMfWVgyTq0Qq32C/N7uPz9OknWAAAAAElFTkSuQmCC') no-repeat 50% 50%; +} + .iziModal-navigate > button{ + position: fixed; + bottom: 0; + top: 0; + border:0; + height: 100%; + width: 84px; + background-size: 100% !important; + cursor: pointer; + padding: 0; + opacity: 0.2; + transition: opacity 0.3s ease; + pointer-events: all; + margin: 0; + outline: none; + } + .iziModal-navigate > button:hover{ + opacity: 1; + } + .iziModal-navigate-prev{ + left: 50%; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAC8CAYAAADCScSrAAAACXBIWXMAAAsTAAALEwEAmpwYAAA5sGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzIgNzkuMTU5Mjg0LCAyMDE2LzA0LzE5LTEzOjEzOjQwICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDo2NDkyYzcxMy05ZDM0LTZlNGQtYmUwNi1hMDMyY2Q4NDVjNGU8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDo1QjIzMUMxODU3RjcxMUU2ODUzRkRBRjE5RDhDQjZBRDwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkluc3RhbmNlSUQ+eG1wLmlpZDpjZmMwNzVmNC1kODA3LWI0NDMtYWIwYS02YWVhZjRjMDgxZWE8L3htcE1NOkluc3RhbmNlSUQ+CiAgICAgICAgIDx4bXBNTTpEZXJpdmVkRnJvbSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgIDxzdFJlZjppbnN0YW5jZUlEPnhtcC5paWQ6NjQ5MmM3MTMtOWQzNC02ZTRkLWJlMDYtYTAzMmNkODQ1YzRlPC9zdFJlZjppbnN0YW5jZUlEPgogICAgICAgICAgICA8c3RSZWY6ZG9jdW1lbnRJRD54bXAuZGlkOjY0OTJjNzEzLTlkMzQtNmU0ZC1iZTA2LWEwMzJjZDg0NWM0ZTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgPC94bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOmNmYzA3NWY0LWQ4MDctYjQ0My1hYjBhLTZhZWFmNGMwODFlYTwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNi0wOC0wMVQxMTo1ODowNC0wMzowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICA8L3JkZjpTZXE+CiAgICAgICAgIDwveG1wTU06SGlzdG9yeT4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNS41IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxNi0wOC0wMVQwOTo0MDo1Ni0wMzowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE2LTA4LTAxVDExOjU4OjA0LTAzOjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNi0wOC0wMVQxMTo1ODowNC0wMzowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9wbmc8L2RjOmZvcm1hdD4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzIwMDAwLzEwMDAwPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+NjU1MzU8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjE4ODwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xODg8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PvAvv7QAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAmdJREFUeNrs1LsJQkEQhtH/mtmBgQ8QA7tQK1e7MBBBMbADwzUZEyuQveeDCXbD4TBDay3SWJpYgYCXgJeAl4CXgJeAl4CXgJeAl4CXgJeAF/AS8BLwEvAS8BLwEvAS8BLwEvAS8BLwAl4CXgJeAl4CXv/WJskpyQJ4jQH7Mcmu0C+BV+/Y5/VeF/oV8Ood+7dpDfDqHvsrySHJBXjBDrxgB16wAy/YgRfswAt24AU78IIdeMEOPOywAw+7gIcdeMEOvGAHXrADL9iBF+zAC3bgBTvwsMMOPOwCHnYBD7uAhx14wQ68YAdesAMv2IEX7MDDDjvwsAt42AU87AIedgEPu4CHXcDDDrxgB16wAw877MDDDjvwsAt42AU87AIedgEPu4CHXcDDLuBhB16wAw877MDDLuBhF/CwC3jYBTzsAh52AQ+7gIddwEtjB3+tS/78+Z/V5d9iATz0Ah56AQ+9gIdewEMv4KEX8NALeOgFPPQCHnoBDz3wgh54QQ889NADDz30wEMv4KEX8NALeOgFPPQCHnoBD72Ahx54QQ+8oAde0AMv6IEX9MBDDz3w0EMPPPQCHnoBD72Ah17AQw+8FUAPvKAHXtADL+iBF/TAC3rgBT3wgh546KEHHnrogYdewEMv4KEHXtADL+iBF/TAC3rgBT3wgh54QQ+8oAde0AMv6IGHHnrgoU/yrgFe3aO/JdknuQOv3tGfC/tjjEsYWmsoyIWXgJeAl4CXgJeAl4CXgJeAl4CXgJeAF/AS8BLwEvAS8BLwEvAS8BLwEvAS8BLwAl4CXgJeAl4CXvqnPgAAAP//AwCEcoCBRabYzAAAAABJRU5ErkJggg==') no-repeat 50% 50%; + } + .iziModal-navigate-next{ + right: 50%; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAC8CAYAAADCScSrAAAACXBIWXMAAB3SAAAd0gEUasEwAAA7pGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzIgNzkuMTU5Mjg0LCAyMDE2LzA0LzE5LTEzOjEzOjQwICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNS41IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxNi0wOC0wMVQwOTo0MDoxNC0wMzowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE2LTA4LTAxVDExOjU4OjEyLTAzOjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNi0wOC0wMVQxMTo1ODoxMi0wMzowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9wbmc8L2RjOmZvcm1hdD4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHhtcE1NOkluc3RhbmNlSUQ+eG1wLmlpZDphZjljN2Q2MC00MTg2LWE3NGQtYTBiMS1mMGU5ODUwYzg2ZGY8L3htcE1NOkluc3RhbmNlSUQ+CiAgICAgICAgIDx4bXBNTTpEb2N1bWVudElEPnhtcC5kaWQ6NjQ5MmM3MTMtOWQzNC02ZTRkLWJlMDYtYTAzMmNkODQ1YzRlPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6NjQ5MmM3MTMtOWQzNC02ZTRkLWJlMDYtYTAzMmNkODQ1YzRlPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjY0OTJjNzEzLTlkMzQtNmU0ZC1iZTA2LWEwMzJjZDg0NWM0ZTwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNi0wOC0wMVQwOTo0MDoxNC0wMzowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjAxNjJjMmE3LWZmMjYtYzE0ZC05Yjg4LTc2MGM2NzAxYjYzNzwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNi0wOC0wMVQxMTo1MTowNy0wMzowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOmFmOWM3ZDYwLTQxODYtYTc0ZC1hMGIxLWYwZTk4NTBjODZkZjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNi0wOC0wMVQxMTo1ODoxMi0wMzowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cyk8L3N0RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpjaGFuZ2VkPi88L3N0RXZ0OmNoYW5nZWQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICA8L3JkZjpTZXE+CiAgICAgICAgIDwveG1wTU06SGlzdG9yeT4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+MTkzOTAzNi8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+MTkzOTAzNi8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTg4PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjE4ODwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+nbt1mgAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAACQklEQVR42uzSsQ3CQAAEQTdiOyGg/wrciJ0QUMYSECEKAP3PSdvAaZZqkWbJCQJeAl4CXgJeAl4CXgJeAl4CXgJeAl4CXsBLwEvAS8BLwEvAS8BLwEvAS8BLwEvAC3gJeAl4CXgJ+D9vrY7qBgLwo7dVZ+89oAd+5Pbq6nPQAz9s9+rZ96AHHnoBD72Ah17AQy/goRfw0At46AU89AIeegEPvYCHHnhBD7ygBx566IGHHnrgoRfw0At46AU89AIeegEPvYCHXsBDL+ChB17QAy/ogRf0wAt64KGHHnjooQceegEPvYCHXsBDL+ChF/DQAy/ogRf0wAt64AU98IIeeEEPvKAHXtADDz30wEPvI+ChF/DQAy/ogRf0wAt64AU98IIeeEEPvKAHXtADL+iBF/TAC3rgoZ8ePRDAAy/YgRfswAt24AU78IIdeMEOvGAHXrADL9iBhx124GEX8LADL9iBF+zAC3bgBTvwgh14wQ68YAcedtiBh13Awy7gYRfwsAMv2IEX7MALduAFO/CCHXjYYQcedgEPu4CHXcDDLuBhF/CwA+8E2IEX7MALduAFO/Cwww487AIedgEPu4CHXcDDLuBhF/CwC3jYgRfswMMOO/CwC3jYBTzsAh52AQ+7gIddwMMu4GEX8LBravB7dcEO/Ext1Qk78DO1VgfswEvAS8BLwEvAS8BLwEvAS8BLwEvAS8ALeAl4CXgJeAl4CXgJeAl4CXgJeAl4CXgBLwEvAS8BLwEvAS/9shcAAAD//wMAtAygvJrkwJUAAAAASUVORK5CYII=') no-repeat 50% 50%; + } + +.iziModal.isAttachedTop .iziModal-header{ + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.iziModal.isAttachedTop{ + margin-top: 0 !important; + margin-bottom: auto !important; + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; +} +.iziModal.isAttachedBottom{ + margin-top: auto !important; + margin-bottom: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} +.iziModal.isFullscreen{ + max-width: 100% !important; + margin: 0 !important; + height: 100% !important; + border-radius: 0 !important; +} +.iziModal.isAttached{ + border-radius: 0 !important; +} +.iziModal.hasScroll .iziModal-wrap{ + overflow-y: auto; + overflow-x: hidden; +} + +html.iziModal-isOverflow{ + overflow: hidden; +} +html.iziModal-isOverflow body, html.iziModal-isAttached body{ + overflow-y: scroll; + position: relative; +} +html.iziModal-isAttached{ + overflow: hidden; +} + +/* SCROLL */ + +.iziModal ::-webkit-scrollbar { + overflow: visible; + height: 7px; + width: 7px; +} +.iziModal ::-webkit-scrollbar-thumb { + background-color: rgba(0,0,0,.2); + background-clip: padding-box; + border: solid transparent; + border-width: 0px; + min-height: 28px; + padding: 100px 0 0; + box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07); +} +.iziModal ::-webkit-scrollbar-thumb:active { + background-color: rgba(0,0,0,.4); +} +.iziModal ::-webkit-scrollbar-button { + height: 0; + width: 0; +} +.iziModal ::-webkit-scrollbar-track { + background-clip: padding-box; + border: solid transparent; + border-width: 0 0 0 2px; +} + +/* MODAL ANIMATIONS */ + +.iziModal.transitionIn .iziModal-header{ + -webkit-animation: iziM-slideDown 0.7s cubic-bezier(0.7,0,0.3,1); + -moz-animation: iziM-slideDown 0.7s cubic-bezier(0.7,0,0.3,1); + animation: iziM-slideDown 0.7s cubic-bezier(0.7,0,0.3,1); +} + .iziModal.transitionIn .iziModal-header .iziModal-header-icon { + -webkit-animation: iziM-revealIn 1s cubic-bezier(.16,.81,.32,1) both; + -moz-animation: iziM-revealIn 1s cubic-bezier(.16,.81,.32,1) both; + animation: iziM-revealIn 1s cubic-bezier(.16,.81,.32,1) both; + } + .iziModal.transitionIn .iziModal-header .iziModal-header-title, .iziModal.transitionIn .iziModal-header .iziModal-header-subtitle { + -webkit-animation: iziM-slideIn 1s cubic-bezier(.16,.81,.32,1) both; + -moz-animation: iziM-slideIn 1s cubic-bezier(.16,.81,.32,1) both; + animation: iziM-slideIn 1s cubic-bezier(.16,.81,.32,1) both; + } + + .iziModal.transitionIn .iziModal-header .iziModal-button{ + -webkit-animation: iziM-revealIn 1.2s cubic-bezier(0.7,0,0.3,1); + -moz-animation: iziM-revealIn 1.2s cubic-bezier(0.7,0,0.3,1); + animation: iziM-revealIn 1.2s cubic-bezier(0.7,0,0.3,1); + } + +.iziModal.transitionIn .iziModal-iframe, .iziModal.transitionIn .iziModal-wrap{ + -webkit-animation: iziM-fadeIn 1.3s; + -moz-animation: iziM-fadeIn 1.3s; + animation: iziM-fadeIn 1.3s; +} +.iziModal.transitionIn .iziModal-header { + -webkit-animation-delay: 0.0s; + -moz-animation: 0.0s; + animation-delay: 0.0s; +} +.iziModal.transitionIn .iziModal-header .iziModal-header-icon, +.iziModal.transitionIn .iziModal-header .iziModal-header-title { + -webkit-animation-delay: 0.4s; + -moz-animation: 0.4s; + animation-delay: 0.4s; +} +.iziModal.transitionIn .iziModal-header .iziModal-header-subtitle { + -webkit-animation-delay: 0.5s; + -moz-animation: 0.5s; + animation-delay: 0.5s; +} + + .iziModal.transitionOut .iziModal-header, .iziModal.transitionOut .iziModal-header *{ + transition: none !important; + } + +/* ANIMATIONS */ + +.iziModal.fadeOut, .iziModal-overlay.fadeOut, .iziModal-navigate.fadeOut, .iziModal .fadeOut{ + -webkit-animation: iziM-fadeOut 0.5s; + -moz-animation: iziM-fadeOut 0.5s; + animation: iziM-fadeOut 0.5s; + animation-fill-mode: forwards; +} +.iziModal.fadeIn, .iziModal-overlay.fadeIn, .iziModal-navigate.fadeIn, .iziModal .fadeIn { + -webkit-animation: iziM-fadeIn 0.5s; + -moz-animation: iziM-fadeIn 0.5s; + animation: iziM-fadeIn 0.5s; +} +.iziModal.comingIn, .iziModal-overlay.comingIn { + -webkit-animation: iziM-comingIn 0.5s ease; + -moz-animation: iziM-comingIn 0.5s ease; + animation: iziM-comingIn 0.5s ease; +} +.iziModal.comingOut, .iziModal-overlay.comingOut { + -webkit-animation: iziM-comingOut 0.5s cubic-bezier(.16,.81,.32,1); + -moz-animation: iziM-comingOut 0.5s cubic-bezier(.16,.81,.32,1); + animation: iziM-comingOut 0.5s cubic-bezier(.16,.81,.32,1); + animation-fill-mode: forwards; +} +.iziModal.bounceInDown, .iziModal-overlay.bounceInDown { + -webkit-animation: iziM-bounceInDown 0.7s ease; + animation: iziM-bounceInDown 0.7s ease; +} +.iziModal.bounceOutDown, .iziModal-overlay.bounceOutDown { + -webkit-animation: iziM-bounceOutDown 0.7s ease; + animation: iziM-bounceOutDown 0.7s ease; +} +.iziModal.bounceInUp, .iziModal-overlay.bounceInUp { + -webkit-animation: iziM-bounceInUp 0.7s ease; + animation: iziM-bounceInUp 0.7s ease; +} +.iziModal.bounceOutUp, .iziModal-overlay.bounceOutUp { + -webkit-animation: iziM-bounceOutUp 0.7s ease; + animation: iziM-bounceOutUp 0.7s ease; +} +.iziModal.bounceInLeft, .iziModal-overlay.bounceInLeft { + -webkit-animation: iziM-bounceInLeft 0.7s ease; + animation: iziM-bounceInLeft 0.7s ease; +} +.iziModal.bounceOutLeft, .iziModal-overlay.bounceOutLeft { + -webkit-animation: iziM-bounceOutLeft 0.7s ease; + animation: iziM-bounceOutLeft 0.7s ease; +} +.iziModal.bounceInRight, .iziModal-overlay.bounceInRight { + -webkit-animation: iziM-bounceInRight 0.7s ease; + animation: iziM-bounceInRight 0.7s ease; +} +.iziModal.bounceOutRight, .iziModal-overlay.bounceOutRight { + -webkit-animation: iziM-bounceOutRight 0.7s ease; + animation: iziM-bounceOutRight 0.7s ease; +} +.iziModal.fadeInDown, .iziModal-overlay.fadeInDown { + -webkit-animation: iziM-fadeInDown 0.7s cubic-bezier(.16,.81,.32,1); + animation: iziM-fadeInDown 0.7s cubic-bezier(.16,.81,.32,1); +} +.iziModal.fadeOutDown, .iziModal-overlay.fadeOutDown { + -webkit-animation: iziM-fadeOutDown 0.5s ease; + animation: iziM-fadeOutDown 0.5s ease; +} +.iziModal.fadeInUp, .iziModal-overlay.fadeInUp { + -webkit-animation: iziM-fadeInUp 0.7s cubic-bezier(.16,.81,.32,1); + animation: iziM-fadeInUp 0.7s cubic-bezier(.16,.81,.32,1); +} +.iziModal.fadeOutUp, .iziModal-overlay.fadeOutUp { + -webkit-animation: iziM-fadeOutUp 0.5s ease; + animation: iziM-fadeOutUp 0.5s ease; +} +.iziModal.fadeInLeft, .iziModal-overlay.fadeInLeft { + -webkit-animation: iziM-fadeInLeft 0.7s cubic-bezier(.16,.81,.32,1); + animation: iziM-fadeInLeft 0.7s cubic-bezier(.16,.81,.32,1); +} +.iziModal.fadeOutLeft, .iziModal-overlay.fadeOutLeft { + -webkit-animation: iziM-fadeOutLeft 0.5s ease; + animation: iziM-fadeOutLeft 0.5s ease; +} +.iziModal.fadeInRight, .iziModal-overlay.fadeInRight { + -webkit-animation: iziM-fadeInRight 0.7s cubic-bezier(.16,.81,.32,1); + animation: iziM-fadeInRight 0.7s cubic-bezier(.16,.81,.32,1); +} +.iziModal.fadeOutRight, .iziModal-overlay.fadeOutRight { + -webkit-animation: iziM-fadeOutRight 0.5s ease; + animation: iziM-fadeOutRight 0.5s ease; +} +.iziModal.flipInX, .iziModal-overlay.flipInX { + -webkit-animation: iziM-flipInX 0.7s ease; + animation: iziM-flipInX 0.7s ease; +} +.iziModal.flipOutX, .iziModal-overlay.flipOutX { + -webkit-animation: iziM-flipOutX 0.7s ease; + animation: iziM-flipOutX 0.7s ease; +} + +@-webkit-keyframes iziM-comingIn { + 0% { + opacity: 0; + transform: scale(0.9) translateY(-20px) perspective( 600px ) rotateX( 10deg ); + } + 100% { + opacity: 1; + transform: scale(1) translateY(0) perspective( 600px ) rotateX( 0 ); + } +} +@-moz-keyframes iziM-comingIn { + 0% { + opacity: 0; + transform: scale(0.9) translateY(-20px) perspective( 600px ) rotateX( 10deg ); + } + 100% { + opacity: 1; + transform: scale(1) translateY(0) perspective( 600px ) rotateX( 0 ); + } +} +@keyframes iziM-comingIn { + 0% { + opacity: 0; + /*transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );*/ + transform: scale(0.9) translateY(-20px) perspective( 600px ) rotateX( 10deg ); + } + 100% { + opacity: 1; + /*transform: scale(1) translateY(0) perspective( 600px ) rotateX( 0 ); */ + transform: scale(1) translateY(0) perspective( 600px ) rotateX( 0 ); + } +} + +@-webkit-keyframes iziM-comingOut { + 0% { + opacity: 1; + transform: scale(1); + } + 100% { + opacity: 0; + transform: scale(0.9); + } +} +@-moz-keyframes iziM-comingOut { + 0% { + opacity: 1; + transform: scale(1); + } + 100% { + opacity: 0; + transform: scale(0.9); + } +} +@keyframes iziM-comingOut { + 0% { + opacity: 1; + transform: scale(1); + } + 100% { + opacity: 0; + transform: scale(0.9); + } +} +@-webkit-keyframes iziM-fadeOut { + 0% {opacity: 1;} + 100% {opacity: 0;} +} +@-moz-keyframes iziM-fadeOut { + 0% {opacity: 1;} + 100% {opacity: 0;} +} +@keyframes iziM-fadeOut { + 0% {opacity: 1;} + 100% {opacity: 0;} +} + +@-webkit-keyframes iziM-fadeIn { + 0% {opacity: 0;} + 100% {opacity: 1;} +} +@-moz-keyframes iziM-fadeIn { + 0% {opacity: 0;} + 100% {opacity: 1;} +} +@keyframes iziM-fadeIn { + 0% {opacity: 0;} + 100% {opacity: 1;} +} + +@-webkit-keyframes iziM-slideIn { + 0% { + opacity: 0; + -webkit-transform: translateX(50px); + } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + } +} +@-moz-keyframes iziM-slideIn { + 0% { + opacity: 0; + -moz-transform: translateX(50px); + } + 100% { + opacity: 1; + -moz-transform: translateX(0); + } +} +@keyframes iziM-slideIn { + 0% { + opacity: 0; + transform: translateX(50px); + } + 100% { + opacity: 1; + transform: translateX(0); + } +} + +@-webkit-keyframes iziM-slideDown { + 0% { opacity: 0; -webkit-transform: scale(1,0) translateY(-40px); -webkit-transform-origin: center top; } +} +@-moz-keyframes iziM-slideDown { + 0% { opacity: 0; -moz-transform: scale(1,0) translateY(-40px); -moz-transform-origin: center top; } +} +@keyframes iziM-slideDown { + 0% { opacity: 0; transform: scale(1,0) translateY(-40px); transform-origin: center top; } +} + +@-webkit-keyframes iziM-revealIn { + 0% { opacity: 0; -webkit-transform: scale3d(0.3,0.3,1); } +} +@-moz-keyframes iziM-revealIn { + 0% { opacity: 0; -moz-transform: scale3d(0.3,0.3,1); } +} +@keyframes iziM-revealIn { + 0% { opacity: 0; transform: scale3d(0.3,0.3,1); } +} + +@-webkit-keyframes iziM-bounceInDown { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -1000px, 0); + transform: translate3d(0, -1000px, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + to { + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-bounceInDown { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -1000px, 0); + transform: translate3d(0, -1000px, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + to { + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 1000px, 0); + transform: translate3d(0, 1000px, 0); + } +} +@keyframes iziM-bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 1000px, 0); + transform: translate3d(0, 1000px, 0); + } +} + +@-webkit-keyframes iziM-bounceInUp { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + from { + opacity: 0; + -webkit-transform: translate3d(0, 1000px, 0); + transform: translate3d(0, 1000px, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +@keyframes iziM-bounceInUp { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + from { + opacity: 0; + -webkit-transform: translate3d(0, 1000px, 0); + transform: translate3d(0, 1000px, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@-webkit-keyframes iziM-bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} +@keyframes iziM-bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -1000px, 0); + transform: translate3d(0, -1000px, 0); + } +} + +@-webkit-keyframes iziM-bounceInLeft { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + 0% { + opacity: 0; + -webkit-transform: translate3d(-1000px, 0, 0); + transform: translate3d(-1000px, 0, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + to { + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-bounceInLeft { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + 0% { + opacity: 0; + -webkit-transform: translate3d(-1000px, 0, 0); + transform: translate3d(-1000px, 0, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + to { + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-bounceOutLeft { + 20% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} +@keyframes iziM-bounceOutLeft { + 20% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(-1000px, 0, 0); + transform: translate3d(-1000px, 0, 0); + } +} + +@-webkit-keyframes iziM-bounceInRight { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + from { + opacity: 0; + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +@keyframes iziM-bounceInRight { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + from { + opacity: 0; + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); + } + 60% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@-webkit-keyframes iziM-bounceOutRight { + 20% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); + } +} +@keyframes iziM-bounceOutRight { + 20% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); + } +} + +@-webkit-keyframes iziM-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100px, 0); + transform: translate3d(0, -100px, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100px, 0); + transform: translate3d(0, -100px, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100px, 0); + transform: translate3d(0, 100px, 0); + } +} +@keyframes iziM-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100px, 0); + transform: translate3d(0, 100px, 0); + } +} + +@-webkit-keyframes iziM-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100px, 0); + transform: translate3d(0, 100px, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100px, 0); + transform: translate3d(0, 100px, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-fadeOutUp { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -100px, 0); + transform: translate3d(0, -100px, 0); + } +} +@keyframes iziM-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100px, 0); + transform: translate3d(0, -100px, 0); + } +} + +@-webkit-keyframes iziM-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@keyframes iziM-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} + +@-webkit-keyframes iziM-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziM-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@-webkit-keyframes iziM-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@keyframes iziM-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} + +@-webkit-keyframes iziM-flipInX { + 0% { + -webkit-transform: perspective(400px) rotateX(60deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + } + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + } + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} +@keyframes iziM-flipInX { + 0% { + transform: perspective(400px) rotateX(60deg); + opacity: 0; + } + 40% { + transform: perspective(400px) rotateX(-10deg); + } + 70% { + transform: perspective(400px) rotateX(10deg); + } + 100% { + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} + +@-webkit-keyframes iziM-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 40deg); + transform: perspective(400px) rotate3d(1, 0, 0, 40deg); + opacity: 0; + } +} +@keyframes iziM-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 40deg); + transform: perspective(400px) rotate3d(1, 0, 0, 40deg); + opacity: 0; + } +} diff --git a/ckanext/bulk/assets/vendor/iziModal.js b/ckanext/bulk/assets/vendor/iziModal.js new file mode 100644 index 0000000..fd13fb0 --- /dev/null +++ b/ckanext/bulk/assets/vendor/iziModal.js @@ -0,0 +1,1516 @@ +/* +* iziModal | v1.6.1 +* https://izimodal.marcelodolza.com +* by Marcelo Dolza. +*/ +(function (factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof module === 'object' && module.exports) { + module.exports = function( root, jQuery ) { + if ( jQuery === undefined ) { + if ( typeof window !== 'undefined' ) { + jQuery = require('jquery'); + } + else { + jQuery = require('jquery')(root); + } + } + factory(jQuery); + return jQuery; + }; + } else { + factory(jQuery); + } +}(function ($) { + + var $window = $(window), + $document = $(document), + PLUGIN_NAME = 'iziModal', + STATES = { + CLOSING: 'closing', + CLOSED: 'closed', + OPENING: 'opening', + OPENED: 'opened', + DESTROYED: 'destroyed' + }; + + function whichAnimationEvent(){ + var t, + el = document.createElement('fakeelement'), + animations = { + 'animation' : 'animationend', + 'OAnimation' : 'oAnimationEnd', + 'MozAnimation' : 'animationend', + 'WebkitAnimation': 'webkitAnimationEnd' + }; + for (t in animations){ + if (el.style[t] !== undefined){ + return animations[t]; + } + } + } + + function isIE(version) { + if(version === 9){ + return navigator.appVersion.indexOf('MSIE 9.') !== -1; + } else { + var userAgent = navigator.userAgent; + return userAgent.indexOf('MSIE ') > -1 || userAgent.indexOf('Trident/') > -1; + } + } + + function clearValue(value){ + var separators = /%|px|em|cm|vh|vw/; + return parseInt(String(value).split(separators)[0]); + } + + function changeHashWithoutScrolling(hash) { + var id = hash.replace(/^.*#/, ''), + $elem = $(hash); + $elem.attr('id', id+'-tmp'); + window.location.hash = hash; + $elem.attr('id', id); + } + + function sanitize(html) { + function trimAttributes(node) { + $.each(node.attributes, function() { + var attrName = this.name; + var attrValue = this.value; + if (attrName.indexOf('on') == 0 || attrValue.indexOf('javascript:') == 0) $(node).removeAttr(attrName); + }); + } + var output = $($.parseHTML('
' + html + '
', null, false)); + output.find('*').each(function() { + trimAttributes(this); + }); + return output.html(); + } + + var animationEvent = whichAnimationEvent(), + isMobile = (/Mobi/.test(navigator.userAgent)) ? true : false; + + window.$iziModal = {}; + window.$iziModal.autoOpen = 0; + window.$iziModal.history = false; + + var iziModal = function (element, options) { + this.init(element, options); + }; + + iziModal.prototype = { + + constructor: iziModal, + + init: function (element, options) { + + var that = this; + this.$element = $(element); + + if(this.$element[0].id !== undefined && this.$element[0].id !== ''){ + this.id = this.$element[0].id; + } else { + this.id = PLUGIN_NAME+Math.floor((Math.random() * 10000000) + 1); + this.$element.attr('id', this.id); + } + this.classes = ( this.$element.attr('class') !== undefined ) ? this.$element.attr('class') : ''; + this.content = this.$element.html(); + this.state = STATES.CLOSED; + this.options = options; + this.width = 0; + this.timer = null; + this.timerTimeout = null; + this.progressBar = null; + this.isPaused = false; + this.isFullscreen = false; + this.headerHeight = 0; + this.modalHeight = 0; + this.$overlay = $('
').css("background-color",options.overlayColor); + this.$navigate = $('
Use
'); + this.group = { + name: this.$element.attr('data-'+PLUGIN_NAME+'-group'), + index: null, + ids: [] + }; + this.$element.attr('aria-hidden', 'true'); + this.$element.attr('aria-labelledby', this.id); + this.$element.attr('role', 'dialog'); + + if( !this.$element.hasClass('iziModal') ){ + this.$element.addClass('iziModal'); + } + + if(this.group.name === undefined && options.group !== ''){ + this.group.name = options.group; + this.$element.attr('data-'+PLUGIN_NAME+'-group', options.group); + } + if(this.options.loop === true){ + this.$element.attr('data-'+PLUGIN_NAME+'-loop', true); + } + + $.each( this.options , function(index, val) { + var attr = that.$element.attr('data-'+PLUGIN_NAME+'-'+index); + try { + if(typeof attr !== typeof undefined){ + + if(attr === ''|| attr == 'true'){ + options[index] = true; + } else if (attr == 'false') { + options[index] = false; + } else if (typeof val == 'function') { + options[index] = new Function(attr); + } else { + options[index] = attr; + } + } + } catch(exc){} + }); + + if(options.appendTo !== false){ + this.$element.appendTo(options.appendTo); + } + + if (options.iframe === true) { + this.$element.html('
' + this.content + "
"); + + if (options.iframeHeight !== null) { + this.$element.find('.'+PLUGIN_NAME+'-iframe').css('height', options.iframeHeight); + } + } else { + this.$element.html('
' + this.content + '
'); + } + + if (this.options.background !== null) { + this.$element.css('background', this.options.background); + } + + this.$wrap = this.$element.find('.'+PLUGIN_NAME+'-wrap'); + + if(options.zindex !== null && !isNaN(parseInt(options.zindex)) ){ + this.$element.css('z-index', options.zindex); + this.$navigate.css('z-index', options.zindex-1); + this.$overlay.css('z-index', options.zindex-2); + } + + if(options.radius !== ''){ + this.$element.css('border-radius', options.radius); + } + + if(options.padding !== ''){ + this.$element.find('.'+PLUGIN_NAME+'-content').css('padding', options.padding); + } + + if(options.theme !== ''){ + if(options.theme === 'light'){ + this.$element.addClass(PLUGIN_NAME+'-light'); + } else { + this.$element.addClass(options.theme); + } + } + + if(options.rtl === true) { + this.$element.addClass(PLUGIN_NAME+'-rtl'); + } + + if(options.openFullscreen === true){ + this.isFullscreen = true; + this.$element.addClass('isFullscreen'); + } + + this.createHeader(); + this.recalcWidth(); + this.recalcVerticalPos(); + + if (that.options.afterRender && ( typeof(that.options.afterRender) === 'function' || typeof(that.options.afterRender) === 'object' ) ) { + that.options.afterRender(that); + } + + }, + + createHeader: function(){ + this.$header = $('

'); + + if (this.options.closeButton === true) { + this.$header.find('.'+PLUGIN_NAME+'-header-buttons').append(''); + } + + if (this.options.fullscreen === true) { + this.$header.find('.'+PLUGIN_NAME+'-header-buttons').append(''); + } + + if (this.options.timeoutProgressbar === true) { + this.$header.prepend($('
').append($('
').css("background-color",this.options.timeoutProgressbarColor))); + } + + if (this.options.subtitle === '') { + this.$header.addClass(PLUGIN_NAME+'-noSubtitle'); + } else { + this.$header.find('.'+PLUGIN_NAME+'-header-subtitle').html(sanitize(this.options.subtitle)) + } + + if (this.options.title !== '') { + this.$header.find('.'+PLUGIN_NAME+'-header-title').html(sanitize(this.options.title)) + + if (this.options.headerColor !== null) { + if(this.options.borderBottom === true){ + this.$element.css('border-bottom', '3px solid ' + this.options.headerColor + ''); + } + this.$header.css('background', this.options.headerColor); + } + if (this.options.icon !== null || this.options.iconText !== null){ + + this.$header.prepend(''); + + if (this.options.icon !== null) { + this.$header.find('.'+PLUGIN_NAME+'-header-icon').addClass(this.options.icon).css('color', this.options.iconColor); + } + if (this.options.iconText !== null){ + this.$header.find('.'+PLUGIN_NAME+'-header-icon').html(sanitize(this.options.iconText)); + } + } + this.$element.css('overflow', 'hidden').prepend(this.$header); + } + }, + + setGroup: function(groupName){ + + var that = this, + group = this.group.name || groupName; + this.group.ids = []; + + if( groupName !== undefined && groupName !== this.group.name){ + group = groupName; + this.group.name = group; + this.$element.attr('data-'+PLUGIN_NAME+'-group', group); + } + if(group !== undefined && group !== ''){ + + var count = 0; + $.each( $('.'+PLUGIN_NAME+'[data-'+PLUGIN_NAME+'-group='+group+']') , function(index, val) { + + that.group.ids.push($(this)[0].id); + + if(that.id == $(this)[0].id){ + that.group.index = count; + } + count++; + }); + } + }, + + toggle: function () { + + if(this.state == STATES.OPENED){ + this.close(); + } + if(this.state == STATES.CLOSED){ + this.open(); + } + }, + + startProgress: function(param) { + + var that = this; + + this.isPaused = false; + + clearTimeout(this.timerTimeout); + + if (this.options.timeoutProgressbar === true) { + + this.progressBar = { + hideEta: null, + maxHideTime: null, + currentTime: new Date().getTime(), + el: this.$element.find('.'+PLUGIN_NAME+'-progressbar > div'), + updateProgress: function() + { + if(!that.isPaused){ + + that.progressBar.currentTime = that.progressBar.currentTime+10; + + var percentage = ((that.progressBar.hideEta - (that.progressBar.currentTime)) / that.progressBar.maxHideTime) * 100; + that.progressBar.el.width(percentage + '%'); + if(percentage < 0){ + that.close(); + } + } + } + }; + if (param > 0) { + this.progressBar.maxHideTime = parseFloat(param); + this.progressBar.hideEta = new Date().getTime() + this.progressBar.maxHideTime; + this.timerTimeout = setInterval(this.progressBar.updateProgress, 10); + } + + } else { + this.timerTimeout = setTimeout(function(){ + that.close(); + }, that.options.timeout); + } + + }, + + pauseProgress: function(){ + + this.isPaused = true; + }, + + resumeProgress: function(){ + + this.isPaused = false; + }, + + resetProgress: function(param){ + + clearTimeout(this.timerTimeout); + this.progressBar = {}; + this.$element.find('.'+PLUGIN_NAME+'-progressbar > div').width('100%'); + }, + + open: function (param) { + + var that = this; + + try { + if(param !== undefined && param.preventClose === false){ + $.each( $('.'+PLUGIN_NAME) , function(index, modal) { + if( $(modal).data().iziModal !== undefined ){ + var state = $(modal).iziModal('getState'); + + if(state == 'opened' || state == 'opening'){ + $(modal).iziModal('close'); + } + } + }); + } + } catch(e) { /*console.warn(exc);*/ } + + (function urlHash(){ + if(that.options.history){ + + var oldTitle = document.title; + document.title = oldTitle + " - " + that.options.title; + changeHashWithoutScrolling('#'+that.id); + document.title = oldTitle; + //history.pushState({}, that.options.title, "#"+that.id); + + window.$iziModal.history = true; + } else { + window.$iziModal.history = false; + } + })(); + + function opened(){ + + // console.info('[ '+PLUGIN_NAME+' | '+that.id+' ] Opened.'); + + that.state = STATES.OPENED; + that.$element.trigger(STATES.OPENED); + + if (that.options.onOpened && ( typeof(that.options.onOpened) === "function" || typeof(that.options.onOpened) === "object" ) ) { + that.options.onOpened(that); + } + } + + function bindEvents(){ + + // Close when button pressed + that.$element.off('click', '[data-'+PLUGIN_NAME+'-close]').on('click', '[data-'+PLUGIN_NAME+'-close]', function (e) { + e.preventDefault(); + + var transition = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-transitionOut'); + + if(transition !== undefined){ + that.close({transition:transition}); + } else { + that.close(); + } + }); + + // Expand when button pressed + that.$element.off('click', '[data-'+PLUGIN_NAME+'-fullscreen]').on('click', '[data-'+PLUGIN_NAME+'-fullscreen]', function (e) { + e.preventDefault(); + if(that.isFullscreen === true){ + that.isFullscreen = false; + that.$element.removeClass('isFullscreen'); + } else { + that.isFullscreen = true; + that.$element.addClass('isFullscreen'); + } + if (that.options.onFullscreen && typeof(that.options.onFullscreen) === "function") { + that.options.onFullscreen(that); + } + that.$element.trigger('fullscreen', that); + }); + + // Next modal + that.$navigate.off('click', '.'+PLUGIN_NAME+'-navigate-next').on('click', '.'+PLUGIN_NAME+'-navigate-next', function (e) { + that.next(e); + }); + that.$element.off('click', '[data-'+PLUGIN_NAME+'-next]').on('click', '[data-'+PLUGIN_NAME+'-next]', function (e) { + that.next(e); + }); + + // Previous modal + that.$navigate.off('click', '.'+PLUGIN_NAME+'-navigate-prev').on('click', '.'+PLUGIN_NAME+'-navigate-prev', function (e) { + that.prev(e); + }); + that.$element.off('click', '[data-'+PLUGIN_NAME+'-prev]').on('click', '[data-'+PLUGIN_NAME+'-prev]', function (e) { + that.prev(e); + }); + } + + if(this.state == STATES.CLOSED){ + + bindEvents(); + + this.setGroup(); + this.state = STATES.OPENING; + this.$element.trigger(STATES.OPENING); + this.$element.attr('aria-hidden', 'false'); + + // console.info('[ '+PLUGIN_NAME+' | '+this.id+' ] Opening...'); + + if (this.options.timeoutProgressbar === true) { + this.$element.find('.'+PLUGIN_NAME+'-progressbar > div').width('100%'); + } + + if(this.options.iframe === true){ + + this.$element.find('.'+PLUGIN_NAME+'-content').addClass(PLUGIN_NAME+'-content-loader'); + + this.$element.find('.'+PLUGIN_NAME+'-iframe').on('load', function(){ + $(this).parent().removeClass(PLUGIN_NAME+'-content-loader'); + }); + + var href = null; + try { + href = $(param.currentTarget).attr('href') !== '' ? $(param.currentTarget).attr('href') : null; + } catch(e) { /* console.warn(exc); */ } + + if( (this.options.iframeURL !== null) && (href === null || href === undefined)){ + href = this.options.iframeURL; + } + if(href === null || href === undefined){ + throw new Error('Failed to find iframe URL'); + } + this.$element.find('.'+PLUGIN_NAME+'-iframe').attr('src', href); + } + + if (this.options.bodyOverflow || isMobile){ + $('html').addClass(PLUGIN_NAME+'-isOverflow'); + if(isMobile){ + $('body').css('overflow', 'hidden'); + } + } + + if (this.options.onOpening && typeof(this.options.onOpening) === 'function') { + this.options.onOpening(this); + } + (function open(){ + + if(that.group.ids.length > 1 ){ + + that.$navigate.appendTo('body'); + that.$navigate.addClass('fadeIn'); + + if(that.options.navigateCaption && !isMobile){ + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-caption').show(); + } + + var modalWidth = that.$element.outerWidth(); + if(that.options.navigateArrows !== false){ + if (that.options.navigateArrows === 'closeScreenEdge'){ + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-prev').css('left', 0).show(); + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-next').css('right', 0).show(); + } else { + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-prev').css('margin-left', -((modalWidth/2)+84)).show(); + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-next').css('margin-right', -((modalWidth/2)+84)).show(); + } + } else { + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-prev').hide(); + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-next').hide(); + } + + var loop; + if(that.group.index === 0){ + + loop = $('.'+PLUGIN_NAME+'[data-'+PLUGIN_NAME+'-group="'+that.group.name+'"][data-'+PLUGIN_NAME+'-loop]').length; + + if(loop === 0 && that.options.loop === false) + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-prev').hide(); + } + if(that.group.index+1 === that.group.ids.length){ + + loop = $('.'+PLUGIN_NAME+'[data-'+PLUGIN_NAME+'-group="'+that.group.name+'"][data-'+PLUGIN_NAME+'-loop]').length; + + if(loop === 0 && that.options.loop === false) + that.$navigate.find('.'+PLUGIN_NAME+'-navigate-next').hide(); + } + } + + if(that.options.overlay === true) { + + if(that.options.appendToOverlay === false){ + that.$overlay.appendTo('body'); + } else { + that.$overlay.appendTo( that.options.appendToOverlay ); + } + } + + if (that.options.transitionInOverlay) { + that.$overlay.addClass(that.options.transitionInOverlay); + } + + var transitionIn = that.options.transitionIn; + + if( typeof param == 'object' ){ + + if(param.transition !== undefined || param.transitionIn !== undefined){ + transitionIn = param.transition || param.transitionIn; + } + if(param.zindex !== undefined){ + that.setZindex(param.zindex); + } + } + + if (transitionIn !== '' && animationEvent !== undefined) { + + that.$element.addClass('transitionIn '+transitionIn).show(); + that.$wrap.one(animationEvent, function () { + + that.$element.removeClass(transitionIn + ' transitionIn'); + that.$overlay.removeClass(that.options.transitionInOverlay); + that.$navigate.removeClass('fadeIn'); + + opened(); + }); + + } else { + + that.$element.show(); + opened(); + } + + if(that.options.pauseOnHover === true && that.options.pauseOnHover === true && that.options.timeout !== false && !isNaN(parseInt(that.options.timeout)) && that.options.timeout !== false && that.options.timeout !== 0){ + + that.$element.off('mouseenter').on('mouseenter', function(event) { + event.preventDefault(); + that.isPaused = true; + }); + that.$element.off('mouseleave').on('mouseleave', function(event) { + event.preventDefault(); + that.isPaused = false; + }); + } + + })(); + + if (this.options.timeout !== false && !isNaN(parseInt(this.options.timeout)) && this.options.timeout !== false && this.options.timeout !== 0) { + + that.startProgress(this.options.timeout); + } + + // Close on overlay click + if (this.options.overlayClose && !this.$element.hasClass(this.options.transitionOut)) { + this.$overlay.click(function () { + that.close(); + }); + } + + if (this.options.focusInput){ + this.$element.find(':input:not(button):enabled:visible:first').focus(); // Focus on the first field + } + + (function updateTimer(){ + that.recalcLayout(); + that.timer = setTimeout(updateTimer, 300); + })(); + + // Close when the Escape key is pressed + $document.on('keydown.'+PLUGIN_NAME, function (e) { + if (that.options.closeOnEscape && e.keyCode === 27) { + that.close(); + } + }); + + } + + }, + + close: function (param) { + + var that = this; + + if(that.options.history) window.location.hash = ""; + + function closed(){ + + // console.info('[ '+PLUGIN_NAME+' | '+that.id+' ] Closed.'); + + that.state = STATES.CLOSED; + that.$element.trigger(STATES.CLOSED); + + if (that.options.iframe === true) { + that.$element.find('.'+PLUGIN_NAME+'-iframe').attr('src', ''); + } + + if (that.options.bodyOverflow || isMobile){ + $('html').removeClass(PLUGIN_NAME+'-isOverflow'); + if(isMobile){ + $('body').css('overflow','auto'); + } + } + + if (that.options.onClosed && typeof(that.options.onClosed) === 'function') { + that.options.onClosed(that); + } + + if(that.options.restoreDefaultContent === true){ + that.$element.find('.'+PLUGIN_NAME+'-content').html(that.content); + } + + if( $('.'+PLUGIN_NAME+':visible').length === 0 ){ + $('html').removeClass(PLUGIN_NAME+'-isAttached'); + } + } + + if(this.state == STATES.OPENED || this.state == STATES.OPENING){ + + $document.off('keydown.'+PLUGIN_NAME); + + this.state = STATES.CLOSING; + this.$element.trigger(STATES.CLOSING); + this.$element.attr('aria-hidden', 'true'); + + // console.info('[ '+PLUGIN_NAME+' | '+this.id+' ] Closing...'); + + clearTimeout(this.timer); + clearTimeout(this.timerTimeout); + + if (that.options.onClosing && typeof(that.options.onClosing) === "function") { + that.options.onClosing(this); + } + + var transitionOut = this.options.transitionOut; + + if( typeof param == 'object' ){ + if(param.transition !== undefined || param.transitionOut !== undefined){ + transitionOut = param.transition || param.transitionOut; + } + } + + if( (transitionOut === false || transitionOut === '' ) || animationEvent === undefined){ + + this.$element.hide(); + this.$overlay.remove(); + this.$navigate.remove(); + closed(); + + } else { + + this.$element.attr('class', [ + this.classes, + PLUGIN_NAME, + transitionOut, + this.options.theme == 'light' ? PLUGIN_NAME+'-light' : this.options.theme, + this.isFullscreen === true ? 'isFullscreen' : '', + this.options.rtl ? PLUGIN_NAME+'-rtl' : '' + ].join(' ')); + + this.$overlay.attr('class', PLUGIN_NAME + '-overlay ' + this.options.transitionOutOverlay); + + if(that.options.navigateArrows !== false && !isMobile){ + this.$navigate.attr('class', PLUGIN_NAME + '-navigate fadeOut'); + } + + this.$element.one(animationEvent, function () { + + if( that.$element.hasClass(transitionOut) ){ + that.$element.removeClass(transitionOut + ' transitionOut').hide(); + } + that.$overlay.removeClass(that.options.transitionOutOverlay).remove(); + that.$navigate.removeClass('fadeOut').remove(); + closed(); + }); + + } + + } + }, + + next: function(e){ + + var that = this; + var transitionIn = 'fadeInRight'; + var transitionOut = 'fadeOutLeft'; + var modal = $('.'+PLUGIN_NAME+':visible'); + var modals = {}; + modals.out = this; + + if(e !== undefined && typeof e !== 'object'){ + e.preventDefault(); + modal = $(e.currentTarget); + transitionIn = modal.attr('data-'+PLUGIN_NAME+'-transitionIn'); + transitionOut = modal.attr('data-'+PLUGIN_NAME+'-transitionOut'); + } else if(e !== undefined){ + if(e.transitionIn !== undefined){ + transitionIn = e.transitionIn; + } + if(e.transitionOut !== undefined){ + transitionOut = e.transitionOut; + } + } + + this.close({transition:transitionOut}); + + setTimeout(function(){ + + var loop = $('.'+PLUGIN_NAME+'[data-'+PLUGIN_NAME+'-group="'+that.group.name+'"][data-'+PLUGIN_NAME+'-loop]').length; + for (var i = that.group.index+1; i <= that.group.ids.length; i++) { + + try { + modals.in = $("#"+that.group.ids[i]).data().iziModal; + } catch(log) { + // console.info('[ '+PLUGIN_NAME+' ] No next modal.'); + } + if(typeof modals.in !== 'undefined'){ + + $('#'+that.group.ids[i]).iziModal('open', { transition: transitionIn }); + break; + + } else { + + if(i == that.group.ids.length && loop > 0 || that.options.loop === true){ + + for (var index = 0; index <= that.group.ids.length; index++) { + + modals.in = $('#'+that.group.ids[index]).data().iziModal; + if(typeof modals.in !== 'undefined'){ + + $('#'+that.group.ids[index]).iziModal('open', { transition: transitionIn }); + + break; + } + } + } + } + } + + }, 200); + + $(document).trigger( PLUGIN_NAME + '-group-change', modals ); + }, + + prev: function(e){ + var that = this; + var transitionIn = 'fadeInLeft'; + var transitionOut = 'fadeOutRight'; + var modal = $('.'+PLUGIN_NAME+':visible'); + var modals = {}; + modals.out = this; + + if(e !== undefined && typeof e !== 'object'){ + e.preventDefault(); + modal = $(e.currentTarget); + transitionIn = modal.attr('data-'+PLUGIN_NAME+'-transitionIn'); + transitionOut = modal.attr('data-'+PLUGIN_NAME+'-transitionOut'); + + } else if(e !== undefined){ + + if(e.transitionIn !== undefined){ + transitionIn = e.transitionIn; + } + if(e.transitionOut !== undefined){ + transitionOut = e.transitionOut; + } + } + + this.close({transition:transitionOut}); + + setTimeout(function(){ + + var loop = $('.'+PLUGIN_NAME+'[data-'+PLUGIN_NAME+'-group="'+that.group.name+'"][data-'+PLUGIN_NAME+'-loop]').length; + + for (var i = that.group.index; i >= 0; i--) { + + try { + modals.in = $('#'+that.group.ids[i-1]).data().iziModal; + } catch(log) { + // console.info('[ '+PLUGIN_NAME+' ] No previous modal.'); + } + if(typeof modals.in !== 'undefined'){ + + $('#'+that.group.ids[i-1]).iziModal('open', { transition: transitionIn }); + break; + + } else { + + if(i === 0 && loop > 0 || that.options.loop === true){ + + for (var index = that.group.ids.length-1; index >= 0; index--) { + + modals.in = $('#'+that.group.ids[index]).data().iziModal; + if(typeof modals.in !== 'undefined'){ + + $('#'+that.group.ids[index]).iziModal('open', { transition: transitionIn }); + + break; + } + } + } + } + } + + }, 200); + + $(document).trigger( PLUGIN_NAME + '-group-change', modals ); + }, + + destroy: function() { + var e = $.Event('destroy'); + + this.$element.trigger(e); + + $document.off('keydown.'+PLUGIN_NAME); + + clearTimeout(this.timer); + clearTimeout(this.timerTimeout); + + if (this.options.iframe === true) { + this.$element.find('.'+PLUGIN_NAME+'-iframe').remove(); + } + this.$element.html(this.$element.find('.'+PLUGIN_NAME+'-content').html()); + + this.$element.off('click', '[data-'+PLUGIN_NAME+'-close]'); + this.$element.off('click', '[data-'+PLUGIN_NAME+'-fullscreen]'); + + this.$element + .off('.'+PLUGIN_NAME) + .removeData(PLUGIN_NAME) + .removeAttr("style"); + + this.$overlay.remove(); + this.$navigate.remove(); + this.$element.trigger(STATES.DESTROYED); + this.$element = null; + }, + + getState: function(){ + + return this.state; + }, + + getGroup: function(){ + + return this.group; + }, + + setWidth: function(width){ + + this.options.width = width; + + this.recalcWidth(); + + var modalWidth = this.$element.outerWidth(); + if(this.options.navigateArrows === true || this.options.navigateArrows == 'closeToModal'){ + this.$navigate.find('.'+PLUGIN_NAME+'-navigate-prev').css('margin-left', -((modalWidth/2)+84)).show(); + this.$navigate.find('.'+PLUGIN_NAME+'-navigate-next').css('margin-right', -((modalWidth/2)+84)).show(); + } + + }, + + setTop: function(top){ + + this.options.top = top; + + this.recalcVerticalPos(false); + }, + + setBottom: function(bottom){ + + this.options.bottom = bottom; + + this.recalcVerticalPos(false); + + }, + + setHeader: function(status){ + + if(status){ + this.$element.find('.'+PLUGIN_NAME+'-header').show(); + } else { + this.headerHeight = 0; + this.$element.find('.'+PLUGIN_NAME+'-header').hide(); + } + }, + + setTitle: function(title){ + + this.options.title = title; + + if(this.headerHeight === 0){ + this.createHeader(); + } + + if( this.$header.find('.'+PLUGIN_NAME+'-header-title').length === 0 ){ + this.$header.append('

'); + } + + this.$header.find('.'+PLUGIN_NAME+'-header-title').html(sanitize(title)); + }, + + setSubtitle: function(subtitle){ + + if(subtitle === ''){ + + this.$header.find('.'+PLUGIN_NAME+'-header-subtitle').remove(); + this.$header.addClass(PLUGIN_NAME+'-noSubtitle'); + + } else { + + if( this.$header.find('.'+PLUGIN_NAME+'-header-subtitle').length === 0 ){ + this.$header.append('

'); + } + this.$header.removeClass(PLUGIN_NAME+'-noSubtitle'); + + } + + this.$header.find('.'+PLUGIN_NAME+'-header-subtitle').html(sanitize(subtitle)); + this.options.subtitle = subtitle; + }, + + setIcon: function(icon){ + + if( this.$header.find('.'+PLUGIN_NAME+'-header-icon').length === 0 ){ + this.$header.prepend(''); + } + this.$header.find('.'+PLUGIN_NAME+'-header-icon').attr('class', PLUGIN_NAME+'-header-icon ' + icon); + this.options.icon = icon; + }, + + setIconText: function(iconText){ + + this.$header.find('.'+PLUGIN_NAME+'-header-icon').html(sanitize(iconText)); + this.options.iconText = iconText; + }, + + setHeaderColor: function(headerColor){ + if(this.options.borderBottom === true){ + this.$element.css('border-bottom', '3px solid ' + headerColor + ''); + } + this.$header.css('background', headerColor); + this.options.headerColor = headerColor; + }, + + setBackground: function(background){ + if(background === false){ + this.options.background = null; + this.$element.css('background', ''); + } else{ + this.$element.css('background', background); + this.options.background = background; + } + }, + + setZindex: function(zindex){ + + if (!isNaN(parseInt(this.options.zindex))) { + this.options.zindex = zindex; + this.$element.css('z-index', zindex); + this.$navigate.css('z-index', zindex-1); + this.$overlay.css('z-index', zindex-2); + } + }, + + setFullscreen: function(value){ + + if(value){ + this.isFullscreen = true; + this.$element.addClass('isFullscreen'); + } else { + this.isFullscreen = false; + this.$element.removeClass('isFullscreen'); + } + + }, + + setContent: function(content){ + + if( typeof content == 'object' ){ + var replace = content.default || false; + if(replace === true){ + this.content = content.content; + } + content = content.content; + } + if (this.options.iframe === false) { + this.$element.find('.'+PLUGIN_NAME+'-content').html(sanitize(content)); + } + + }, + + setTransitionIn: function(transition){ + + this.options.transitionIn = transition; + }, + + setTransitionOut: function(transition){ + + this.options.transitionOut = transition; + }, + + setTimeout: function(timeout){ + + this.options.timeout = timeout; + }, + + resetContent: function(){ + + this.$element.find('.'+PLUGIN_NAME+'-content').html(this.content); + }, + + startLoading: function(){ + + if( !this.$element.find('.'+PLUGIN_NAME+'-loader').length ){ + this.$element.append('
'); + } + this.$element.find('.'+PLUGIN_NAME+'-loader').css({ + top: this.headerHeight, + borderRadius: this.options.radius + }); + }, + + stopLoading: function(){ + + var $loader = this.$element.find('.'+PLUGIN_NAME+'-loader'); + + if( !$loader.length ){ + this.$element.prepend('
'); + $loader = this.$element.find('.'+PLUGIN_NAME+'-loader').css('border-radius', this.options.radius); + } + $loader.removeClass('fadeIn').addClass('fadeOut'); + setTimeout(function(){ + $loader.remove(); + },600); + }, + + recalcWidth: function(){ + + var that = this; + + this.$element.css('max-width', this.options.width); + + if(isIE()){ + var modalWidth = that.options.width; + + if(modalWidth.toString().split('%').length > 1){ + modalWidth = that.$element.outerWidth(); + } + that.$element.css({ + left: '50%', + marginLeft: -(modalWidth/2) + }); + } + }, + + recalcVerticalPos: function(first){ + + if(this.options.top !== null && this.options.top !== false){ + this.$element.css('margin-top', this.options.top); + if(this.options.top === 0){ + this.$element.css({ + borderTopRightRadius: 0, + borderTopLeftRadius: 0 + }); + } + } else { + if(first === false){ + this.$element.css({ + marginTop: '', + borderRadius: this.options.radius + }); + } + } + if (this.options.bottom !== null && this.options.bottom !== false){ + this.$element.css('margin-bottom', this.options.bottom); + if(this.options.bottom === 0){ + this.$element.css({ + borderBottomRightRadius: 0, + borderBottomLeftRadius: 0 + }); + } + } else { + if(first === false){ + this.$element.css({ + marginBottom: '', + borderRadius: this.options.radius + }); + } + } + + }, + + recalcLayout: function(){ + + var that = this, + windowHeight = $window.height(), + modalHeight = this.$element.outerHeight(), + modalWidth = this.$element.outerWidth(), + contentHeight = this.$element.find('.'+PLUGIN_NAME+'-content')[0].scrollHeight, + outerHeight = contentHeight + this.headerHeight, + wrapperHeight = this.$element.innerHeight() - this.headerHeight, + modalMargin = parseInt(-((this.$element.innerHeight() + 1) / 2)) + 'px', + scrollTop = this.$wrap.scrollTop(), + borderSize = 0; + + if(isIE()){ + if( modalWidth >= $window.width() || this.isFullscreen === true ){ + this.$element.css({ + left: '0', + marginLeft: '' + }); + } else { + this.$element.css({ + left: '50%', + marginLeft: -(modalWidth/2) + }); + } + } + + if(this.options.borderBottom === true && this.options.title !== ''){ + borderSize = 3; + } + + if(this.$element.find('.'+PLUGIN_NAME+'-header').length && this.$element.find('.'+PLUGIN_NAME+'-header').is(':visible') ){ + this.headerHeight = parseInt(this.$element.find('.'+PLUGIN_NAME+'-header').innerHeight()); + this.$element.css('overflow', 'hidden'); + } else { + this.headerHeight = 0; + this.$element.css('overflow', ''); + } + + if(this.$element.find('.'+PLUGIN_NAME+'-loader').length){ + this.$element.find('.'+PLUGIN_NAME+'-loader').css('top', this.headerHeight); + } + + if(modalHeight !== this.modalHeight){ + this.modalHeight = modalHeight; + + if (this.options.onResize && typeof(this.options.onResize) === "function") { + this.options.onResize(this); + } + } + + if(this.state == STATES.OPENED || this.state == STATES.OPENING){ + + if (this.options.iframe === true) { + + // If the height of the window is smaller than the modal with iframe + if(windowHeight < (this.options.iframeHeight + this.headerHeight+borderSize) || this.isFullscreen === true){ + this.$element.find('.'+PLUGIN_NAME+'-iframe').css( 'height', windowHeight - (this.headerHeight+borderSize)); + } else { + this.$element.find('.'+PLUGIN_NAME+'-iframe').css( 'height', this.options.iframeHeight); + } + } + + if(modalHeight == windowHeight){ + this.$element.addClass('isAttached'); + } else { + this.$element.removeClass('isAttached'); + } + + if(this.isFullscreen === false && this.$element.width() >= $window.width() ){ + this.$element.find('.'+PLUGIN_NAME+'-button-fullscreen').hide(); + } else { + this.$element.find('.'+PLUGIN_NAME+'-button-fullscreen').show(); + } + this.recalcButtons(); + + if(this.isFullscreen === false){ + windowHeight = windowHeight - (clearValue(this.options.top) || 0) - (clearValue(this.options.bottom) || 0); + } + // If the modal is larger than the height of the window.. + if (outerHeight > windowHeight) { + if(this.options.top > 0 && this.options.bottom === null && contentHeight < $window.height()){ + this.$element.addClass('isAttachedBottom'); + } + if(this.options.bottom > 0 && this.options.top === null && contentHeight < $window.height()){ + this.$element.addClass('isAttachedTop'); + } + if( $('.'+PLUGIN_NAME+':visible').length === 1 ){ + $('html').addClass(PLUGIN_NAME+'-isAttached'); + } + this.$element.css( 'height', windowHeight ); + + } else { + this.$element.css('height', contentHeight + (this.headerHeight+borderSize)); + this.$element.removeClass('isAttachedTop isAttachedBottom'); + if( $('.'+PLUGIN_NAME+':visible').length === 1 ){ + $('html').removeClass(PLUGIN_NAME+'-isAttached'); + } + } + + (function applyScroll(){ + if(contentHeight > wrapperHeight && outerHeight > windowHeight){ + that.$element.addClass('hasScroll'); + that.$wrap.css('height', modalHeight - (that.headerHeight+borderSize)); + } else { + that.$element.removeClass('hasScroll'); + that.$wrap.css('height', 'auto'); + } + })(); + + (function applyShadow(){ + if (wrapperHeight + scrollTop < (contentHeight - 30)) { + that.$element.addClass('hasShadow'); + } else { + that.$element.removeClass('hasShadow'); + } + })(); + + } + }, + + recalcButtons: function(){ + var widthButtons = this.$header.find('.'+PLUGIN_NAME+'-header-buttons').innerWidth()+10; + if(this.options.rtl === true){ + this.$header.css('padding-left', widthButtons); + } else { + this.$header.css('padding-right', widthButtons); + } + } + + }; + + + $window.off('load.'+PLUGIN_NAME).on('load.'+PLUGIN_NAME, function(e) { + + var modalHash = decodeURIComponent(document.location.hash); + + if(window.$iziModal.autoOpen === 0 && !$('.'+PLUGIN_NAME).is(':visible')){ + + try { + var data = $(modalHash).data(); + if(typeof data !== 'undefined'){ + if(data.iziModal.options.autoOpen !== false){ + $(modalHash).iziModal('open'); + } + } + } catch(exc) { /* console.warn(exc); */ } + } + + }); + + $window.off('hashchange.'+PLUGIN_NAME).on('hashchange.'+PLUGIN_NAME, function(e) { + + var modalHash = decodeURIComponent(document.location.hash); + + if(modalHash !== ''){ + try { + var data = $(modalHash).data(); + + if(typeof data !== 'undefined' && $(modalHash).iziModal('getState') !== 'opening'){ + setTimeout(function(){ + $(modalHash).iziModal('open', { preventClose: false }); + },200); + } + } catch(exc) { /* console.warn(exc); */ } + + } else { + + if(window.$iziModal.history){ + $.each( $('.'+PLUGIN_NAME) , function(index, modal) { + if( $(modal).data().iziModal !== undefined ){ + var state = $(modal).iziModal('getState'); + if(state == 'opened' || state == 'opening'){ + $(modal).iziModal('close'); + } + } + }); + } + } + + }); + + $document.off('click', '[data-'+PLUGIN_NAME+'-open]').on('click', '[data-'+PLUGIN_NAME+'-open]', function(e) { + e.preventDefault(); + + var modal = $('.'+PLUGIN_NAME+':visible'); + var openModal = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-open'); + var preventClose = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-preventClose'); + var transitionIn = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-transitionIn'); + var transitionOut = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-transitionOut'); + var zindex = $(e.currentTarget).attr('data-'+PLUGIN_NAME+'-zindex'); + + if(zindex !== undefined) + $(openModal).iziModal('setZindex', zindex); + + if(preventClose === undefined){ + if(transitionOut !== undefined){ + modal.iziModal('close', { + transition: transitionOut + }); + } else { + modal.iziModal('close'); + } + } + + setTimeout(function(){ + if(transitionIn !== undefined){ + $(openModal).iziModal('open', { + transition: transitionIn + }); + } else { + $(openModal).iziModal('open'); + } + }, 200); + }); + + $document.off('keyup.'+PLUGIN_NAME).on('keyup.'+PLUGIN_NAME, function(event) { + if( $('.'+PLUGIN_NAME+':visible').length && !isMobile ){ + var modal = $('.'+PLUGIN_NAME+':visible')[0].id, + arrowKeys = $('#'+modal).data().iziModal.options.arrowKeys, + group = $('#'+modal).iziModal('getGroup'), + e = event || window.event, + target = e.target || e.srcElement; + + if(modal !== undefined && arrowKeys && group.name !== undefined && !e.ctrlKey && !e.metaKey && !e.altKey && target.tagName.toUpperCase() !== 'INPUT' && target.tagName.toUpperCase() != 'TEXTAREA'){ //&& $(e.target).is('body') + + if(e.keyCode === 37) { // left + $('#'+modal).iziModal('prev', e); + } + else if(e.keyCode === 39 ) { // right + $('#'+modal).iziModal('next', e); + } + } + } + }); + + $.fn[PLUGIN_NAME] = function(option, args) { + if( !$(this).length && typeof option == 'object' && this.selector){ + + var newEL = { + $el: document.createElement('div'), + id: this.selector.split('#'), + class: this.selector.split('.') + }; + + if(newEL.id.length > 1){ + try{ + newEL.$el = document.createElement(id[0]); + } catch(exc){ } + + newEL.$el.id = newEL.id[1].trim(); + + } else if(newEL.class.length > 1){ + try{ + newEL.$el = document.createElement(newEL.class[0]); + } catch(exc){ } + + for (var x=1; x .iziToast-progressbar { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + z-index: 1; + background: rgba(255,255,255,0.2); +} +.iziToast > .iziToast-progressbar > div { + height: 2px; + width: 100%; + background: rgba(0,0,0,0.3); + border-radius: 0 0 3px 3px; +} +.iziToast.iziToast-balloon:before { + content: ''; + position: absolute; + right: 8px; + left: auto; + width: 0px; + height: 0px; + top: 100%; + border-right: 0px solid transparent; + border-left: 15px solid transparent; + border-top: 10px solid #000; + border-top-color: inherit; + border-radius: 0; +} +.iziToast.iziToast-balloon .iziToast-progressbar { + top: 0; + bottom: auto; +} +.iziToast.iziToast-balloon > div { + border-radius: 0 0 0 3px; +} +.iziToast > .iziToast-cover { + position: absolute; + left: 0; + top: 0; + bottom: 0; + height: 100%; + margin: 0; + background-size: 100%; + background-position: 50% 50%; + background-repeat: no-repeat; + background-color: rgba(0,0,0,0.1); +} +.iziToast > .iziToast-close { + position: absolute; + right: 0; + top: 0; + border: 0; + padding: 0; + opacity: 0.6; + width: 42px; + height: 100%; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAJPAAACTwBcGfW0QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAD3SURBVFiF1ZdtDoMgDEBfdi4PwAX8vLFn0qT7wxantojKupmQmCi8R4tSACpgjC2ICCUbEBa8ingjsU1AXRBeR8aLN64FiknswN8CYefBBDQ3whuFESy7WyQMeC0ipEI0A+0FeBvHUFN8xPaUhAH/iKoWsnXHGegy4J0yxialOfaHJAz4bhRzQzgDvdGnz4GbAonZbCQMuBm1K/kcFu8Mp1N2cFFpsxsMuJqqbIGExGl4loARajU1twskJLLhIsID7+tvUoDnIjTg5T9DPH9EBrz8rxjPzciAl9+O8SxI8CzJ8CxKFfh3ynK8Dyb8wNHM/XDqejx/AtNyPO87tNybAAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 8px; + cursor: pointer; + outline: none; +} +.iziToast > .iziToast-close:hover { + opacity: 1; +} +.iziToast > .iziToast-body { + position: relative; + padding: 0 0 0 10px; + height: auto; + min-height: 36px; + margin: 0 0 0 15px; + text-align: left; +} +.iziToast > .iziToast-body:after { + content: ""; + display: table; + clear: both; +} +.iziToast > .iziToast-body .iziToast-texts { + margin: 10px 0 0 0; + padding-right: 2px; + display: inline-block; + float: left; +} +.iziToast > .iziToast-body .iziToast-inputs { + min-height: 19px; + float: left; + margin: 3px -2px; +} +.iziToast > .iziToast-body .iziToast-inputs > input:not([type=checkbox]):not([type=radio]), +.iziToast > .iziToast-body .iziToast-inputs > select { + position: relative; + display: inline-block; + margin: 2px; + border-radius: 2px; + border: 0; + padding: 4px 7px; + font-size: 13px; + letter-spacing: 0.02em; + background: rgba(0,0,0,0.1); + color: #000; + box-shadow: 0 0 0 1px rgba(0,0,0,0.2); + min-height: 26px; +} +.iziToast > .iziToast-body .iziToast-inputs > input:not([type=checkbox]):not([type=radio]):focus, +.iziToast > .iziToast-body .iziToast-inputs > select:focus { + box-shadow: 0 0 0 1px rgba(0,0,0,0.6); +} +.iziToast > .iziToast-body .iziToast-buttons { + min-height: 17px; + float: left; + margin: 4px -2px; +} +.iziToast > .iziToast-body .iziToast-buttons > a, +.iziToast > .iziToast-body .iziToast-buttons > button, +.iziToast > .iziToast-body .iziToast-buttons > input:not([type=checkbox]):not([type=radio]) { + position: relative; + display: inline-block; + margin: 2px; + border-radius: 2px; + border: 0; + padding: 5px 10px; + font-size: 12px; + letter-spacing: 0.02em; + cursor: pointer; + background: rgba(0,0,0,0.1); + color: #000; +} +.iziToast > .iziToast-body .iziToast-buttons > a:hover, +.iziToast > .iziToast-body .iziToast-buttons > button:hover, +.iziToast > .iziToast-body .iziToast-buttons > input:not([type=checkbox]):not([type=radio]):hover { + background: rgba(0,0,0,0.2); +} +.iziToast > .iziToast-body .iziToast-buttons > a:focus, +.iziToast > .iziToast-body .iziToast-buttons > button:focus, +.iziToast > .iziToast-body .iziToast-buttons > input:not([type=checkbox]):not([type=radio]):focus { + box-shadow: 0 0 0 1px rgba(0,0,0,0.6); +} +.iziToast > .iziToast-body .iziToast-buttons > a:active, +.iziToast > .iziToast-body .iziToast-buttons > button:active, +.iziToast > .iziToast-body .iziToast-buttons > input:not([type=checkbox]):not([type=radio]):active { + top: 1px; +} +.iziToast > .iziToast-body .iziToast-icon { + height: 100%; + position: absolute; + left: 0; + top: 50%; + display: table; + font-size: 23px; + line-height: 24px; + margin-top: -12px; + color: #000; + width: 24px; + height: 24px; +} +.iziToast > .iziToast-body .iziToast-icon.ico-info { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCtoPsAAAAKXRSTlMA6PsIvDob+OapavVhWRYPrIry2MxGQ97czsOzpJaMcE0qJQOwVtKjfxCVFeIAAAI3SURBVFjDlJPZsoIwEETnCiGyb8q+qmjl/3/wFmGKwjBROS9QWbtnOqDDGPq4MdMkSc0m7gcDDhF4NRdv8NoL4EcMpzoJglPl/KTDz4WW3IdvXEvxkfIKn7BMZb1bFK4yZFqghZ03jk0nG8N5NBwzx9xU5cxAg8fXi20/hDdC316lcA8o7t16eRuQvW1XGd2d2P8QSHQDDbdIII/9CR3lUF+lbucfJy4WfMS64EJPORnrZxtfc2pjJdnbuags3l04TTtJMXrdTph4Pyg4XAjugAJqMDf5Rf+oXx2/qi4u6nipakIi7CsgiuMSEF9IGKg8heQJKkxIfFSUU/egWSwNrS1fPDtLfon8sZOcYUQml1Qv9a3kfwsEUyJEMgFBKzdV8o3Iw9yAjg1jdLQCV4qbd3no8yD2GugaC3oMbF0NYHCpJYSDhNI5N2DAWB4F4z9Aj/04Cna/x7eVAQ17vRjQZPh+G/kddYv0h49yY4NWNDWMMOMUIRYvlTECmrN8pUAjo5RCMn8KoPmbJ/+Appgnk//Sy90GYBCGgm7IAskQ7D9hFKW4ApB1ei3FSYD9PjGAKygAV+ARFYBH5BsVgG9kkBSAQWKUFYBRZpkUgGVinRWAdUZQDABBQdIcAElDVBUAUUXWHQBZx1gMAGMprM0AsLbVXHsA5trZe93/wp3svQ0YNb/jWV3AIOLsMtlznSNOH7JqjOpDVh7z8qCZR10ftvO4nxeOvPLkpSuvfXnxzKtvXr7j+v8C5ii0e71At7cAAAAASUVORK5CYII=") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast > .iziToast-body .iziToast-icon.ico-warning { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAMAAAAPzWOAAAAAkFBMVEUAAAAAAAABAAIAAAABAAIAAAMAAAABAAIBAAIBAAIAAAIAAAABAAIAAAABAAICAAICAAIAAAIAAAAAAAAAAAABAAIBAAIAAAMAAAABAAIBAAMBAAECAAIAAAIAAAIAAAABAAIBAAIBAAMBAAIBAAEAAAIAAAMAAAAAAAABAAECAAICAAIAAAIAAAMAAAQAAAE05yNAAAAAL3RSTlMAB+kD7V8Q+PXicwv7I9iYhkAzJxnx01IV5cmnk2xmHfzexsK4eEw5L7Gei39aRw640awAAAHQSURBVFjD7ZfJdoJAEEWJgCiI4oDiPM8m7///LidErRO7sHrY5u7YXLr7vKqu9kTC0HPmo9n8cJbEQOzqqAdAUHeUZACQuTkGDQBoDJwkHZR0XBz9FkpafXuHP0SJ09mGeJLZ5wwlTmcbA0THPmdEK7XPGTG1zxmInn3OiJ19zkB0jSVTKExMHT0wjAwlWzC0fSPHF1gWRpIhWMYm7fYTFcQGlbemf4dFfdTGg0B/KXM8qBU/3wntbq7rSGqvJ9kla6IpueFJet8fxfem5yhykjyOgNaWF1qSGd5JMNNxpNF7SZQaVh5JzLrTCZIEJ1GyEyVyd+pClMjdaSJK5O40giSRu5PfFiVyd1pAksjdKRnrSsbVdbiHrgT7yss315fkVQPLFQrL+4FHeOXKO5YRFEKv5AiFaMlKLlBpJuVCJlC5sJfvCgztru/3NmBYccPgGTxRAzxn1XGEMUf58pXZvjoOsOCgjL08+b53mtfAM/SVsZcjKLtysQZPqIy9HPP3m/3zKItRwT0LyQo8sTr26tcO83DIUMWIJjierHLsJda/tbNBFY0BP/bKtcM8HNIWCK3aYR4OMzgxo5w5EFLOLKDExXAm9gI4E3iAO94/Ct/lKWuM2LMGbgAAAABJRU5ErkJggg==") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast > .iziToast-body .iziToast-icon.ico-error { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVyEiIAAAAJ3RSTlMA3BsB98QV8uSyWVUFz7+kcWMM2LuZioBpTUVBNcq2qaibj4d1azLZZYABAAACZElEQVRYw7WX25KCMAyGAxUoFDkpiohnV97/DXeGBtoOUprZ2dyo1K82fxKbwJJVp+KQZ7so2mX5oThVQLKwjDe9YZu4DF3ptAn6rxY0qQPOEq9fNC9ha3y77a22ba24v+9Xbe8v8x03dPOC2/NdvB6xeSreLfGJpnx0TyotKqLm2s7Jd/WO6ivXNp0tCy02R/aFz5VQ5wUPlUL5fIfj5KIlVGU0nWHm/5QtoTVMWY8mzIVu1K9O7XH2JiU/xnOOT39gnUfj+lFHddx4tFjL3/H8jjzaFCy2Rf0c/fdQyQszI8BDR973IyMSKa4krjxAiW/lkRvMP+bKK9WbYS1ASQg8dKjaUGlYPwRe/WoIkz8tiQchH5QAEMv6T0k8MD4mUyWr4E7jAWqZ+xWcMIYkXvlwggJ3IvFK+wIOcpXAo8n8P0COAaXyKH4OsjBuZB4ew0IGu+H1SebhNazsQBbWm8yj+hFuUJB5eMsN0IUXmYendAFFfJB5uEkRMYwxmcd6zDGRtmQePEykAgubymMRFmMxCSIPCRbTuFNN5OGORTjmNGc0Po0m8Uv0gcCry6xUhR2QeLii9tofbEfhz/qvNti+OfPqNm2Mq6105FUMvdT4GPmufMiV8PqBMkc+DdT1bjYYbjzU/ew23VP4n3mLAz4n8Jtv/Ui3ceTT2mzz5o1mZt0gnBpmsdjqRqVlmplcPdqa7X23kL9brdm2t/uBYDPn2+tyu48mtIGD10JTuUrukVrbCFiwDzcHrPjxKt7PW+AZQyT/WESO+1WL7f3o+WLHL2dYMSZsg6dg/z360ofvP4//v1NPzgs28WlWAAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 80%; +} +.iziToast > .iziToast-body .iziToast-icon.ico-success { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABt0UjBAAAACnRSTlMApAPhIFn82wgGv8mVtwAAAKVJREFUSMft0LEJAkEARNFFFEw1NFJb8CKjAy1AEOzAxNw+bEEEg6nyFjbY4LOzcBwX7S/gwUxoTdIn+Jbv4Lv8bx446+kB6VsBtK0B+wbMCKxrwL33wOrVeeChX28n7KTOTjgoEu6DRSYAgAAAAkAmAIAAAAIACQIkMkACAAgAIACAyECBKAOJuCagTJwSUCaUAEMAABEBRwAAEQFLbCJgO4bW+AZKGnktR+jAFAAAAABJRU5ErkJggg==") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast > .iziToast-body .iziToast-icon.ico-question { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhCQkUEhFovxTxAAAEDklEQVRo3s2ZTWgTQRTHf03ipTRUqghNSgsRjHgQrFUQC6JgD1Kak3gQUUoPqRdBglf1oBehBws9Cn4cGk+1SOmh2upBxAYVoeJHrR9tgq0i1Cq0lqYeks7MbpPdmU00/c8hm9n33v/t7Nt5M2+qMEWQI0QIibZKRrQpHvLL2KI2wnQzzBKrDm2RIeKEy01dTYKUI7G1ZRknQXV5yP10kTYgly1NF/5S6duZ8ES+1iZodyaocrjXxE0OFeifYYgp0mRIkwFChAkRJsIxGgrIP+I0n82fvZW5dc/zkss0O2o1c5mX6/TmaDWl77RFe5YkUW3tKEmyFv0lOvXJ/fTYnmCEFuMRbGHEZqVHLyT9DFjUJmkzJl9DG5MWWwM6Llif/gF1nukB6nhgGwUXdFrE+wiURA8QoM9i0zEWWpXQW+ZsyeRrOMuyEo5Fv4gmy4dXPvqcC+pH2VRYaMwy+OWG+iLGCgm0W0Kv9HdvR8ASjmKCXpuK/bxiV/76A/v5UdDIZuKcJGjrnec5KZ7wwsWFOp6xPX/9mt2sqDe7FO+Kf/fXHBPPDWpdXGhTpLvUG9VKwh1xMDDjkvu+cNDFBTk7ptX1QkKZ850m3duu6fcrWxwdaFFyREJ2j4vOpKP6Du6z4uJCv8sYJIVkCnJBGGZaBONO3roY2EqNrSfIPi7SKP4fdXyNUd6I6wbSAHEl33tFLe+FlSsusnK90A0+oEPcuufZgXnOi+u9LrKSJQZQw6LwqBnv2CKsfHORbFbyQhA6xN/pEuihSdj56Co7LWRjPiKie6gkB2LiKuUqK5kiPkLiz1QJ9K1cNXBAMoUCigNpQ9IqDtMI1HKA4/jyvUsaoSyZLA5kjOjDPFZen8Ql5TsvBskUgjciIPSX3QAXC86DT7VWvlEh/xZ+ij9BDVWJ0QL0SbZq6QaFxoLPcXPmBLveLCc4wXdDK6s+6/vwhCSniFLPXW0NJe5UB8zKCsviqpc7vGPVQFcyZbyPwGD+d5ZnxmNWlhG4xSBZZjivjIWHEQgoDkSMjMwTo54569JSE5IpA7EyJSMTyGTUAUFlO1ZKOtaHTMeL1PhYYFTcihmY2cQ5+ullj7EDkiVfVez2sCTz8yiv84djhg7IJVk81xFWJlPdfHBG0flkRC/zQFZ+DSllNtfDdUsOMCliyGX5uOzU3ZhIXFDof4m1gDuKbEx0t2YS25gVGpcMnr/I1kx3c6piB8P8ZoqEwfMX3ZyCXynJTmq/U7NUXqfUzCbWL1wqVKBQUeESzQYoUlW8TAcVL1RCxUu1G6BYXfFyfQ4VPbDI4T8d2WzgQ6sc/vmxnTsqfHCZQzUJxm1h5dxS5Tu6lQgTZ0ipqRVqSwzTbbLHMt+c19iO76tsx/cLZub+Ali+tYC93olEAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA5LTA5VDIwOjE4OjE3KzAyOjAwjKtfjgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOS0wOVQyMDoxODoxNyswMjowMP325zIAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast > .iziToast-body .iziToast-title { + padding: 0; + margin: 0; + line-height: 16px; + font-size: 14px; + text-align: left; + float: left; + color: #000; + white-space: normal; +} +.iziToast > .iziToast-body .iziToast-message { + padding: 0; + margin: 0 0 10px 0; + font-size: 14px; + line-height: 16px; + text-align: left; + float: left; + color: rgba(0,0,0,0.6); + white-space: normal; +} +.iziToast.iziToast-animateInside .iziToast-title, +.iziToast.iziToast-animateInside .iziToast-message, +.iziToast.iziToast-animateInside .iziToast-icon, +.iziToast.iziToast-animateInside .iziToast-buttons-child, +.iziToast.iziToast-animateInside .iziToast-inputs-child { + opacity: 0; +} +.iziToast-target { + position: relative; + width: 100%; + margin: 0 auto; +} +.iziToast-target .iziToast-capsule { + overflow: hidden; +} +.iziToast-target .iziToast-capsule:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +.iziToast-target .iziToast-capsule .iziToast { + width: 100%; + float: left; +} +.iziToast-wrapper { + z-index: 99999; + position: fixed; + width: 100%; + pointer-events: none; + display: flex; + flex-direction: column; +} +.iziToast-wrapper .iziToast.iziToast-balloon:before { + border-right: 0 solid transparent; + border-left: 15px solid transparent; + border-top: 10px solid #000; + border-top-color: inherit; + right: 8px; + left: auto; +} +.iziToast-wrapper-bottomLeft { + left: 0; + bottom: 0; + text-align: left; +} +.iziToast-wrapper-bottomLeft .iziToast.iziToast-balloon:before { + border-right: 15px solid transparent; + border-left: 0 solid transparent; + right: auto; + left: 8px; +} +.iziToast-wrapper-bottomRight { + right: 0; + bottom: 0; + text-align: right; +} +.iziToast-wrapper-topLeft { + left: 0; + top: 0; + text-align: left; +} +.iziToast-wrapper-topLeft .iziToast.iziToast-balloon:before { + border-right: 15px solid transparent; + border-left: 0 solid transparent; + right: auto; + left: 8px; +} +.iziToast-wrapper-topRight { + top: 0; + right: 0; + text-align: right; +} +.iziToast-wrapper-topCenter { + top: 0; + left: 0; + right: 0; + text-align: center; +} +.iziToast-wrapper-bottomCenter { + bottom: 0; + left: 0; + right: 0; + text-align: center; +} +.iziToast-wrapper-center { + top: 0; + bottom: 0; + left: 0; + right: 0; + text-align: center; + justify-content: center; + flex-flow: column; + align-items: center; +} +.iziToast-rtl { + direction: rtl; + padding: 8px 0 9px 45px; + font-family: Tahoma, 'Lato', Arial; +} +.iziToast-rtl .iziToast-cover { + left: auto; + right: 0; +} +.iziToast-rtl .iziToast-close { + right: auto; + left: 0; +} +.iziToast-rtl .iziToast-body { + padding: 0 10px 0 0; + margin: 0 16px 0 0; + text-align: right; +} +.iziToast-rtl .iziToast-body .iziToast-buttons, +.iziToast-rtl .iziToast-body .iziToast-inputs, +.iziToast-rtl .iziToast-body .iziToast-texts, +.iziToast-rtl .iziToast-body .iziToast-title, +.iziToast-rtl .iziToast-body .iziToast-message { + float: right; + text-align: right; +} +.iziToast-rtl .iziToast-body .iziToast-icon { + left: auto; + right: 0; +} +@media only screen and (min-width: 568px) { + .iziToast-wrapper { + padding: 10px 15px; + } + .iziToast { + margin: 5px 0; + border-radius: 3px; + width: auto; + } + .iziToast:after { + content: ''; + z-index: -1; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 3px; + box-shadow: inset 0 -10px 20px -10px rgba(0,0,0,0.2), inset 0 0 5px rgba(0,0,0,0.1), 0 8px 8px -5px rgba(0,0,0,0.25); + } + .iziToast:not(.iziToast-rtl) .iziToast-cover { + border-radius: 3px 0 0 3px; + } + .iziToast.iziToast-rtl .iziToast-cover { + border-radius: 0 3px 3px 0; + } + .iziToast.iziToast-color-dark:after { + box-shadow: inset 0 -10px 20px -10px rgba(255,255,255,0.3), 0 10px 10px -5px rgba(0,0,0,0.25); + } + .iziToast.iziToast-balloon .iziToast-progressbar { + background: transparent; + } + .iziToast.iziToast-balloon:after { + box-shadow: 0 10px 10px -5px rgba(0,0,0,0.25), inset 0 10px 20px -5px rgba(0,0,0,0.25); + } + .iziToast-target .iziToast:after { + box-shadow: inset 0 -10px 20px -10px rgba(0,0,0,0.2), inset 0 0 5px rgba(0,0,0,0.1); + } +} +.iziToast.iziToast-theme-dark { + background: #565c70; + border-color: #565c70; +} +.iziToast.iziToast-theme-dark .iziToast-title { + color: #fff; +} +.iziToast.iziToast-theme-dark .iziToast-message { + color: rgba(255,255,255,0.7); + font-weight: 300; +} +.iziToast.iziToast-theme-dark .iziToast-close { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfgCR4OIQIPSao6AAAAwElEQVRIx72VUQ6EIAwFmz2XB+AConhjzqTJ7JeGKhLYlyx/BGdoBVpjIpMJNjgIZDKTkQHYmYfwmR2AfAqGFBcO2QjXZCd24bEggvd1KBx+xlwoDpYmvnBUUy68DYXD77ESr8WDtYqvxRex7a8oHP4Wo1Mkt5I68Mc+qYqv1h5OsZmZsQ3gj/02h6cO/KEYx29hu3R+VTTwz6D3TymIP1E8RvEiiVdZfEzicxYLiljSxKIqlnW5seitTW6uYnv/Aqh4whX3mEUrAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA5LTMwVDE0OjMzOjAyKzAyOjAwl6RMVgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wOS0zMFQxNDozMzowMiswMjowMOb59OoAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 8px; +} +.iziToast.iziToast-theme-dark .iziToast-icon { + color: #fff; +} +.iziToast.iziToast-theme-dark .iziToast-icon.ico-info { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////vroaSAAAAKXRSTlMA6PsIvDob+OapavVhWRYPrIry2MxGQ97czsOzpJaMcE0qJQOwVtKjfxCVFeIAAAI3SURBVFjDlJPZsoIwEETnCiGyb8q+qmjl/3/wFmGKwjBROS9QWbtnOqDDGPq4MdMkSc0m7gcDDhF4NRdv8NoL4EcMpzoJglPl/KTDz4WW3IdvXEvxkfIKn7BMZb1bFK4yZFqghZ03jk0nG8N5NBwzx9xU5cxAg8fXi20/hDdC316lcA8o7t16eRuQvW1XGd2d2P8QSHQDDbdIII/9CR3lUF+lbucfJy4WfMS64EJPORnrZxtfc2pjJdnbuags3l04TTtJMXrdTph4Pyg4XAjugAJqMDf5Rf+oXx2/qi4u6nipakIi7CsgiuMSEF9IGKg8heQJKkxIfFSUU/egWSwNrS1fPDtLfon8sZOcYUQml1Qv9a3kfwsEUyJEMgFBKzdV8o3Iw9yAjg1jdLQCV4qbd3no8yD2GugaC3oMbF0NYHCpJYSDhNI5N2DAWB4F4z9Aj/04Cna/x7eVAQ17vRjQZPh+G/kddYv0h49yY4NWNDWMMOMUIRYvlTECmrN8pUAjo5RCMn8KoPmbJ/+Appgnk//Sy90GYBCGgm7IAskQ7D9hFKW4ApB1ei3FSYD9PjGAKygAV+ARFYBH5BsVgG9kkBSAQWKUFYBRZpkUgGVinRWAdUZQDABBQdIcAElDVBUAUUXWHQBZx1gMAGMprM0AsLbVXHsA5trZe93/wp3svQ0YNb/jWV3AIOLsMtlznSNOH7JqjOpDVh7z8qCZR10ftvO4nxeOvPLkpSuvfXnxzKtvXr7j+v8C5ii0e71At7cAAAAASUVORK5CYII=") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast.iziToast-theme-dark .iziToast-icon.ico-warning { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAMAAAAPzWOAAAAAllBMVEUAAAD////+//3+//3+//3///////z+//3+//3+//3////////////9//3////+//39//3///3////////////+//3+//39//3///z+//z+//7///3///3///3///3////////+//3+//3+//3+//z+//3+//7///3///z////////+//79//3///3///z///v+//3///+trXouAAAAMHRSTlMAB+j87RBf+PXiCwQClSPYhkAzJxnx05tSyadzcmxmHRbp5d7Gwrh4TDkvsYt/WkdQzCITAAAB1UlEQVRYw+3XaXKCQBCGYSIIighoxCVqNJrEPfly/8vFImKXduNsf/Mc4K1y7FnwlMLQc/bUbj85R6bA1LXRDICg6RjJcZa7NQYtnLUGTpERSiOXxrOPkv9s30iGKDmtbYir3H7OUHJa2ylAuvZzRvzUfs7Ii/2cgfTt54x82s8ZSM848gJmYtroQzA2jHwA+LkBIEuMGt+QIng1igzlyMrkuP2CyOi47axRaYTL5jhDJehoR+aovC29s3iIyly3Eb+hRCvZo2qsGTnhKr2cLDS+J73GsqBI9W80UCmWWpEuhIjh6ZRGjyNRarjzKGJ2Ou2himCvjHwqI+rTqQdlRH06TZQR9ek0hiqiPp06mV4ke7QPX6ERUZxO8Uo3sqrfhxvoRrCpvXwL/UjR9GRHMIvLgke4d5QbiwhM6JV2YKKF4vIl7XIBkwm4keryJVmvk/TfwcmPwQNkUQuyA2/sYGwnXL7GPu4bW1jYsmevrNj09/MGZMOEPXslQVqO8hqykD17JfPHP/bmo2yGGpdZiH3IZvzZa7B3+IdDjjpjesHJcvbs5dZ/e+cddVoDdvlq7x12Nac+iN7e4R8OXTjp0pw5CGnOLNDEzeBs5gVwFniAO+8f8wvfeXP2hyqnmwAAAABJRU5ErkJggg==") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast.iziToast-theme-dark .iziToast-icon.ico-error { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMA3BsB98QV8uSyWVUFz6RxYwzYvbupmYqAaU1FQTXKv7abj4d1azKNUit3AAACZElEQVRYw7WXaZOCMAyGw30UORRQBLxX/v8/3BkaWjrY2szO5otKfGrzJrEp6Kw6F8f8sI+i/SE/FucKSBaWiT8p5idlaEtnXTB9tKDLLHAvdSatOan3je93k9F2vRF36+mr1a6eH2NFNydoHq/ieU/UXcWjjk9XykdNWq2ywtp4tXL6Wb2T/MqtzzZutsrNyfvA51KoQROhVCjfrnASIRpSVUZiD5v4RbWExjRdJzSmOsZFvzYz59kRSr6V5zE+/QELHkNdb3VRx45HS1b1u+zfkkcbRAZ3qJ9l/A4qefHUDMShJe+6kZKJDD2pLQ9Q4lu+5Q7rz7Plperd7AtQEgIPI6o2dxr2D4GXvxqCiKcn8cD4gxIAEt7/GYkHL16KqeJd0NB4gJbXfgVnzCGJlzGcocCVSLzUvoAj9xJ4NF7/R8gxoVQexc/hgBpSebjPjgPs59cHmYfn7NkDb6wXmUf1I1ygIPPw4gtgCE8yDw8eAop4J/PQcBExjQmZx37MsZB2ZB4cLKQCG5vKYxMWSzMxIg8pNtOyUkvkocEmXGo69mh8FgnxS4yBwMvDrJSNHZB4uC3ayz/YkcIP4lflwVIT+OU07ZSjrbTkZQ6dTPkYubZ8GC/Cqxu6WvJZII93dcCw46GdNqdpTeF/tiMOuDGB9z/NI6NvyWetGPM0g+bVNeovBmamHXWj0nCbEaGeTMN2PWrqd6cM26ZxP2DeJvj+ph/30Zi/GmRbtlK5SptI+nwGGnvH6gUruT+L16MJHF+58rwNIifTV0vM8+hwMeOXAb6Yx0wXT+b999WXfvn+8/X/F7fWzjdTord5AAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 80%; +} +.iziToast.iziToast-theme-dark .iziToast-icon.ico-success { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMApAPhIFn82wgGv8mVtwAAAKVJREFUSMft0LEJAkEARNFFFEw1NFJb8CKjAy1AEOzAxNw+bEEEg6nyFjbY4LOzcBwX7S/gwUxoTdIn+Jbv4Lv8bx446+kB6VsBtK0B+wbMCKxrwL33wOrVeeChX28n7KTOTjgoEu6DRSYAgAAAAkAmAIAAAAIACQIkMkACAAgAIACAyECBKAOJuCagTJwSUCaUAEMAABEBRwAAEQFLbCJgO4bW+AZKGnktR+jAFAAAAABJRU5ErkJggg==") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast.iziToast-theme-dark .iziToast-icon.ico-question { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhCQkUEg18vki+AAAETUlEQVRo3s1ZTWhbRxD+VlIuxsLFCYVIIQYVopBDoK5bKDWUBupDMNbJ5FBKg/FBziUQdE9yaC+FHBrwsdCfQ9RTGoLxwWl+DqHEojUFFydxnB9bInZDqOsErBrr6yGvs/ueX97bldTKo4Pe7puZb3Z33s7srIIjMY1jyCEjP6ImvyX8pF64arSHznKC06wzijY5xSKz7YbuYokV2lODsyyxqz3gSY6z6gCuqcpxJluFH+Z8U+D/0jyHoxFUBHgfvsGHIS9WMIUlVFFDFTUAGWSRQRY5HMeBEP6b+Ew9dh/7INd2jGeO59kfKdXP85zbIbfGQVf4sYC3N1hm3lo6zzIbPvk6x+zBk7wQGMEMB5xncIAzAS0XrFySSV72iS1yyBVcdA1x0afrsoUJgdFfY2+z8ADAXl7zz0KcwJiPfZKpVuABgClO+nRG+QIHDdfb4qlWwUXvKW4Z7vi6L4J9vg+vbfCeCeZH2RfOdMOc/HbCA4BvIW6EMQz7XK/ltd+hP+VzR9mgva2YSfyGI17fA7ynnocqeQNFfIJ0oHsdv6CC2+rXGBN6cQdveY3fcVRtmy/HDete+93zy8jA8zV7YkwYMrjHzRddRsCdiVCwwmh6wg9iTNC7Y9XIF1iS7kbUpsvvGEdPuTfSgAEjRpR096x0liPFD/Eqt2NMuBQzB2XhrACAApjFsuQFh9XdGAX70B3oSuNdnMVBaX+sopYxjwVpHFBVACyKTXNoktjD+6Ll8xhenS9MAAkAI/Lux2YNUOs4I413Ypg1SgEAu7kpFvWjaeJe0fJHDGe/cNaZBkekudw8PMA+0fMwlndZeAsJ5KR/qhUDUJCnSiyvRsolkJHGUgvjH8QXDgZopEzKMKDqCKrwEQ4C6MH7GEXC665buLJG8hlQc4LP4paxfJrOqYVYYY2UARfEIazTbgDg2dB98GebzJd54b8L/iWNdLyooeR6CHyZ+6xk0yKxkYg6nEVSUG4VJ9QJ9cxRCxO+9WiOyvgUeexXP1hLGH5nGuBWVtiSp4vqe3VP0UFWI9Wan4Er3v8q7jjPWVtm4FtcQQMrOKO2nOQCM5AyDMi56FDrKHA/1nyppS1ppBpYaE8wciEjGI2AaeM41kI4doDX4XiT3Qm1gevyruCgZg9P8xIv8m1nCzTKq6oiJ9xTMiZ505P5m8cdZ0CnZMVXHVljM7WMBzxpyDxygtdxoCEFTaMIWbZU85UvBjgUMYy0fBaAF8V1Lj9qWQ1aMZ5f4k9r+AGMSkMP1vZoZih6k6sicc5h/OFHM9vDqU/VIU7zJZdYYsKGH4g4nAJMGiXZRds1pVMoZ69RM5vfkbh0qkBhsnS2RLMLilQdL9MBHS9UAh0v1e6CYnXHy/WeeCcvLDwl/9OVze69tPKM+M+v7eJN6OzFpWdEF0ucDbhVNFXadnVrmJFlkVNGTS2M6pzmhMvltfPhnN2B63sVuL7fcNP3D1TSk2ihosPrAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA5LTA5VDIwOjE4OjEzKzAyOjAweOR7nQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOS0wOVQyMDoxODoxMyswMjowMAm5wyEAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC") no-repeat 50% 50%; + background-size: 85%; +} +.iziToast.iziToast-theme-dark .iziToast-buttons > a, +.iziToast.iziToast-theme-dark .iziToast-buttons > button, +.iziToast.iziToast-theme-dark .iziToast-buttons > input { + color: #fff; + background: rgba(255,255,255,0.1); +} +.iziToast.iziToast-theme-dark .iziToast-buttons > a:hover, +.iziToast.iziToast-theme-dark .iziToast-buttons > button:hover, +.iziToast.iziToast-theme-dark .iziToast-buttons > input:hover { + background: rgba(255,255,255,0.2); +} +.iziToast.iziToast-theme-dark .iziToast-buttons > a:focus, +.iziToast.iziToast-theme-dark .iziToast-buttons > button:focus, +.iziToast.iziToast-theme-dark .iziToast-buttons > input:focus { + box-shadow: 0 0 0 1px rgba(255,255,255,0.6); +} +.iziToast.iziToast-color-red { + background: rgba(255,175,180,0.9); + border-color: rgba(255,175,180,0.9); +} +.iziToast.iziToast-color-orange { + background: rgba(255,207,165,0.9); + border-color: rgba(255,207,165,0.9); +} +.iziToast.iziToast-color-yellow { + background: rgba(255,249,178,0.9); + border-color: rgba(255,249,178,0.9); +} +.iziToast.iziToast-color-blue { + background: rgba(157,222,255,0.9); + border-color: rgba(157,222,255,0.9); +} +.iziToast.iziToast-color-green { + background: rgba(166,239,184,0.9); + border-color: rgba(166,239,184,0.9); +} +.iziToast.iziToast-layout2 .iziToast-body .iziToast-texts, +.iziToast.iziToast-layout2 .iziToast-body .iziToast-message { + width: 100%; +} +.iziToast.iziToast-layout3 { + border-radius: 2px; +} +.iziToast.iziToast-layout3::after { + display: none; +} +.iziToast.revealIn, +.iziToast .revealIn { + -webkit-animation: iziT-revealIn 1s cubic-bezier(0.25, 1.6, 0.25, 1) both; + -moz-animation: iziT-revealIn 1s cubic-bezier(0.25, 1.6, 0.25, 1) both; + animation: iziT-revealIn 1s cubic-bezier(0.25, 1.6, 0.25, 1) both; +} +.iziToast.slideIn, +.iziToast .slideIn { + -webkit-animation: iziT-slideIn 1s cubic-bezier(0.16, 0.81, 0.32, 1) both; + -moz-animation: iziT-slideIn 1s cubic-bezier(0.16, 0.81, 0.32, 1) both; + animation: iziT-slideIn 1s cubic-bezier(0.16, 0.81, 0.32, 1) both; +} +.iziToast.bounceInLeft { + -webkit-animation: iziT-bounceInLeft 0.7s ease-in-out both; + animation: iziT-bounceInLeft 0.7s ease-in-out both; +} +.iziToast.bounceInRight { + -webkit-animation: iziT-bounceInRight 0.85s ease-in-out both; + animation: iziT-bounceInRight 0.85s ease-in-out both; +} +.iziToast.bounceInDown { + -webkit-animation: iziT-bounceInDown 0.7s ease-in-out both; + animation: iziT-bounceInDown 0.7s ease-in-out both; +} +.iziToast.bounceInUp { + -webkit-animation: iziT-bounceInUp 0.7s ease-in-out both; + animation: iziT-bounceInUp 0.7s ease-in-out both; +} +.iziToast.fadeIn, +.iziToast .fadeIn { + -webkit-animation: iziT-fadeIn 0.5s ease both; + animation: iziT-fadeIn 0.5s ease both; +} +.iziToast.fadeInUp { + -webkit-animation: iziT-fadeInUp 0.7s ease both; + animation: iziT-fadeInUp 0.7s ease both; +} +.iziToast.fadeInDown { + -webkit-animation: iziT-fadeInDown 0.7s ease both; + animation: iziT-fadeInDown 0.7s ease both; +} +.iziToast.fadeInLeft { + -webkit-animation: iziT-fadeInLeft 0.85s cubic-bezier(0.25, 0.8, 0.25, 1) both; + animation: iziT-fadeInLeft 0.85s cubic-bezier(0.25, 0.8, 0.25, 1) both; +} +.iziToast.fadeInRight { + -webkit-animation: iziT-fadeInRight 0.85s cubic-bezier(0.25, 0.8, 0.25, 1) both; + animation: iziT-fadeInRight 0.85s cubic-bezier(0.25, 0.8, 0.25, 1) both; +} +.iziToast.flipInX { + -webkit-animation: iziT-flipInX 0.85s cubic-bezier(0.35, 0, 0.25, 1) both; + animation: iziT-flipInX 0.85s cubic-bezier(0.35, 0, 0.25, 1) both; +} +.iziToast.fadeOut { + -webkit-animation: iziT-fadeOut 0.7s ease both; + animation: iziT-fadeOut 0.7s ease both; +} +.iziToast.fadeOutDown { + -webkit-animation: iziT-fadeOutDown 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; + animation: iziT-fadeOutDown 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; +} +.iziToast.fadeOutUp { + -webkit-animation: iziT-fadeOutUp 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; + animation: iziT-fadeOutUp 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; +} +.iziToast.fadeOutLeft { + -webkit-animation: iziT-fadeOutLeft 0.5s ease both; + animation: iziT-fadeOutLeft 0.5s ease both; +} +.iziToast.fadeOutRight { + -webkit-animation: iziT-fadeOutRight 0.5s ease both; + animation: iziT-fadeOutRight 0.5s ease both; +} +.iziToast.flipOutX { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation: iziT-flipOutX 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; + animation: iziT-flipOutX 0.7s cubic-bezier(0.4, 0.45, 0.15, 0.91) both; +} +.iziToast-overlay.fadeIn { + -webkit-animation: iziT-fadeIn 0.5s ease both; + animation: iziT-fadeIn 0.5s ease both; +} +.iziToast-overlay.fadeOut { + -webkit-animation: iziT-fadeOut 0.7s ease both; + animation: iziT-fadeOut 0.7s ease both; +} +@-webkit-keyframes iziT-revealIn { + 0% { + opacity: 0; + -webkit-transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@-moz-keyframes iziT-revealIn { + 0% { + opacity: 0; + -moz-transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@-webkit-keyframes iziT-slideIn { + 0% { + opacity: 0; + -webkit-transform: translateX(50px); + } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + } +} +@-moz-keyframes iziT-slideIn { + 0% { + opacity: 0; + -moz-transform: translateX(50px); + } + 100% { + opacity: 1; + -moz-transform: translateX(0); + } +} +@-webkit-keyframes iziT-bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(280px); + } + 50% { + opacity: 1; + -webkit-transform: translateX(-20px); + } + 70% { + -webkit-transform: translateX(10px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-webkit-keyframes iziT-bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(-280px); + } + 50% { + opacity: 1; + -webkit-transform: translateX(20px); + } + 70% { + -webkit-transform: translateX(-10px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-webkit-keyframes iziT-bounceInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-200px); + } + 50% { + opacity: 1; + -webkit-transform: translateY(10px); + } + 70% { + -webkit-transform: translateY(-5px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-webkit-keyframes iziT-bounceInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(200px); + } + 50% { + opacity: 1; + -webkit-transform: translateY(-10px); + } + 70% { + -webkit-transform: translateY(5px); + } + 100% { + -webkit-transform: translateY(0); + } +} +@-webkit-keyframes iziT-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes iziT-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(300px, 0, 0); + transform: translate3d(300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(-300px, 0, 0); + transform: translate3d(-300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@-webkit-keyframes iziT-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@-webkit-keyframes iziT-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@-webkit-keyframes iziT-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@-webkit-keyframes iziT-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@-webkit-keyframes iziT-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@-webkit-keyframes iziT-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} +@-moz-keyframes iziT-revealIn { + 0% { + opacity: 0; + transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@-webkit-keyframes iziT-revealIn { + 0% { + opacity: 0; + transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@-o-keyframes iziT-revealIn { + 0% { + opacity: 0; + transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@keyframes iziT-revealIn { + 0% { + opacity: 0; + transform: scale3d(0.3, 0.3, 1); + } + 100% { + opacity: 1; + } +} +@-moz-keyframes iziT-slideIn { + 0% { + opacity: 0; + transform: translateX(50px); + } + 100% { + opacity: 1; + transform: translateX(0); + } +} +@-webkit-keyframes iziT-slideIn { + 0% { + opacity: 0; + transform: translateX(50px); + } + 100% { + opacity: 1; + transform: translateX(0); + } +} +@-o-keyframes iziT-slideIn { + 0% { + opacity: 0; + transform: translateX(50px); + } + 100% { + opacity: 1; + transform: translateX(0); + } +} +@keyframes iziT-slideIn { + 0% { + opacity: 0; + transform: translateX(50px); + } + 100% { + opacity: 1; + transform: translateX(0); + } +} +@-moz-keyframes iziT-bounceInLeft { + 0% { + opacity: 0; + transform: translateX(280px); + } + 50% { + opacity: 1; + transform: translateX(-20px); + } + 70% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } +} +@-webkit-keyframes iziT-bounceInLeft { + 0% { + opacity: 0; + transform: translateX(280px); + } + 50% { + opacity: 1; + transform: translateX(-20px); + } + 70% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } +} +@-o-keyframes iziT-bounceInLeft { + 0% { + opacity: 0; + transform: translateX(280px); + } + 50% { + opacity: 1; + transform: translateX(-20px); + } + 70% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } +} +@keyframes iziT-bounceInLeft { + 0% { + opacity: 0; + transform: translateX(280px); + } + 50% { + opacity: 1; + transform: translateX(-20px); + } + 70% { + transform: translateX(10px); + } + 100% { + transform: translateX(0); + } +} +@-moz-keyframes iziT-bounceInRight { + 0% { + opacity: 0; + transform: translateX(-280px); + } + 50% { + opacity: 1; + transform: translateX(20px); + } + 70% { + transform: translateX(-10px); + } + 100% { + transform: translateX(0); + } +} +@-webkit-keyframes iziT-bounceInRight { + 0% { + opacity: 0; + transform: translateX(-280px); + } + 50% { + opacity: 1; + transform: translateX(20px); + } + 70% { + transform: translateX(-10px); + } + 100% { + transform: translateX(0); + } +} +@-o-keyframes iziT-bounceInRight { + 0% { + opacity: 0; + transform: translateX(-280px); + } + 50% { + opacity: 1; + transform: translateX(20px); + } + 70% { + transform: translateX(-10px); + } + 100% { + transform: translateX(0); + } +} +@keyframes iziT-bounceInRight { + 0% { + opacity: 0; + transform: translateX(-280px); + } + 50% { + opacity: 1; + transform: translateX(20px); + } + 70% { + transform: translateX(-10px); + } + 100% { + transform: translateX(0); + } +} +@-moz-keyframes iziT-bounceInDown { + 0% { + opacity: 0; + transform: translateY(-200px); + } + 50% { + opacity: 1; + transform: translateY(10px); + } + 70% { + transform: translateY(-5px); + } + 100% { + transform: translateY(0); + } +} +@-webkit-keyframes iziT-bounceInDown { + 0% { + opacity: 0; + transform: translateY(-200px); + } + 50% { + opacity: 1; + transform: translateY(10px); + } + 70% { + transform: translateY(-5px); + } + 100% { + transform: translateY(0); + } +} +@-o-keyframes iziT-bounceInDown { + 0% { + opacity: 0; + transform: translateY(-200px); + } + 50% { + opacity: 1; + transform: translateY(10px); + } + 70% { + transform: translateY(-5px); + } + 100% { + transform: translateY(0); + } +} +@keyframes iziT-bounceInDown { + 0% { + opacity: 0; + transform: translateY(-200px); + } + 50% { + opacity: 1; + transform: translateY(10px); + } + 70% { + transform: translateY(-5px); + } + 100% { + transform: translateY(0); + } +} +@-moz-keyframes iziT-bounceInUp { + 0% { + opacity: 0; + transform: translateY(200px); + } + 50% { + opacity: 1; + transform: translateY(-10px); + } + 70% { + transform: translateY(5px); + } + 100% { + transform: translateY(0); + } +} +@-webkit-keyframes iziT-bounceInUp { + 0% { + opacity: 0; + transform: translateY(200px); + } + 50% { + opacity: 1; + transform: translateY(-10px); + } + 70% { + transform: translateY(5px); + } + 100% { + transform: translateY(0); + } +} +@-o-keyframes iziT-bounceInUp { + 0% { + opacity: 0; + transform: translateY(200px); + } + 50% { + opacity: 1; + transform: translateY(-10px); + } + 70% { + transform: translateY(5px); + } + 100% { + transform: translateY(0); + } +} +@keyframes iziT-bounceInUp { + 0% { + opacity: 0; + transform: translateY(200px); + } + 50% { + opacity: 1; + transform: translateY(-10px); + } + 70% { + transform: translateY(5px); + } + 100% { + transform: translateY(0); + } +} +@-moz-keyframes iziT-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes iziT-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-o-keyframes iziT-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes iziT-fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-moz-keyframes iziT-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-o-keyframes iziT-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziT-fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-moz-keyframes iziT-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-o-keyframes iziT-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziT-fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-moz-keyframes iziT-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(300px, 0, 0); + transform: translate3d(300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(300px, 0, 0); + transform: translate3d(300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-o-keyframes iziT-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(300px, 0, 0); + transform: translate3d(300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziT-fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(300px, 0, 0); + transform: translate3d(300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-moz-keyframes iziT-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(-300px, 0, 0); + transform: translate3d(-300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-webkit-keyframes iziT-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(-300px, 0, 0); + transform: translate3d(-300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-o-keyframes iziT-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(-300px, 0, 0); + transform: translate3d(-300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes iziT-fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(-300px, 0, 0); + transform: translate3d(-300px, 0, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@-moz-keyframes iziT-flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@-webkit-keyframes iziT-flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@-o-keyframes iziT-flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@keyframes iziT-flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@-moz-keyframes iziT-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@-webkit-keyframes iziT-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@-o-keyframes iziT-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes iziT-fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@-moz-keyframes iziT-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@-webkit-keyframes iziT-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@-o-keyframes iziT-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@keyframes iziT-fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@-moz-keyframes iziT-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@-webkit-keyframes iziT-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@-o-keyframes iziT-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@keyframes iziT-fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@-moz-keyframes iziT-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@-webkit-keyframes iziT-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@-o-keyframes iziT-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@keyframes iziT-fadeOutLeft { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(-200px, 0, 0); + transform: translate3d(-200px, 0, 0); + } +} +@-moz-keyframes iziT-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@-webkit-keyframes iziT-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@-o-keyframes iziT-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@keyframes iziT-fadeOutRight { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(200px, 0, 0); + transform: translate3d(200px, 0, 0); + } +} +@-moz-keyframes iziT-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} +@-webkit-keyframes iziT-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} +@-o-keyframes iziT-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} +@keyframes iziT-flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} diff --git a/ckanext/bulk/assets/vendor/iziToast.js b/ckanext/bulk/assets/vendor/iziToast.js new file mode 100644 index 0000000..81eebf6 --- /dev/null +++ b/ckanext/bulk/assets/vendor/iziToast.js @@ -0,0 +1,1292 @@ +/* +* iziToast | v1.4.0 +* http://izitoast.marcelodolce.com +* by Marcelo Dolce. +*/ +(function (root, factory) { + if(typeof define === 'function' && define.amd) { + define([], factory(root)); + } else if(typeof exports === 'object') { + module.exports = factory(root); + } else { + root.iziToast = factory(root); + } +})(typeof global !== 'undefined' ? global : window || this.window || this.global, function (root) { + + 'use strict'; + + // + // Variables + // + var $iziToast = {}, + PLUGIN_NAME = 'iziToast', + BODY = document.querySelector('body'), + ISMOBILE = (/Mobi/.test(navigator.userAgent)) ? true : false, + ISCHROME = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor), + ISFIREFOX = typeof InstallTrigger !== 'undefined', + ACCEPTSTOUCH = 'ontouchstart' in document.documentElement, + POSITIONS = ['bottomRight','bottomLeft','bottomCenter','topRight','topLeft','topCenter','center'], + THEMES = { + info: { + color: 'blue', + icon: 'ico-info' + }, + success: { + color: 'green', + icon: 'ico-success' + }, + warning: { + color: 'orange', + icon: 'ico-warning' + }, + error: { + color: 'red', + icon: 'ico-error' + }, + question: { + color: 'yellow', + icon: 'ico-question' + } + }, + MOBILEWIDTH = 568, + CONFIG = {}; + + $iziToast.children = {}; + + // Default settings + var defaults = { + id: null, + class: '', + title: '', + titleColor: '', + titleSize: '', + titleLineHeight: '', + message: '', + messageColor: '', + messageSize: '', + messageLineHeight: '', + backgroundColor: '', + theme: 'light', // dark + color: '', // blue, red, green, yellow + icon: '', + iconText: '', + iconColor: '', + iconUrl: null, + image: '', + imageWidth: 50, + maxWidth: null, + zindex: null, + layout: 1, + balloon: false, + close: true, + closeOnEscape: false, + closeOnClick: false, + displayMode: 0, + position: 'bottomRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center + target: '', + targetFirst: true, + timeout: 5000, + rtl: false, + animateInside: true, + drag: true, + pauseOnHover: true, + resetOnHover: false, + progressBar: true, + progressBarColor: '', + progressBarEasing: 'linear', + overlay: false, + overlayClose: false, + overlayColor: 'rgba(0, 0, 0, 0.6)', + transitionIn: 'fadeInUp', // bounceInLeft, bounceInRight, bounceInUp, bounceInDown, fadeIn, fadeInDown, fadeInUp, fadeInLeft, fadeInRight, flipInX + transitionOut: 'fadeOut', // fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, flipOutX + transitionInMobile: 'fadeInUp', + transitionOutMobile: 'fadeOutDown', + buttons: {}, + inputs: {}, + onOpening: function () {}, + onOpened: function () {}, + onClosing: function () {}, + onClosed: function () {} + }; + + // + // Methods + // + + + /** + * Polyfill for remove() method + */ + if(!('remove' in Element.prototype)) { + Element.prototype.remove = function() { + if(this.parentNode) { + this.parentNode.removeChild(this); + } + }; + } + + /* + * Polyfill for CustomEvent for IE >= 9 + * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill + */ + if(typeof window.CustomEvent !== 'function') { + var CustomEventPolyfill = function (event, params) { + params = params || { bubbles: false, cancelable: false, detail: undefined }; + var evt = document.createEvent('CustomEvent'); + evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); + return evt; + }; + + CustomEventPolyfill.prototype = window.Event.prototype; + + window.CustomEvent = CustomEventPolyfill; + } + + /** + * A simple forEach() implementation for Arrays, Objects and NodeLists + * @private + * @param {Array|Object|NodeList} collection Collection of items to iterate + * @param {Function} callback Callback function for each iteration + * @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`) + */ + var forEach = function (collection, callback, scope) { + if(Object.prototype.toString.call(collection) === '[object Object]') { + for (var prop in collection) { + if(Object.prototype.hasOwnProperty.call(collection, prop)) { + callback.call(scope, collection[prop], prop, collection); + } + } + } else { + if(collection){ + for (var i = 0, len = collection.length; i < len; i++) { + callback.call(scope, collection[i], i, collection); + } + } + } + }; + + /** + * Merge defaults with user options + * @private + * @param {Object} defaults Default settings + * @param {Object} options User options + * @returns {Object} Merged values of defaults and options + */ + var extend = function (defaults, options) { + var extended = {}; + forEach(defaults, function (value, prop) { + extended[prop] = defaults[prop]; + }); + forEach(options, function (value, prop) { + extended[prop] = options[prop]; + }); + return extended; + }; + + + /** + * Create a fragment DOM elements + * @private + */ + var createFragElem = function(htmlStr) { + var frag = document.createDocumentFragment(), + temp = document.createElement('div'); + temp.innerHTML = htmlStr; + while (temp.firstChild) { + frag.appendChild(temp.firstChild); + } + return frag; + }; + + + /** + * Generate new ID + * @private + */ + var generateId = function(params) { + var newId = btoa(encodeURIComponent(params)); + return newId.replace(/=/g, ""); + }; + + + /** + * Check if is a color + * @private + */ + var isColor = function(color){ + if( color.substring(0,1) == '#' || color.substring(0,3) == 'rgb' || color.substring(0,3) == 'hsl' ){ + return true; + } else { + return false; + } + }; + + + /** + * Check if is a Base64 string + * @private + */ + var isBase64 = function(str) { + try { + return btoa(atob(str)) == str; + } catch (err) { + return false; + } + }; + + + /** + * Drag method of toasts + * @private + */ + var drag = function() { + + return { + move: function(toast, instance, settings, xpos) { + + var opacity, + opacityRange = 0.3, + distance = 180; + + if(xpos !== 0){ + + toast.classList.add(PLUGIN_NAME+'-dragged'); + + toast.style.transform = 'translateX('+xpos + 'px)'; + + if(xpos > 0){ + opacity = (distance-xpos) / distance; + if(opacity < opacityRange){ + instance.hide(extend(settings, { transitionOut: 'fadeOutRight', transitionOutMobile: 'fadeOutRight' }), toast, 'drag'); + } + } else { + opacity = (distance+xpos) / distance; + if(opacity < opacityRange){ + instance.hide(extend(settings, { transitionOut: 'fadeOutLeft', transitionOutMobile: 'fadeOutLeft' }), toast, 'drag'); + } + } + toast.style.opacity = opacity; + + if(opacity < opacityRange){ + + if(ISCHROME || ISFIREFOX) + toast.style.left = xpos+'px'; + + toast.parentNode.style.opacity = opacityRange; + + this.stopMoving(toast, null); + } + } + + + }, + startMoving: function(toast, instance, settings, e) { + + e = e || window.event; + var posX = ((ACCEPTSTOUCH) ? e.touches[0].clientX : e.clientX), + toastLeft = toast.style.transform.replace('px)', ''); + toastLeft = toastLeft.replace('translateX(', ''); + var offsetX = posX - toastLeft; + + if(settings.transitionIn){ + toast.classList.remove(settings.transitionIn); + } + if(settings.transitionInMobile){ + toast.classList.remove(settings.transitionInMobile); + } + toast.style.transition = ''; + + if(ACCEPTSTOUCH) { + document.ontouchmove = function(e) { + e.preventDefault(); + e = e || window.event; + var posX = e.touches[0].clientX, + finalX = posX - offsetX; + drag.move(toast, instance, settings, finalX); + }; + } else { + document.onmousemove = function(e) { + e.preventDefault(); + e = e || window.event; + var posX = e.clientX, + finalX = posX - offsetX; + drag.move(toast, instance, settings, finalX); + }; + } + + }, + stopMoving: function(toast, e) { + + if(ACCEPTSTOUCH) { + document.ontouchmove = function() {}; + } else { + document.onmousemove = function() {}; + } + + toast.style.opacity = ''; + toast.style.transform = ''; + + if(toast.classList.contains(PLUGIN_NAME+'-dragged')){ + + toast.classList.remove(PLUGIN_NAME+'-dragged'); + + toast.style.transition = 'transform 0.4s ease, opacity 0.4s ease'; + setTimeout(function() { + toast.style.transition = ''; + }, 400); + } + + } + }; + + }(); + + + + + + $iziToast.setSetting = function (ref, option, value) { + + $iziToast.children[ref][option] = value; + + }; + + + $iziToast.getSetting = function (ref, option) { + + return $iziToast.children[ref][option]; + + }; + + + /** + * Destroy the current initialization. + * @public + */ + $iziToast.destroy = function () { + + forEach(document.querySelectorAll('.'+PLUGIN_NAME+'-overlay'), function(element, index) { + element.remove(); + }); + + forEach(document.querySelectorAll('.'+PLUGIN_NAME+'-wrapper'), function(element, index) { + element.remove(); + }); + + forEach(document.querySelectorAll('.'+PLUGIN_NAME), function(element, index) { + element.remove(); + }); + + this.children = {}; + + // Remove event listeners + document.removeEventListener(PLUGIN_NAME+'-opened', {}, false); + document.removeEventListener(PLUGIN_NAME+'-opening', {}, false); + document.removeEventListener(PLUGIN_NAME+'-closing', {}, false); + document.removeEventListener(PLUGIN_NAME+'-closed', {}, false); + document.removeEventListener('keyup', {}, false); + + // Reset variables + CONFIG = {}; + }; + + /** + * Initialize Plugin + * @public + * @param {Object} options User settings + */ + $iziToast.settings = function (options) { + + // Destroy any existing initializations + $iziToast.destroy(); + + CONFIG = options; + defaults = extend(defaults, options || {}); + }; + + + /** + * Building themes functions. + * @public + * @param {Object} options User settings + */ + forEach(THEMES, function (theme, name) { + + $iziToast[name] = function (options) { + + var settings = extend(CONFIG, options || {}); + settings = extend(theme, settings || {}); + + this.show(settings); + }; + + }); + + + /** + * Do the calculation to move the progress bar + * @private + */ + $iziToast.progress = function (options, $toast, callback) { + + + var that = this, + ref = $toast.getAttribute('data-iziToast-ref'), + settings = extend(this.children[ref], options || {}), + $elem = $toast.querySelector('.'+PLUGIN_NAME+'-progressbar div'); + + return { + start: function() { + + if(typeof settings.time.REMAINING == 'undefined'){ + + $toast.classList.remove(PLUGIN_NAME+'-reseted'); + + if($elem !== null){ + $elem.style.transition = 'width '+ settings.timeout +'ms '+settings.progressBarEasing; + $elem.style.width = '0%'; + } + + settings.time.START = new Date().getTime(); + settings.time.END = settings.time.START + settings.timeout; + settings.time.TIMER = setTimeout(function() { + + clearTimeout(settings.time.TIMER); + + if(!$toast.classList.contains(PLUGIN_NAME+'-closing')){ + + that.hide(settings, $toast, 'timeout'); + + if(typeof callback === 'function'){ + callback.apply(that); + } + } + + }, settings.timeout); + that.setSetting(ref, 'time', settings.time); + } + }, + pause: function() { + + if(typeof settings.time.START !== 'undefined' && !$toast.classList.contains(PLUGIN_NAME+'-paused') && !$toast.classList.contains(PLUGIN_NAME+'-reseted')){ + + $toast.classList.add(PLUGIN_NAME+'-paused'); + + settings.time.REMAINING = settings.time.END - new Date().getTime(); + + clearTimeout(settings.time.TIMER); + + that.setSetting(ref, 'time', settings.time); + + if($elem !== null){ + var computedStyle = window.getComputedStyle($elem), + propertyWidth = computedStyle.getPropertyValue('width'); + + $elem.style.transition = 'none'; + $elem.style.width = propertyWidth; + } + + if(typeof callback === 'function'){ + setTimeout(function() { + callback.apply(that); + }, 10); + } + } + }, + resume: function() { + + if(typeof settings.time.REMAINING !== 'undefined'){ + + $toast.classList.remove(PLUGIN_NAME+'-paused'); + + if($elem !== null){ + $elem.style.transition = 'width '+ settings.time.REMAINING +'ms '+settings.progressBarEasing; + $elem.style.width = '0%'; + } + + settings.time.END = new Date().getTime() + settings.time.REMAINING; + settings.time.TIMER = setTimeout(function() { + + clearTimeout(settings.time.TIMER); + + if(!$toast.classList.contains(PLUGIN_NAME+'-closing')){ + + that.hide(settings, $toast, 'timeout'); + + if(typeof callback === 'function'){ + callback.apply(that); + } + } + + + }, settings.time.REMAINING); + + that.setSetting(ref, 'time', settings.time); + } else { + this.start(); + } + }, + reset: function(){ + + clearTimeout(settings.time.TIMER); + + delete settings.time.REMAINING; + + that.setSetting(ref, 'time', settings.time); + + $toast.classList.add(PLUGIN_NAME+'-reseted'); + + $toast.classList.remove(PLUGIN_NAME+'-paused'); + + if($elem !== null){ + $elem.style.transition = 'none'; + $elem.style.width = '100%'; + } + + if(typeof callback === 'function'){ + setTimeout(function() { + callback.apply(that); + }, 10); + } + } + }; + + }; + + + /** + * Close the specific Toast + * @public + * @param {Object} options User settings + */ + $iziToast.hide = function (options, $toast, closedBy) { + + if(typeof $toast != 'object'){ + $toast = document.querySelector($toast); + } + + var that = this, + settings = extend(this.children[$toast.getAttribute('data-iziToast-ref')], options || {}); + settings.closedBy = closedBy || null; + + delete settings.time.REMAINING; + + $toast.classList.add(PLUGIN_NAME+'-closing'); + + // Overlay + (function(){ + + var $overlay = document.querySelector('.'+PLUGIN_NAME+'-overlay'); + if($overlay !== null){ + var refs = $overlay.getAttribute('data-iziToast-ref'); + refs = refs.split(','); + var index = refs.indexOf(String(settings.ref)); + + if(index !== -1){ + refs.splice(index, 1); + } + $overlay.setAttribute('data-iziToast-ref', refs.join()); + + if(refs.length === 0){ + $overlay.classList.remove('fadeIn'); + $overlay.classList.add('fadeOut'); + setTimeout(function() { + $overlay.remove(); + }, 700); + } + } + + })(); + + if(settings.transitionIn){ + $toast.classList.remove(settings.transitionIn); + } + + if(settings.transitionInMobile){ + $toast.classList.remove(settings.transitionInMobile); + } + + if(ISMOBILE || window.innerWidth <= MOBILEWIDTH){ + if(settings.transitionOutMobile) + $toast.classList.add(settings.transitionOutMobile); + } else { + if(settings.transitionOut) + $toast.classList.add(settings.transitionOut); + } + var H = $toast.parentNode.offsetHeight; + $toast.parentNode.style.height = H+'px'; + $toast.style.pointerEvents = 'none'; + + if(!ISMOBILE || window.innerWidth > MOBILEWIDTH){ + $toast.parentNode.style.transitionDelay = '0.2s'; + } + + try { + var event = new CustomEvent(PLUGIN_NAME+'-closing', {detail: settings, bubbles: true, cancelable: true}); + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); + } + + setTimeout(function() { + + $toast.parentNode.style.height = '0px'; + $toast.parentNode.style.overflow = ''; + + setTimeout(function(){ + + delete that.children[settings.ref]; + + $toast.parentNode.remove(); + + try { + var event = new CustomEvent(PLUGIN_NAME+'-closed', {detail: settings, bubbles: true, cancelable: true}); + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); + } + + if(typeof settings.onClosed !== 'undefined'){ + settings.onClosed.apply(null, [settings, $toast, closedBy]); + } + + }, 1000); + }, 200); + + + if(typeof settings.onClosing !== 'undefined'){ + settings.onClosing.apply(null, [settings, $toast, closedBy]); + } + }; + + /** + * Create and show the Toast + * @public + * @param {Object} options User settings + */ + $iziToast.show = function (options) { + + var that = this; + + // Merge user options with defaults + var settings = extend(CONFIG, options || {}); + settings = extend(defaults, settings); + settings.time = {}; + + if(settings.id === null){ + settings.id = generateId(settings.title+settings.message+settings.color); + } + + if(settings.displayMode === 1 || settings.displayMode == 'once'){ + try { + if(document.querySelectorAll('.'+PLUGIN_NAME+'#'+settings.id).length > 0){ + return false; + } + } catch (exc) { + console.warn('['+PLUGIN_NAME+'] Could not find an element with this selector: '+'#'+settings.id+'. Try to set an valid id.'); + } + } + + if(settings.displayMode === 2 || settings.displayMode == 'replace'){ + try { + forEach(document.querySelectorAll('.'+PLUGIN_NAME+'#'+settings.id), function(element, index) { + that.hide(settings, element, 'replaced'); + }); + } catch (exc) { + console.warn('['+PLUGIN_NAME+'] Could not find an element with this selector: '+'#'+settings.id+'. Try to set an valid id.'); + } + } + + settings.ref = new Date().getTime() + Math.floor((Math.random() * 10000000) + 1); + + $iziToast.children[settings.ref] = settings; + + var $DOM = { + body: document.querySelector('body'), + overlay: document.createElement('div'), + toast: document.createElement('div'), + toastBody: document.createElement('div'), + toastTexts: document.createElement('div'), + toastCapsule: document.createElement('div'), + cover: document.createElement('div'), + buttons: document.createElement('div'), + inputs: document.createElement('div'), + icon: !settings.iconUrl ? document.createElement('i') : document.createElement('img'), + wrapper: null + }; + + $DOM.toast.setAttribute('data-iziToast-ref', settings.ref); + $DOM.toast.appendChild($DOM.toastBody); + $DOM.toastCapsule.appendChild($DOM.toast); + + // CSS Settings + (function(){ + + $DOM.toast.classList.add(PLUGIN_NAME); + $DOM.toast.classList.add(PLUGIN_NAME+'-opening'); + $DOM.toastCapsule.classList.add(PLUGIN_NAME+'-capsule'); + $DOM.toastBody.classList.add(PLUGIN_NAME + '-body'); + $DOM.toastTexts.classList.add(PLUGIN_NAME + '-texts'); + + if(ISMOBILE || window.innerWidth <= MOBILEWIDTH){ + if(settings.transitionInMobile) + $DOM.toast.classList.add(settings.transitionInMobile); + } else { + if(settings.transitionIn) + $DOM.toast.classList.add(settings.transitionIn); + } + + if(settings.class){ + var classes = settings.class.split(' '); + forEach(classes, function (value, index) { + $DOM.toast.classList.add(value); + }); + } + + if(settings.id){ $DOM.toast.id = settings.id; } + + if(settings.rtl){ + $DOM.toast.classList.add(PLUGIN_NAME + '-rtl'); + $DOM.toast.setAttribute('dir', 'rtl'); + } + + if(settings.layout > 1){ $DOM.toast.classList.add(PLUGIN_NAME+'-layout'+settings.layout); } + + if(settings.balloon){ $DOM.toast.classList.add(PLUGIN_NAME+'-balloon'); } + + if(settings.maxWidth){ + if( !isNaN(settings.maxWidth) ){ + $DOM.toast.style.maxWidth = settings.maxWidth+'px'; + } else { + $DOM.toast.style.maxWidth = settings.maxWidth; + } + } + + if(settings.theme !== '' || settings.theme !== 'light') { + + $DOM.toast.classList.add(PLUGIN_NAME+'-theme-'+settings.theme); + } + + if(settings.color) { //#, rgb, rgba, hsl + + if( isColor(settings.color) ){ + $DOM.toast.style.background = settings.color; + } else { + $DOM.toast.classList.add(PLUGIN_NAME+'-color-'+settings.color); + } + } + + if(settings.backgroundColor) { + $DOM.toast.style.background = settings.backgroundColor; + if(settings.balloon){ + $DOM.toast.style.borderColor = settings.backgroundColor; + } + } + })(); + + // Cover image + (function(){ + if(settings.image) { + $DOM.cover.classList.add(PLUGIN_NAME + '-cover'); + $DOM.cover.style.width = settings.imageWidth + 'px'; + + if(isBase64(settings.image.replace(/ /g,''))){ + $DOM.cover.style.backgroundImage = 'url(data:image/png;base64,' + settings.image.replace(/ /g,'') + ')'; + } else { + $DOM.cover.style.backgroundImage = 'url(' + settings.image + ')'; + } + + if(settings.rtl){ + $DOM.toastBody.style.marginRight = (settings.imageWidth + 10) + 'px'; + } else { + $DOM.toastBody.style.marginLeft = (settings.imageWidth + 10) + 'px'; + } + $DOM.toast.appendChild($DOM.cover); + } + })(); + + // Button close + (function(){ + if(settings.close){ + + $DOM.buttonClose = document.createElement('button'); + $DOM.buttonClose.type = 'button'; + $DOM.buttonClose.classList.add(PLUGIN_NAME + '-close'); + $DOM.buttonClose.addEventListener('click', function (e) { + var button = e.target; + that.hide(settings, $DOM.toast, 'button'); + }); + $DOM.toast.appendChild($DOM.buttonClose); + } else { + if(settings.rtl){ + $DOM.toast.style.paddingLeft = '18px'; + } else { + $DOM.toast.style.paddingRight = '18px'; + } + } + })(); + + // Progress Bar & Timeout + (function(){ + + if(settings.progressBar){ + $DOM.progressBar = document.createElement('div'); + $DOM.progressBarDiv = document.createElement('div'); + $DOM.progressBar.classList.add(PLUGIN_NAME + '-progressbar'); + $DOM.progressBarDiv.style.background = settings.progressBarColor; + $DOM.progressBar.appendChild($DOM.progressBarDiv); + $DOM.toast.appendChild($DOM.progressBar); + } + + if(settings.timeout) { + + if(settings.pauseOnHover && !settings.resetOnHover){ + + $DOM.toast.addEventListener('mouseenter', function (e) { + that.progress(settings, $DOM.toast).pause(); + }); + $DOM.toast.addEventListener('mouseleave', function (e) { + that.progress(settings, $DOM.toast).resume(); + }); + } + + if(settings.resetOnHover){ + + $DOM.toast.addEventListener('mouseenter', function (e) { + that.progress(settings, $DOM.toast).reset(); + }); + $DOM.toast.addEventListener('mouseleave', function (e) { + that.progress(settings, $DOM.toast).start(); + }); + } + } + })(); + + // Icon + (function(){ + + if(settings.iconUrl) { + + $DOM.icon.setAttribute('class', PLUGIN_NAME + '-icon'); + $DOM.icon.setAttribute('src', settings.iconUrl); + + } else if(settings.icon) { + $DOM.icon.setAttribute('class', PLUGIN_NAME + '-icon ' + settings.icon); + + if(settings.iconText){ + $DOM.icon.appendChild(document.createTextNode(settings.iconText)); + } + + if(settings.iconColor){ + $DOM.icon.style.color = settings.iconColor; + } + } + + if(settings.icon || settings.iconUrl) { + + if(settings.rtl){ + $DOM.toastBody.style.paddingRight = '33px'; + } else { + $DOM.toastBody.style.paddingLeft = '33px'; + } + + $DOM.toastBody.appendChild($DOM.icon); + } + + })(); + + // Title & Message + (function(){ + if(settings.title.length > 0) { + + $DOM.strong = document.createElement('strong'); + $DOM.strong.classList.add(PLUGIN_NAME + '-title'); + $DOM.strong.appendChild(createFragElem(settings.title)); + $DOM.toastTexts.appendChild($DOM.strong); + + if(settings.titleColor) { + $DOM.strong.style.color = settings.titleColor; + } + if(settings.titleSize) { + if( !isNaN(settings.titleSize) ){ + $DOM.strong.style.fontSize = settings.titleSize+'px'; + } else { + $DOM.strong.style.fontSize = settings.titleSize; + } + } + if(settings.titleLineHeight) { + if( !isNaN(settings.titleSize) ){ + $DOM.strong.style.lineHeight = settings.titleLineHeight+'px'; + } else { + $DOM.strong.style.lineHeight = settings.titleLineHeight; + } + } + } + + if(settings.message.length > 0) { + + $DOM.p = document.createElement('p'); + $DOM.p.classList.add(PLUGIN_NAME + '-message'); + $DOM.p.appendChild(createFragElem(settings.message)); + $DOM.toastTexts.appendChild($DOM.p); + + if(settings.messageColor) { + $DOM.p.style.color = settings.messageColor; + } + if(settings.messageSize) { + if( !isNaN(settings.titleSize) ){ + $DOM.p.style.fontSize = settings.messageSize+'px'; + } else { + $DOM.p.style.fontSize = settings.messageSize; + } + } + if(settings.messageLineHeight) { + + if( !isNaN(settings.titleSize) ){ + $DOM.p.style.lineHeight = settings.messageLineHeight+'px'; + } else { + $DOM.p.style.lineHeight = settings.messageLineHeight; + } + } + } + + if(settings.title.length > 0 && settings.message.length > 0) { + if(settings.rtl){ + $DOM.strong.style.marginLeft = '10px'; + } else if(settings.layout !== 2 && !settings.rtl) { + $DOM.strong.style.marginRight = '10px'; + } + } + })(); + + $DOM.toastBody.appendChild($DOM.toastTexts); + + // Inputs + var $inputs; + (function(){ + if(settings.inputs.length > 0) { + + $DOM.inputs.classList.add(PLUGIN_NAME + '-inputs'); + + forEach(settings.inputs, function (value, index) { + $DOM.inputs.appendChild(createFragElem(value[0])); + + $inputs = $DOM.inputs.childNodes; + + $inputs[index].classList.add(PLUGIN_NAME + '-inputs-child'); + + if(value[3]){ + setTimeout(function() { + $inputs[index].focus(); + }, 300); + } + + $inputs[index].addEventListener(value[1], function (e) { + var ts = value[2]; + return ts(that, $DOM.toast, this, e); + }); + }); + $DOM.toastBody.appendChild($DOM.inputs); + } + })(); + + // Buttons + (function(){ + if(settings.buttons.length > 0) { + + $DOM.buttons.classList.add(PLUGIN_NAME + '-buttons'); + + forEach(settings.buttons, function (value, index) { + $DOM.buttons.appendChild(createFragElem(value[0])); + + var $btns = $DOM.buttons.childNodes; + + $btns[index].classList.add(PLUGIN_NAME + '-buttons-child'); + + if(value[2]){ + setTimeout(function() { + $btns[index].focus(); + }, 300); + } + + $btns[index].addEventListener('click', function (e) { + e.preventDefault(); + var ts = value[1]; + return ts(that, $DOM.toast, this, e, $inputs); + }); + }); + } + $DOM.toastBody.appendChild($DOM.buttons); + })(); + + if(settings.message.length > 0 && (settings.inputs.length > 0 || settings.buttons.length > 0)) { + $DOM.p.style.marginBottom = '0'; + } + + if(settings.inputs.length > 0 || settings.buttons.length > 0){ + if(settings.rtl){ + $DOM.toastTexts.style.marginLeft = '10px'; + } else { + $DOM.toastTexts.style.marginRight = '10px'; + } + if(settings.inputs.length > 0 && settings.buttons.length > 0){ + if(settings.rtl){ + $DOM.inputs.style.marginLeft = '8px'; + } else { + $DOM.inputs.style.marginRight = '8px'; + } + } + } + + // Wrap + (function(){ + $DOM.toastCapsule.style.visibility = 'hidden'; + setTimeout(function() { + var H = $DOM.toast.offsetHeight; + var style = $DOM.toast.currentStyle || window.getComputedStyle($DOM.toast); + var marginTop = style.marginTop; + marginTop = marginTop.split('px'); + marginTop = parseInt(marginTop[0]); + var marginBottom = style.marginBottom; + marginBottom = marginBottom.split('px'); + marginBottom = parseInt(marginBottom[0]); + + $DOM.toastCapsule.style.visibility = ''; + $DOM.toastCapsule.style.height = (H+marginBottom+marginTop)+'px'; + + setTimeout(function() { + $DOM.toastCapsule.style.height = 'auto'; + if(settings.target){ + $DOM.toastCapsule.style.overflow = 'visible'; + } + }, 500); + + if(settings.timeout) { + that.progress(settings, $DOM.toast).start(); + } + }, 100); + })(); + + // Target + (function(){ + var position = settings.position; + + if(settings.target){ + + $DOM.wrapper = document.querySelector(settings.target); + $DOM.wrapper.classList.add(PLUGIN_NAME + '-target'); + + if(settings.targetFirst) { + $DOM.wrapper.insertBefore($DOM.toastCapsule, $DOM.wrapper.firstChild); + } else { + $DOM.wrapper.appendChild($DOM.toastCapsule); + } + + } else { + + if( POSITIONS.indexOf(settings.position) == -1 ){ + console.warn('['+PLUGIN_NAME+'] Incorrect position.\nIt can be › ' + POSITIONS); + return; + } + + if(ISMOBILE || window.innerWidth <= MOBILEWIDTH){ + if(settings.position == 'bottomLeft' || settings.position == 'bottomRight' || settings.position == 'bottomCenter'){ + position = PLUGIN_NAME+'-wrapper-bottomCenter'; + } + else if(settings.position == 'topLeft' || settings.position == 'topRight' || settings.position == 'topCenter'){ + position = PLUGIN_NAME+'-wrapper-topCenter'; + } + else { + position = PLUGIN_NAME+'-wrapper-center'; + } + } else { + position = PLUGIN_NAME+'-wrapper-'+position; + } + $DOM.wrapper = document.querySelector('.' + PLUGIN_NAME + '-wrapper.'+position); + + if(!$DOM.wrapper) { + $DOM.wrapper = document.createElement('div'); + $DOM.wrapper.classList.add(PLUGIN_NAME + '-wrapper'); + $DOM.wrapper.classList.add(position); + document.body.appendChild($DOM.wrapper); + } + if(settings.position == 'topLeft' || settings.position == 'topCenter' || settings.position == 'topRight'){ + $DOM.wrapper.insertBefore($DOM.toastCapsule, $DOM.wrapper.firstChild); + } else { + $DOM.wrapper.appendChild($DOM.toastCapsule); + } + } + + if(!isNaN(settings.zindex)) { + $DOM.wrapper.style.zIndex = settings.zindex; + } else { + console.warn('['+PLUGIN_NAME+'] Invalid zIndex.'); + } + })(); + + // Overlay + (function(){ + + if(settings.overlay) { + + if( document.querySelector('.'+PLUGIN_NAME+'-overlay.fadeIn') !== null ){ + + $DOM.overlay = document.querySelector('.'+PLUGIN_NAME+'-overlay'); + $DOM.overlay.setAttribute('data-iziToast-ref', $DOM.overlay.getAttribute('data-iziToast-ref') + ',' + settings.ref); + + if(!isNaN(settings.zindex) && settings.zindex !== null) { + $DOM.overlay.style.zIndex = settings.zindex-1; + } + + } else { + + $DOM.overlay.classList.add(PLUGIN_NAME+'-overlay'); + $DOM.overlay.classList.add('fadeIn'); + $DOM.overlay.style.background = settings.overlayColor; + $DOM.overlay.setAttribute('data-iziToast-ref', settings.ref); + if(!isNaN(settings.zindex) && settings.zindex !== null) { + $DOM.overlay.style.zIndex = settings.zindex-1; + } + document.querySelector('body').appendChild($DOM.overlay); + } + + if(settings.overlayClose) { + + $DOM.overlay.removeEventListener('click', {}); + $DOM.overlay.addEventListener('click', function (e) { + that.hide(settings, $DOM.toast, 'overlay'); + }); + } else { + $DOM.overlay.removeEventListener('click', {}); + } + } + })(); + + // Inside animations + (function(){ + if(settings.animateInside){ + $DOM.toast.classList.add(PLUGIN_NAME+'-animateInside'); + + var animationTimes = [200, 100, 300]; + if(settings.transitionIn == 'bounceInLeft' || settings.transitionIn == 'bounceInRight'){ + animationTimes = [400, 200, 400]; + } + + if(settings.title.length > 0) { + setTimeout(function(){ + $DOM.strong.classList.add('slideIn'); + }, animationTimes[0]); + } + + if(settings.message.length > 0) { + setTimeout(function(){ + $DOM.p.classList.add('slideIn'); + }, animationTimes[1]); + } + + if(settings.icon || settings.iconUrl) { + setTimeout(function(){ + $DOM.icon.classList.add('revealIn'); + }, animationTimes[2]); + } + + var counter = 150; + if(settings.buttons.length > 0 && $DOM.buttons) { + + setTimeout(function(){ + + forEach($DOM.buttons.childNodes, function(element, index) { + + setTimeout(function(){ + element.classList.add('revealIn'); + }, counter); + counter = counter + 150; + }); + + }, settings.inputs.length > 0 ? 150 : 0); + } + + if(settings.inputs.length > 0 && $DOM.inputs) { + counter = 150; + forEach($DOM.inputs.childNodes, function(element, index) { + + setTimeout(function(){ + element.classList.add('revealIn'); + }, counter); + counter = counter + 150; + }); + } + } + })(); + + settings.onOpening.apply(null, [settings, $DOM.toast]); + + try { + var event = new CustomEvent(PLUGIN_NAME + '-opening', {detail: settings, bubbles: true, cancelable: true}); + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); + } + + setTimeout(function() { + + $DOM.toast.classList.remove(PLUGIN_NAME+'-opening'); + $DOM.toast.classList.add(PLUGIN_NAME+'-opened'); + + try { + var event = new CustomEvent(PLUGIN_NAME + '-opened', {detail: settings, bubbles: true, cancelable: true}); + document.dispatchEvent(event); + } catch(ex){ + console.warn(ex); + } + + settings.onOpened.apply(null, [settings, $DOM.toast]); + }, 1000); + + if(settings.drag){ + + if(ACCEPTSTOUCH) { + + $DOM.toast.addEventListener('touchstart', function(e) { + drag.startMoving(this, that, settings, e); + }, false); + + $DOM.toast.addEventListener('touchend', function(e) { + drag.stopMoving(this, e); + }, false); + } else { + + $DOM.toast.addEventListener('mousedown', function(e) { + e.preventDefault(); + drag.startMoving(this, that, settings, e); + }, false); + + $DOM.toast.addEventListener('mouseup', function(e) { + e.preventDefault(); + drag.stopMoving(this, e); + }, false); + } + } + + if(settings.closeOnEscape) { + + document.addEventListener('keyup', function (evt) { + evt = evt || window.event; + if(evt.keyCode == 27) { + that.hide(settings, $DOM.toast, 'esc'); + } + }); + } + + if(settings.closeOnClick) { + $DOM.toast.addEventListener('click', function (evt) { + that.hide(settings, $DOM.toast, 'toast'); + }); + } + + that.toast = $DOM.toast; + }; + + + return $iziToast; +}); \ No newline at end of file diff --git a/ckanext/bulk/assets/vendor/moment.min.js b/ckanext/bulk/assets/vendor/moment.min.js new file mode 100644 index 0000000..5787a40 --- /dev/null +++ b/ckanext/bulk/assets/vendor/moment.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0 .os-size-observer-listener-item { + display: block; + position: relative; + padding: inherit; + border: inherit; + box-sizing: content-box; + flex: auto; +} + +.os-size-observer-listener-scroll { + box-sizing: border-box; + display: flex; +} + +.os-size-observer-listener-item { + right: 0; + bottom: 0; + overflow: hidden; + direction: ltr; + flex: none; +} + +.os-size-observer-listener-item-final { + transition: none; +} + +@keyframes os-size-observer-appear-animation { + from { + cursor: auto; + } + to { + cursor: none; + } +} +.os-trinsic-observer { + flex: none; + box-sizing: border-box; + position: relative; + max-width: 0px; + max-height: 1px; + padding: 0; + margin: 0; + border: none; + overflow: hidden; + z-index: -1; + height: 0; + top: calc(100% + 1px); + contain: strict; +} +.os-trinsic-observer:not(:empty) { + height: calc(100% + 1px); + top: -1px; +} +.os-trinsic-observer:not(:empty) > .os-size-observer { + width: 1000%; + height: 1000%; + min-height: 1px; + min-width: 1px; +} + +/** + * hide native scrollbars + * changes to this styles need to be reflected in the environment styles to correctly detect scrollbar hiding + */ +[data-overlayscrollbars-initialize], +[data-overlayscrollbars-viewport~=scrollbarHidden] { + scrollbar-width: none !important; +} + +[data-overlayscrollbars-initialize]::-webkit-scrollbar, +[data-overlayscrollbars-initialize]::-webkit-scrollbar-corner, +[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar, +[data-overlayscrollbars-viewport~=scrollbarHidden]::-webkit-scrollbar-corner { + -webkit-appearance: none !important; + appearance: none !important; + display: none !important; + width: 0 !important; + height: 0 !important; +} + +/** + * elements wont suddenly clip after initialization is done + */ +[data-overlayscrollbars-initialize]:not([data-overlayscrollbars]):not(html):not(body) { + overflow: auto; +} + +/** + * applied to body + */ +html[data-overlayscrollbars-body] { + overflow: hidden; +} + +html[data-overlayscrollbars-body], +html[data-overlayscrollbars-body] > body { + width: 100%; + height: 100%; + margin: 0; +} + +html[data-overlayscrollbars-body] > body { + overflow: visible; + margin: 0; +} + +/** + * structure setup + */ +[data-overlayscrollbars] { + position: relative; +} + +[data-overlayscrollbars~=host], +[data-overlayscrollbars-padding] { + display: flex; + align-items: stretch !important; + flex-direction: row !important; + flex-wrap: nowrap !important; + scroll-behavior: auto !important; +} + +[data-overlayscrollbars-padding], +[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]) { + box-sizing: inherit; + position: relative; + flex: auto !important; + height: auto; + width: 100%; + min-width: 0; + padding: 0; + margin: 0; + border: none; + z-index: 0; +} + +[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]) { + --os-vaw: 0; + --os-vah: 0; + outline: none; +} +[data-overlayscrollbars-viewport]:not([data-overlayscrollbars]):focus { + outline: none; +} +[data-overlayscrollbars-viewport][data-overlayscrollbars-viewport~=arrange]::before { + content: ""; + position: absolute; + pointer-events: none; + z-index: -1; + min-width: 1px; + min-height: 1px; + width: var(--os-vaw); + height: var(--os-vah); +} + +[data-overlayscrollbars], +[data-overlayscrollbars-padding], +[data-overlayscrollbars-viewport] { + overflow: hidden !important; +} + +[data-overlayscrollbars~=noClipping], +[data-overlayscrollbars-padding~=noClipping] { + overflow: visible !important; +} + +[data-overlayscrollbars-viewport~=measuring] { + overflow: hidden !important; + scroll-behavior: auto !important; + scroll-snap-type: none !important; +} + +[data-overlayscrollbars-viewport~=overflowXVisible]:not([data-overlayscrollbars-viewport~=measuring]) { + overflow-x: visible !important; +} + +[data-overlayscrollbars-viewport~=overflowXHidden] { + overflow-x: hidden !important; +} + +[data-overlayscrollbars-viewport~=overflowXScroll] { + overflow-x: scroll !important; +} + +[data-overlayscrollbars-viewport~=overflowYVisible]:not([data-overlayscrollbars-viewport~=measuring]) { + overflow-y: visible !important; +} + +[data-overlayscrollbars-viewport~=overflowYHidden] { + overflow-y: hidden !important; +} + +[data-overlayscrollbars-viewport~=overflowYScroll] { + overflow-y: scroll !important; +} + +[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId) { + font-size: 0 !important; + line-height: 0 !important; +} + +[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId)::before, +[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId)::after, +[data-overlayscrollbars-viewport~=noContent]:not(#osFakeId) > * { + display: none !important; + position: absolute !important; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + white-space: nowrap !important; + border-width: 0 !important; +} + +[data-overlayscrollbars-viewport~=scrolling] { + scroll-behavior: auto !important; + scroll-snap-type: none !important; +} + +[data-overlayscrollbars-content] { + box-sizing: inherit; +} + +/** + * Display contents to bridge any flickering during deferred initialization. + */ +[data-overlayscrollbars-contents]:not(#osFakeId):not([data-overlayscrollbars-padding]):not([data-overlayscrollbars-viewport]):not([data-overlayscrollbars-content]) { + display: contents; +} + +/** + * optional & experimental grid mode + */ +[data-overlayscrollbars-grid], +[data-overlayscrollbars-grid] [data-overlayscrollbars-padding] { + display: grid; + grid-template: 1fr/1fr; +} + +[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding], +[data-overlayscrollbars-grid] > [data-overlayscrollbars-viewport], +[data-overlayscrollbars-grid] > [data-overlayscrollbars-padding] > [data-overlayscrollbars-viewport] { + height: auto !important; + width: auto !important; +} + +@property --os-scroll-percent { + syntax: ""; + inherits: true; + initial-value: 0; +} +@property --os-viewport-percent { + syntax: ""; + inherits: true; + initial-value: 0; +} +.os-scrollbar { + --os-viewport-percent: 0; + --os-scroll-percent: 0; + --os-scroll-direction: 0; + --os-scroll-percent-directional: calc( + var(--os-scroll-percent) - (var(--os-scroll-percent) + (1 - var(--os-scroll-percent)) * -1) * + var(--os-scroll-direction) + ); +} + +.os-scrollbar { + contain: size layout; + contain: size layout style; + transition: opacity 0.15s, visibility 0.15s, top 0.15s, right 0.15s, bottom 0.15s, left 0.15s; + pointer-events: none; + position: absolute; + opacity: 0; + visibility: hidden; +} + +body > .os-scrollbar { + position: fixed; + z-index: 99999; +} + +.os-scrollbar-transitionless { + transition: none !important; +} + +.os-scrollbar-track { + position: relative; + padding: 0 !important; + border: none !important; +} + +.os-scrollbar-handle { + position: absolute; +} + +.os-scrollbar-track, +.os-scrollbar-handle { + pointer-events: none; + width: 100%; + height: 100%; +} + +.os-scrollbar.os-scrollbar-track-interactive .os-scrollbar-track, +.os-scrollbar.os-scrollbar-handle-interactive .os-scrollbar-handle { + pointer-events: auto; + touch-action: none; +} + +.os-scrollbar-horizontal { + bottom: 0; + left: 0; +} + +.os-scrollbar-vertical { + top: 0; + right: 0; +} + +.os-scrollbar-rtl.os-scrollbar-horizontal { + right: 0; +} + +.os-scrollbar-rtl.os-scrollbar-vertical { + right: auto; + left: 0; +} + +.os-scrollbar-visible { + opacity: 1; + visibility: visible; +} + +.os-scrollbar-auto-hide.os-scrollbar-auto-hide-hidden { + opacity: 0; + visibility: hidden; +} + +.os-scrollbar-interaction.os-scrollbar-visible { + opacity: 1; + visibility: visible; +} + +.os-scrollbar-unusable, +.os-scrollbar-unusable *, +.os-scrollbar-wheel, +.os-scrollbar-wheel * { + pointer-events: none !important; +} + +.os-scrollbar-unusable .os-scrollbar-handle { + opacity: 0 !important; + transition: none !important; +} + +.os-scrollbar-horizontal .os-scrollbar-handle { + bottom: 0; + left: calc(var(--os-scroll-percent-directional) * 100%); + transform: translateX(calc(var(--os-scroll-percent-directional) * -100%)); + width: calc(var(--os-viewport-percent) * 100%); +} + +.os-scrollbar-vertical .os-scrollbar-handle { + right: 0; + top: calc(var(--os-scroll-percent-directional) * 100%); + transform: translateY(calc(var(--os-scroll-percent-directional) * -100%)); + height: calc(var(--os-viewport-percent) * 100%); +} + +@supports (container-type: size) { + .os-scrollbar-track { + container-type: size; + } + .os-scrollbar-horizontal .os-scrollbar-handle { + left: auto; + transform: translateX(calc(var(--os-scroll-percent-directional) * 100cqw + var(--os-scroll-percent-directional) * -100%)); + } + .os-scrollbar-vertical .os-scrollbar-handle { + top: auto; + transform: translateY(calc(var(--os-scroll-percent-directional) * 100cqh + var(--os-scroll-percent-directional) * -100%)); + } + .os-scrollbar-rtl.os-scrollbar-horizontal .os-scrollbar-handle { + right: auto; + left: 0; + } +} +.os-scrollbar-rtl.os-scrollbar-vertical .os-scrollbar-handle { + right: auto; + left: 0; +} + +.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless, +.os-scrollbar.os-scrollbar-horizontal.os-scrollbar-cornerless.os-scrollbar-rtl { + left: 0; + right: 0; +} + +.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless, +.os-scrollbar.os-scrollbar-vertical.os-scrollbar-cornerless.os-scrollbar-rtl { + top: 0; + bottom: 0; +} + +@media print { + .os-scrollbar { + display: none; + } +} +.os-scrollbar { + --os-size: 0; + --os-padding-perpendicular: 0; + --os-padding-axis: 0; + --os-track-border-radius: 0; + --os-track-bg: none; + --os-track-bg-hover: none; + --os-track-bg-active: none; + --os-track-border: none; + --os-track-border-hover: none; + --os-track-border-active: none; + --os-handle-border-radius: 0; + --os-handle-bg: none; + --os-handle-bg-hover: none; + --os-handle-bg-active: none; + --os-handle-border: none; + --os-handle-border-hover: none; + --os-handle-border-active: none; + --os-handle-min-size: 33px; + --os-handle-max-size: none; + --os-handle-perpendicular-size: 100%; + --os-handle-perpendicular-size-hover: 100%; + --os-handle-perpendicular-size-active: 100%; + --os-handle-interactive-area-offset: 0; +} + +.os-scrollbar-track { + border: var(--os-track-border); + border-radius: var(--os-track-border-radius); + background: var(--os-track-bg); + transition: opacity 0.15s, background-color 0.15s, border-color 0.15s; +} +.os-scrollbar-track:hover { + border: var(--os-track-border-hover); + background: var(--os-track-bg-hover); +} +.os-scrollbar-track:active { + border: var(--os-track-border-active); + background: var(--os-track-bg-active); +} + +.os-scrollbar-handle { + border: var(--os-handle-border); + border-radius: var(--os-handle-border-radius); + background: var(--os-handle-bg); +} +.os-scrollbar-handle:hover { + border: var(--os-handle-border-hover); + background: var(--os-handle-bg-hover); +} +.os-scrollbar-handle:active { + border: var(--os-handle-border-active); + background: var(--os-handle-bg-active); +} + +.os-scrollbar-track:before, +.os-scrollbar-handle:before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + display: block; +} + +.os-scrollbar-horizontal { + padding: var(--os-padding-perpendicular) var(--os-padding-axis); + right: var(--os-size); + height: var(--os-size); +} +.os-scrollbar-horizontal.os-scrollbar-rtl { + left: var(--os-size); + right: 0; +} +.os-scrollbar-horizontal .os-scrollbar-track:before { + top: calc(var(--os-padding-perpendicular) * -1); + bottom: calc(var(--os-padding-perpendicular) * -1); +} +.os-scrollbar-horizontal .os-scrollbar-handle { + min-width: var(--os-handle-min-size); + max-width: var(--os-handle-max-size); + height: var(--os-handle-perpendicular-size); + transition: opacity 0.15s, background-color 0.15s, border-color 0.15s, height 0.15s; +} +.os-scrollbar-horizontal .os-scrollbar-handle:before { + top: calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1); + bottom: calc(var(--os-padding-perpendicular) * -1); +} +.os-scrollbar-horizontal:hover .os-scrollbar-handle { + height: var(--os-handle-perpendicular-size-hover); +} +.os-scrollbar-horizontal:active .os-scrollbar-handle { + height: var(--os-handle-perpendicular-size-active); +} + +.os-scrollbar-vertical { + padding: var(--os-padding-axis) var(--os-padding-perpendicular); + bottom: var(--os-size); + width: var(--os-size); +} +.os-scrollbar-vertical .os-scrollbar-track:before { + left: calc(var(--os-padding-perpendicular) * -1); + right: calc(var(--os-padding-perpendicular) * -1); +} +.os-scrollbar-vertical .os-scrollbar-handle { + min-height: var(--os-handle-min-size); + max-height: var(--os-handle-max-size); + width: var(--os-handle-perpendicular-size); + transition: opacity 0.15s, background-color 0.15s, border-color 0.15s, width 0.15s; +} +.os-scrollbar-vertical .os-scrollbar-handle:before { + left: calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1); + right: calc(var(--os-padding-perpendicular) * -1); +} +.os-scrollbar-vertical.os-scrollbar-rtl .os-scrollbar-handle:before { + right: calc((var(--os-padding-perpendicular) + var(--os-handle-interactive-area-offset)) * -1); + left: calc(var(--os-padding-perpendicular) * -1); +} +.os-scrollbar-vertical:hover .os-scrollbar-handle { + width: var(--os-handle-perpendicular-size-hover); +} +.os-scrollbar-vertical:active .os-scrollbar-handle { + width: var(--os-handle-perpendicular-size-active); +} + +/* NONE THEME: */ +[data-overlayscrollbars-viewport~=measuring] > .os-scrollbar, +.os-theme-none.os-scrollbar { + display: none !important; +} + +/* DARK & LIGHT THEME: */ +.os-theme-dark, +.os-theme-light { + box-sizing: border-box; + --os-size: 10px; + --os-padding-perpendicular: 2px; + --os-padding-axis: 2px; + --os-track-border-radius: 10px; + --os-handle-interactive-area-offset: 4px; + --os-handle-border-radius: 10px; +} + +.os-theme-dark { + --os-handle-bg: rgba(0, 0, 0, 0.44); + --os-handle-bg-hover: rgba(0, 0, 0, 0.55); + --os-handle-bg-active: rgba(0, 0, 0, 0.66); +} + +.os-theme-light { + --os-handle-bg: rgba(255, 255, 255, 0.44); + --os-handle-bg-hover: rgba(255, 255, 255, 0.55); + --os-handle-bg-active: rgba(255, 255, 255, 0.66); +} \ No newline at end of file diff --git a/ckanext/bulk/assets/vendor/overlayscrollbars.js b/ckanext/bulk/assets/vendor/overlayscrollbars.js new file mode 100644 index 0000000..7713f7e --- /dev/null +++ b/ckanext/bulk/assets/vendor/overlayscrollbars.js @@ -0,0 +1,2598 @@ +/*! + * OverlayScrollbars + * Version: 2.9.2 + * + * Copyright (c) Rene Haas | KingSora. + * https://github.com/KingSora + * + * Released under the MIT license. + */ +var OverlayScrollbarsGlobal = function(t) { + "use strict"; + const createCache = (t, n) => { + const {o: o, i: s, u: e} = t; + let c = o; + let r; + const cacheUpdateContextual = (t, n) => { + const o = c; + const l = t; + const i = n || (s ? !s(o, l) : o !== l); + if (i || e) { + c = l; + r = o; + } + return [ c, i, r ]; + }; + const cacheUpdateIsolated = t => cacheUpdateContextual(n(c, r), t); + const getCurrentCache = t => [ c, !!t, r ]; + return [ n ? cacheUpdateIsolated : cacheUpdateContextual, getCurrentCache ]; + }; + const n = typeof window !== "undefined" && typeof HTMLElement !== "undefined" && !!window.document; + const o = n ? window : {}; + const s = Math.max; + const e = Math.min; + const c = Math.round; + const r = Math.abs; + const l = Math.sign; + const i = o.cancelAnimationFrame; + const a = o.requestAnimationFrame; + const u = o.setTimeout; + const _ = o.clearTimeout; + const getApi = t => typeof o[t] !== "undefined" ? o[t] : void 0; + const d = getApi("MutationObserver"); + const f = getApi("IntersectionObserver"); + const v = getApi("ResizeObserver"); + const p = getApi("ScrollTimeline"); + const isUndefined = t => t === void 0; + const isNull = t => t === null; + const isNumber = t => typeof t === "number"; + const isString = t => typeof t === "string"; + const isBoolean = t => typeof t === "boolean"; + const isFunction = t => typeof t === "function"; + const isArray = t => Array.isArray(t); + const isObject = t => typeof t === "object" && !isArray(t) && !isNull(t); + const isArrayLike = t => { + const n = !!t && t.length; + const o = isNumber(n) && n > -1 && n % 1 == 0; + return isArray(t) || !isFunction(t) && o ? n > 0 && isObject(t) ? n - 1 in t : true : false; + }; + const isPlainObject = t => !!t && t.constructor === Object; + const isHTMLElement = t => t instanceof HTMLElement; + const isElement = t => t instanceof Element; + const animationCurrentTime = () => performance.now(); + const animateNumber = (t, n, o, e, c) => { + let r = 0; + const l = animationCurrentTime(); + const u = s(0, o); + const frame = o => { + const i = animationCurrentTime(); + const _ = i - l; + const d = _ >= u; + const f = o ? 1 : 1 - (s(0, l + u - i) / u || 0); + const v = (n - t) * (isFunction(c) ? c(f, f * u, 0, 1, u) : f) + t; + const p = d || f === 1; + e && e(v, f, p); + r = p ? 0 : a((() => frame())); + }; + frame(); + return t => { + i(r); + t && frame(t); + }; + }; + function each(t, n) { + if (isArrayLike(t)) { + for (let o = 0; o < t.length; o++) { + if (n(t[o], o, t) === false) { + break; + } + } + } else if (t) { + each(Object.keys(t), (o => n(t[o], o, t))); + } + return t; + } + const inArray = (t, n) => t.indexOf(n) >= 0; + const concat = (t, n) => t.concat(n); + const push = (t, n, o) => { + !o && !isString(n) && isArrayLike(n) ? Array.prototype.push.apply(t, n) : t.push(n); + return t; + }; + const from = t => Array.from(t || []); + const createOrKeepArray = t => { + if (isArray(t)) { + return t; + } + return !isString(t) && isArrayLike(t) ? from(t) : [ t ]; + }; + const isEmptyArray = t => !!t && !t.length; + const deduplicateArray = t => from(new Set(t)); + const runEachAndClear = (t, n, o) => { + const runFn = t => t && t.apply(void 0, n || []); + each(t, runFn); + !o && (t.length = 0); + }; + const g = "paddingTop"; + const h = "paddingRight"; + const b = "paddingLeft"; + const y = "paddingBottom"; + const w = "marginLeft"; + const S = "marginRight"; + const m = "marginBottom"; + const O = "overflowX"; + const $ = "overflowY"; + const C = "width"; + const x = "height"; + const H = "visible"; + const E = "hidden"; + const z = "scroll"; + const capitalizeFirstLetter = t => { + const n = String(t || ""); + return n ? n[0].toUpperCase() + n.slice(1) : ""; + }; + const equal = (t, n, o, s) => { + if (t && n) { + let e = true; + each(o, (o => { + const c = s ? s(t[o]) : t[o]; + const r = s ? s(n[o]) : n[o]; + if (c !== r) { + e = false; + } + })); + return e; + } + return false; + }; + const equalWH = (t, n) => equal(t, n, [ "w", "h" ]); + const equalXY = (t, n) => equal(t, n, [ "x", "y" ]); + const equalTRBL = (t, n) => equal(t, n, [ "t", "r", "b", "l" ]); + const noop = () => {}; + const bind = (t, ...n) => t.bind(0, ...n); + const selfClearTimeout = t => { + let n; + const o = t ? u : a; + const s = t ? _ : i; + return [ e => { + s(n); + n = o((() => e()), isFunction(t) ? t() : t); + }, () => s(n) ]; + }; + const debounce = (t, n) => { + const {_: o, v: s, p: e, S: c} = n || {}; + let r; + let l; + let d; + let f; + let v = noop; + const p = function invokeFunctionToDebounce(n) { + v(); + _(r); + f = r = l = void 0; + v = noop; + t.apply(this, n); + }; + const mergeParms = t => c && l ? c(l, t) : t; + const flush = () => { + if (v !== noop) { + p(mergeParms(d) || d); + } + }; + const g = function debouncedFn() { + const t = from(arguments); + const n = isFunction(o) ? o() : o; + const c = isNumber(n) && n >= 0; + if (c) { + const o = isFunction(s) ? s() : s; + const c = isNumber(o) && o >= 0; + const g = n > 0 ? u : a; + const h = n > 0 ? _ : i; + const b = mergeParms(t); + const y = b || t; + const w = p.bind(0, y); + let S; + v(); + if (e && !f) { + w(); + f = true; + S = g((() => f = void 0), n); + } else { + S = g(w, n); + if (c && !r) { + r = u(flush, o); + } + } + v = () => h(S); + l = d = y; + } else { + p(t); + } + }; + g.m = flush; + return g; + }; + const hasOwnProperty = (t, n) => Object.prototype.hasOwnProperty.call(t, n); + const keys = t => t ? Object.keys(t) : []; + const assignDeep = (t, n, o, s, e, c, r) => { + const l = [ n, o, s, e, c, r ]; + if ((typeof t !== "object" || isNull(t)) && !isFunction(t)) { + t = {}; + } + each(l, (n => { + each(n, ((o, s) => { + const e = n[s]; + if (t === e) { + return true; + } + const c = isArray(e); + if (e && isPlainObject(e)) { + const n = t[s]; + let o = n; + if (c && !isArray(n)) { + o = []; + } else if (!c && !isPlainObject(n)) { + o = {}; + } + t[s] = assignDeep(o, e); + } else { + t[s] = c ? e.slice() : e; + } + })); + })); + return t; + }; + const removeUndefinedProperties = (t, n) => each(assignDeep({}, t), ((t, o, s) => { + if (t === void 0) { + delete s[o]; + } else if (n && t && isPlainObject(t)) { + s[o] = removeUndefinedProperties(t, n); + } + })); + const isEmptyObject = t => !keys(t).length; + const capNumber = (t, n, o) => s(t, e(n, o)); + const getDomTokensArray = t => deduplicateArray((isArray(t) ? t : (t || "").split(" ")).filter((t => t))); + const getAttr = (t, n) => t && t.getAttribute(n); + const hasAttr = (t, n) => t && t.hasAttribute(n); + const setAttrs = (t, n, o) => { + each(getDomTokensArray(n), (n => { + t && t.setAttribute(n, String(o || "")); + })); + }; + const removeAttrs = (t, n) => { + each(getDomTokensArray(n), (n => t && t.removeAttribute(n))); + }; + const domTokenListAttr = (t, n) => { + const o = getDomTokensArray(getAttr(t, n)); + const s = bind(setAttrs, t, n); + const domTokenListOperation = (t, n) => { + const s = new Set(o); + each(getDomTokensArray(t), (t => { + s[n](t); + })); + return from(s).join(" "); + }; + return { + O: t => s(domTokenListOperation(t, "delete")), + $: t => s(domTokenListOperation(t, "add")), + C: t => { + const n = getDomTokensArray(t); + return n.reduce(((t, n) => t && o.includes(n)), n.length > 0); + } + }; + }; + const removeAttrClass = (t, n, o) => { + domTokenListAttr(t, n).O(o); + return bind(addAttrClass, t, n, o); + }; + const addAttrClass = (t, n, o) => { + domTokenListAttr(t, n).$(o); + return bind(removeAttrClass, t, n, o); + }; + const addRemoveAttrClass = (t, n, o, s) => (s ? addAttrClass : removeAttrClass)(t, n, o); + const hasAttrClass = (t, n, o) => domTokenListAttr(t, n).C(o); + const createDomTokenListClass = t => domTokenListAttr(t, "class"); + const removeClass = (t, n) => { + createDomTokenListClass(t).O(n); + }; + const addClass = (t, n) => { + createDomTokenListClass(t).$(n); + return bind(removeClass, t, n); + }; + const find = (t, n) => { + const o = n ? isElement(n) && n : document; + return o ? from(o.querySelectorAll(t)) : []; + }; + const findFirst = (t, n) => { + const o = n ? isElement(n) && n : document; + return o && o.querySelector(t); + }; + const is = (t, n) => isElement(t) && t.matches(n); + const isBodyElement = t => is(t, "body"); + const contents = t => t ? from(t.childNodes) : []; + const parent = t => t && t.parentElement; + const closest = (t, n) => isElement(t) && t.closest(n); + const getFocusedElement = t => (t || document).activeElement; + const liesBetween = (t, n, o) => { + const s = closest(t, n); + const e = t && findFirst(o, s); + const c = closest(e, n) === s; + return s && e ? s === t || e === t || c && closest(closest(t, o), n) !== s : false; + }; + const removeElements = t => { + each(createOrKeepArray(t), (t => { + const n = parent(t); + t && n && n.removeChild(t); + })); + }; + const appendChildren = (t, n) => bind(removeElements, t && n && each(createOrKeepArray(n), (n => { + n && t.appendChild(n); + }))); + const createDiv = t => { + const n = document.createElement("div"); + setAttrs(n, "class", t); + return n; + }; + const createDOM = t => { + const n = createDiv(); + n.innerHTML = t.trim(); + return each(contents(n), (t => removeElements(t))); + }; + const getCSSVal = (t, n) => t.getPropertyValue(n) || t[n] || ""; + const validFiniteNumber = t => { + const n = t || 0; + return isFinite(n) ? n : 0; + }; + const parseToZeroOrNumber = t => validFiniteNumber(parseFloat(t || "")); + const roundCssNumber = t => Math.round(t * 1e4) / 1e4; + const numberToCssPx = t => `${roundCssNumber(validFiniteNumber(t))}px`; + function setStyles(t, n) { + t && n && each(n, ((n, o) => { + try { + const s = t.style; + const e = isNull(n) || isBoolean(n) ? "" : isNumber(n) ? numberToCssPx(n) : n; + if (o.indexOf("--") === 0) { + s.setProperty(o, e); + } else { + s[o] = e; + } + } catch (s) {} + })); + } + function getStyles(t, n, s) { + const e = isString(n); + let c = e ? "" : {}; + if (t) { + const r = o.getComputedStyle(t, s) || t.style; + c = e ? getCSSVal(r, n) : from(n).reduce(((t, n) => { + t[n] = getCSSVal(r, n); + return t; + }), c); + } + return c; + } + const topRightBottomLeft = (t, n, o) => { + const s = n ? `${n}-` : ""; + const e = o ? `-${o}` : ""; + const c = `${s}top${e}`; + const r = `${s}right${e}`; + const l = `${s}bottom${e}`; + const i = `${s}left${e}`; + const a = getStyles(t, [ c, r, l, i ]); + return { + t: parseToZeroOrNumber(a[c]), + r: parseToZeroOrNumber(a[r]), + b: parseToZeroOrNumber(a[l]), + l: parseToZeroOrNumber(a[i]) + }; + }; + const getTrasformTranslateValue = (t, n) => `translate${isObject(t) ? `(${t.x},${t.y})` : `${n ? "X" : "Y"}(${t})`}`; + const elementHasDimensions = t => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length); + const I = { + w: 0, + h: 0 + }; + const getElmWidthHeightProperty = (t, n) => n ? { + w: n[`${t}Width`], + h: n[`${t}Height`] + } : I; + const getWindowSize = t => getElmWidthHeightProperty("inner", t || o); + const A = bind(getElmWidthHeightProperty, "offset"); + const D = bind(getElmWidthHeightProperty, "client"); + const T = bind(getElmWidthHeightProperty, "scroll"); + const getFractionalSize = t => { + const n = parseFloat(getStyles(t, C)) || 0; + const o = parseFloat(getStyles(t, x)) || 0; + return { + w: n - c(n), + h: o - c(o) + }; + }; + const getBoundingClientRect = t => t.getBoundingClientRect(); + const hasDimensions = t => !!t && elementHasDimensions(t); + const domRectHasDimensions = t => !!(t && (t[x] || t[C])); + const domRectAppeared = (t, n) => { + const o = domRectHasDimensions(t); + const s = domRectHasDimensions(n); + return !s && o; + }; + const removeEventListener = (t, n, o, s) => { + each(getDomTokensArray(n), (n => { + t && t.removeEventListener(n, o, s); + })); + }; + const addEventListener = (t, n, o, s) => { + var e; + const c = (e = s && s.H) != null ? e : true; + const r = s && s.I || false; + const l = s && s.A || false; + const i = { + passive: c, + capture: r + }; + return bind(runEachAndClear, getDomTokensArray(n).map((n => { + const s = l ? e => { + removeEventListener(t, n, s, r); + o && o(e); + } : o; + t && t.addEventListener(n, s, i); + return bind(removeEventListener, t, n, s, r); + }))); + }; + const stopPropagation = t => t.stopPropagation(); + const preventDefault = t => t.preventDefault(); + const stopAndPrevent = t => stopPropagation(t) || preventDefault(t); + const scrollElementTo = (t, n) => { + const {x: o, y: s} = isNumber(n) ? { + x: n, + y: n + } : n || {}; + isNumber(o) && (t.scrollLeft = o); + isNumber(s) && (t.scrollTop = s); + }; + const getElementScroll = t => ({ + x: t.scrollLeft, + y: t.scrollTop + }); + const getZeroScrollCoordinates = () => ({ + D: { + x: 0, + y: 0 + }, + T: { + x: 0, + y: 0 + } + }); + const sanitizeScrollCoordinates = (t, n) => { + const {D: o, T: s} = t; + const {w: e, h: c} = n; + const sanitizeAxis = (t, n, o) => { + let s = l(t) * o; + let e = l(n) * o; + if (s === e) { + const o = r(t); + const c = r(n); + e = o > c ? 0 : e; + s = o < c ? 0 : s; + } + s = s === e ? 0 : s; + return [ s + 0, e + 0 ]; + }; + const [i, a] = sanitizeAxis(o.x, s.x, e); + const [u, _] = sanitizeAxis(o.y, s.y, c); + return { + D: { + x: i, + y: u + }, + T: { + x: a, + y: _ + } + }; + }; + const isDefaultDirectionScrollCoordinates = ({D: t, T: n}) => { + const getAxis = (t, n) => t === 0 && t <= n; + return { + x: getAxis(t.x, n.x), + y: getAxis(t.y, n.y) + }; + }; + const getScrollCoordinatesPercent = ({D: t, T: n}, o) => { + const getAxis = (t, n, o) => capNumber(0, 1, (t - o) / (t - n) || 0); + return { + x: getAxis(t.x, n.x, o.x), + y: getAxis(t.y, n.y, o.y) + }; + }; + const focusElement = t => { + if (t && t.focus) { + t.focus({ + preventScroll: true + }); + } + }; + const manageListener = (t, n) => { + each(createOrKeepArray(n), t); + }; + const createEventListenerHub = t => { + const n = new Map; + const removeEvent = (t, o) => { + if (t) { + const s = n.get(t); + manageListener((t => { + if (s) { + s[t ? "delete" : "clear"](t); + } + }), o); + } else { + n.forEach((t => { + t.clear(); + })); + n.clear(); + } + }; + const addEvent = (t, o) => { + if (isString(t)) { + const s = n.get(t) || new Set; + n.set(t, s); + manageListener((t => { + isFunction(t) && s.add(t); + }), o); + return bind(removeEvent, t, o); + } + if (isBoolean(o) && o) { + removeEvent(); + } + const s = keys(t); + const e = []; + each(s, (n => { + const o = t[n]; + o && push(e, addEvent(n, o)); + })); + return bind(runEachAndClear, e); + }; + const triggerEvent = (t, o) => { + each(from(n.get(t)), (t => { + if (o && !isEmptyArray(o)) { + t.apply(0, o); + } else { + t(); + } + })); + }; + addEvent(t || {}); + return [ addEvent, removeEvent, triggerEvent ]; + }; + const opsStringify = t => JSON.stringify(t, ((t, n) => { + if (isFunction(n)) { + throw 0; + } + return n; + })); + const getPropByPath = (t, n) => t ? `${n}`.split(".").reduce(((t, n) => t && hasOwnProperty(t, n) ? t[n] : void 0), t) : void 0; + const M = { + paddingAbsolute: false, + showNativeOverlaidScrollbars: false, + update: { + elementEvents: [ [ "img", "load" ] ], + debounce: [ 0, 33 ], + attributes: null, + ignoreMutation: null + }, + overflow: { + x: "scroll", + y: "scroll" + }, + scrollbars: { + theme: "os-theme-dark", + visibility: "auto", + autoHide: "never", + autoHideDelay: 1300, + autoHideSuspend: false, + dragScroll: true, + clickScroll: false, + pointers: [ "mouse", "touch", "pen" ] + } + }; + const getOptionsDiff = (t, n) => { + const o = {}; + const s = concat(keys(n), keys(t)); + each(s, (s => { + const e = t[s]; + const c = n[s]; + if (isObject(e) && isObject(c)) { + assignDeep(o[s] = {}, getOptionsDiff(e, c)); + if (isEmptyObject(o[s])) { + delete o[s]; + } + } else if (hasOwnProperty(n, s) && c !== e) { + let t = true; + if (isArray(e) || isArray(c)) { + try { + if (opsStringify(e) === opsStringify(c)) { + t = false; + } + } catch (r) {} + } + if (t) { + o[s] = c; + } + } + })); + return o; + }; + const createOptionCheck = (t, n, o) => s => [ getPropByPath(t, s), o || getPropByPath(n, s) !== void 0 ]; + const k = `data-overlayscrollbars`; + const R = "os-environment"; + const V = `${R}-scrollbar-hidden`; + const L = `${k}-initialize`; + const U = "noClipping"; + const P = `${k}-body`; + const N = k; + const q = "host"; + const j = `${k}-viewport`; + const B = O; + const F = $; + const X = "arrange"; + const Y = "measuring"; + const W = "scrolling"; + const G = "scrollbarHidden"; + const J = "noContent"; + const K = `${k}-padding`; + const Q = `${k}-content`; + const Z = "os-size-observer"; + const tt = `${Z}-appear`; + const nt = `${Z}-listener`; + const ot = `${nt}-scroll`; + const st = `${nt}-item`; + const et = `${st}-final`; + const ct = "os-trinsic-observer"; + const rt = "os-theme-none"; + const lt = "os-scrollbar"; + const it = `${lt}-rtl`; + const at = `${lt}-horizontal`; + const ut = `${lt}-vertical`; + const _t = `${lt}-track`; + const dt = `${lt}-handle`; + const ft = `${lt}-visible`; + const vt = `${lt}-cornerless`; + const pt = `${lt}-interaction`; + const gt = `${lt}-unusable`; + const ht = `${lt}-auto-hide`; + const bt = `${ht}-hidden`; + const yt = `${lt}-wheel`; + const wt = `${_t}-interactive`; + const St = `${dt}-interactive`; + let mt; + const getNonce = () => mt; + const setNonce = t => { + mt = t; + }; + let Ot; + const createEnvironment = () => { + const getNativeScrollbarSize = (t, n, o) => { + appendChildren(document.body, t); + appendChildren(document.body, t); + const s = D(t); + const e = A(t); + const c = getFractionalSize(n); + o && removeElements(t); + return { + x: e.h - s.h + c.h, + y: e.w - s.w + c.w + }; + }; + const getNativeScrollbarsHiding = t => { + let n = false; + const o = addClass(t, V); + try { + n = getStyles(t, "scrollbar-width") === "none" || getStyles(t, "display", "::-webkit-scrollbar") === "none"; + } catch (s) {} + o(); + return n; + }; + const t = `.${R}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${R} div{width:200%;height:200%;margin:10px 0}.${V}{scrollbar-width:none!important}.${V}::-webkit-scrollbar,.${V}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`; + const n = createDOM(`
`); + const s = n[0]; + const e = s.firstChild; + const c = s.lastChild; + const r = getNonce(); + if (r) { + c.nonce = r; + } + const [l, , i] = createEventListenerHub(); + const [a, u] = createCache({ + o: getNativeScrollbarSize(s, e), + i: equalXY + }, bind(getNativeScrollbarSize, s, e, true)); + const [_] = u(); + const d = getNativeScrollbarsHiding(s); + const f = { + x: _.x === 0, + y: _.y === 0 + }; + const v = { + elements: { + host: null, + padding: !d, + viewport: t => d && isBodyElement(t) && t, + content: false + }, + scrollbars: { + slot: true + }, + cancel: { + nativeScrollbarsOverlaid: false, + body: null + } + }; + const g = assignDeep({}, M); + const h = bind(assignDeep, {}, g); + const b = bind(assignDeep, {}, v); + const y = { + M: _, + k: f, + R: d, + V: !!p, + L: bind(l, "r"), + U: b, + P: t => assignDeep(v, t) && b(), + N: h, + q: t => assignDeep(g, t) && h(), + j: assignDeep({}, v), + B: assignDeep({}, g) + }; + removeAttrs(s, "style"); + removeElements(s); + addEventListener(o, "resize", (() => { + i("r", []); + })); + if (isFunction(o.matchMedia) && !d && (!f.x || !f.y)) { + const addZoomListener = t => { + const n = o.matchMedia(`(resolution: ${o.devicePixelRatio}dppx)`); + addEventListener(n, "change", (() => { + t(); + addZoomListener(t); + }), { + A: true + }); + }; + addZoomListener((() => { + const [t, n] = a(); + assignDeep(y.M, t); + i("r", [ n ]); + })); + } + return y; + }; + const getEnvironment = () => { + if (!Ot) { + Ot = createEnvironment(); + } + return Ot; + }; + const resolveInitialization = (t, n) => isFunction(n) ? n.apply(0, t) : n; + const staticInitializationElement = (t, n, o, s) => { + const e = isUndefined(s) ? o : s; + const c = resolveInitialization(t, e); + return c || n.apply(0, t); + }; + const dynamicInitializationElement = (t, n, o, s) => { + const e = isUndefined(s) ? o : s; + const c = resolveInitialization(t, e); + return !!c && (isHTMLElement(c) ? c : n.apply(0, t)); + }; + const cancelInitialization = (t, n) => { + const {nativeScrollbarsOverlaid: o, body: s} = n || {}; + const {k: e, R: c, U: r} = getEnvironment(); + const {nativeScrollbarsOverlaid: l, body: i} = r().cancel; + const a = o != null ? o : l; + const u = isUndefined(s) ? i : s; + const _ = (e.x || e.y) && a; + const d = t && (isNull(u) ? !c : u); + return !!_ || !!d; + }; + const $t = new WeakMap; + const addInstance = (t, n) => { + $t.set(t, n); + }; + const removeInstance = t => { + $t.delete(t); + }; + const getInstance = t => $t.get(t); + const createEventContentChange = (t, n, o) => { + let s = false; + const e = o ? new WeakMap : false; + const destroy = () => { + s = true; + }; + const updateElements = c => { + if (e && o) { + const r = o.map((n => { + const [o, s] = n || []; + const e = s && o ? (c || find)(o, t) : []; + return [ e, s ]; + })); + each(r, (o => each(o[0], (c => { + const r = o[1]; + const l = e.get(c) || []; + const i = t.contains(c); + if (i && r) { + const t = addEventListener(c, r, (o => { + if (s) { + t(); + e.delete(c); + } else { + n(o); + } + })); + e.set(c, push(l, t)); + } else { + runEachAndClear(l); + e.delete(c); + } + })))); + } + }; + updateElements(); + return [ destroy, updateElements ]; + }; + const createDOMObserver = (t, n, o, s) => { + let e = false; + const {F: c, X: r, Y: l, W: i, G: a, J: u} = s || {}; + const _ = debounce((() => e && o(true)), { + _: 33, + v: 99 + }); + const [f, v] = createEventContentChange(t, _, l); + const p = c || []; + const g = r || []; + const h = concat(p, g); + const observerCallback = (e, c) => { + if (!isEmptyArray(c)) { + const r = a || noop; + const l = u || noop; + const _ = []; + const d = []; + let f = false; + let p = false; + each(c, (o => { + const {attributeName: e, target: c, type: a, oldValue: u, addedNodes: v, removedNodes: h} = o; + const b = a === "attributes"; + const y = a === "childList"; + const w = t === c; + const S = b && e; + const m = S && getAttr(c, e || ""); + const O = isString(m) ? m : null; + const $ = S && u !== O; + const C = inArray(g, e) && $; + if (n && (y || !w)) { + const n = b && $; + const a = n && i && is(c, i); + const d = a ? !r(c, e, u, O) : !b || n; + const f = d && !l(o, !!a, t, s); + each(v, (t => push(_, t))); + each(h, (t => push(_, t))); + p = p || f; + } + if (!n && w && $ && !r(c, e, u, O)) { + push(d, e); + f = f || C; + } + })); + v((t => deduplicateArray(_).reduce(((n, o) => { + push(n, find(t, o)); + return is(o, t) ? push(n, o) : n; + }), []))); + if (n) { + !e && p && o(false); + return [ false ]; + } + if (!isEmptyArray(d) || f) { + const t = [ deduplicateArray(d), f ]; + !e && o.apply(0, t); + return t; + } + } + }; + const b = new d(bind(observerCallback, false)); + return [ () => { + b.observe(t, { + attributes: true, + attributeOldValue: true, + attributeFilter: h, + subtree: n, + childList: n, + characterData: n + }); + e = true; + return () => { + if (e) { + f(); + b.disconnect(); + e = false; + } + }; + }, () => { + if (e) { + _.m(); + return observerCallback(true, b.takeRecords()); + } + } ]; + }; + const Ct = {}; + const xt = {}; + const addPlugins = t => { + each(t, (t => each(t, ((n, o) => { + Ct[o] = t[o]; + })))); + }; + const registerPluginModuleInstances = (t, n, o) => keys(t).map((s => { + const {static: e, instance: c} = t[s]; + const [r, l, i] = o || []; + const a = o ? c : e; + if (a) { + const t = o ? a(r, l, n) : a(n); + return (i || xt)[s] = t; + } + })); + const getStaticPluginModuleInstance = t => xt[t]; + const Ht = "__osOptionsValidationPlugin"; + const Et = "__osSizeObserverPlugin"; + const zt = /* @__PURE__ */ (() => ({ + [Et]: { + static: () => (t, n, o) => { + const s = 3333333; + const e = "scroll"; + const c = createDOM(`
`); + const r = c[0]; + const l = r.lastChild; + const u = r.firstChild; + const _ = u == null ? void 0 : u.firstChild; + let d = A(r); + let f = d; + let v = false; + let p; + const reset = () => { + scrollElementTo(u, s); + scrollElementTo(l, s); + }; + const onResized = t => { + p = 0; + if (v) { + d = f; + n(t === true); + } + }; + const onScroll = t => { + f = A(r); + v = !t || !equalWH(f, d); + if (t) { + stopPropagation(t); + if (v && !p) { + i(p); + p = a(onResized); + } + } else { + onResized(t === false); + } + reset(); + }; + const g = [ appendChildren(t, c), addEventListener(u, e, onScroll), addEventListener(l, e, onScroll) ]; + addClass(t, ot); + setStyles(_, { + [C]: s, + [x]: s + }); + a(reset); + return [ o ? bind(onScroll, false) : reset, g ]; + } + } + }))(); + const getShowNativeOverlaidScrollbars = (t, n) => { + const {k: o} = n; + const [s, e] = t("showNativeOverlaidScrollbars"); + return [ s && o.x && o.y, e ]; + }; + const overflowIsVisible = t => t.indexOf(H) === 0; + const createViewportOverflowState = (t, n) => { + const getAxisOverflowStyle = (t, n, o, s) => { + const e = t === H ? E : t.replace(`${H}-`, ""); + const c = overflowIsVisible(t); + const r = overflowIsVisible(o); + if (!n && !s) { + return E; + } + if (c && r) { + return H; + } + if (c) { + const t = n ? H : E; + return n && s ? e : t; + } + const l = r && s ? H : E; + return n ? e : l; + }; + const o = { + x: getAxisOverflowStyle(n.x, t.x, n.y, t.y), + y: getAxisOverflowStyle(n.y, t.y, n.x, t.x) + }; + return { + K: o, + Z: { + x: o.x === z, + y: o.y === z + } + }; + }; + const It = "__osScrollbarsHidingPlugin"; + const At = /* @__PURE__ */ (() => ({ + [It]: { + static: () => ({ + tt: (t, n, o, s, e) => { + const {nt: c, ot: r} = t; + const {R: l, k: i, M: a} = s; + const u = !c && !l && (i.x || i.y); + const [_] = getShowNativeOverlaidScrollbars(e, s); + const readViewportOverflowState = () => { + const getStatePerAxis = t => { + const n = getStyles(r, t); + const o = n === z; + return [ n, o ]; + }; + const [t, n] = getStatePerAxis(O); + const [o, s] = getStatePerAxis($); + return { + K: { + x: t, + y: o + }, + Z: { + x: n, + y: s + } + }; + }; + const _getViewportOverflowHideOffset = t => { + const {Z: n} = t; + const o = l || _ ? 0 : 42; + const getHideOffsetPerAxis = (t, n, s) => { + const e = t ? o : s; + const c = n && !l ? e : 0; + const r = t && !!o; + return [ c, r ]; + }; + const [s, e] = getHideOffsetPerAxis(i.x, n.x, a.x); + const [c, r] = getHideOffsetPerAxis(i.y, n.y, a.y); + return { + st: { + x: s, + y: c + }, + et: { + x: e, + y: r + } + }; + }; + const _hideNativeScrollbars = (t, {ct: o}, s) => { + if (!c) { + const e = assignDeep({}, { + [S]: 0, + [m]: 0, + [w]: 0 + }); + const {st: c, et: r} = _getViewportOverflowHideOffset(t); + const {x: l, y: i} = r; + const {x: a, y: u} = c; + const {rt: _} = n; + const d = o ? w : S; + const f = o ? b : h; + const v = _[d]; + const p = _[m]; + const g = _[f]; + const O = _[y]; + e[C] = `calc(100% + ${u + v * -1}px)`; + e[d] = -u + v; + e[m] = -a + p; + if (s) { + e[f] = g + (i ? u : 0); + e[y] = O + (l ? a : 0); + } + return e; + } + }; + const _arrangeViewport = (t, s, e) => { + if (u) { + const {rt: c} = n; + const {st: l, et: i} = _getViewportOverflowHideOffset(t); + const {x: a, y: u} = i; + const {x: _, y: d} = l; + const {ct: f} = o; + const v = f ? h : b; + const p = c[v]; + const g = c.paddingTop; + const y = s.w + e.w; + const w = s.h + e.h; + const S = { + w: d && u ? `${d + y - p}px` : "", + h: _ && a ? `${_ + w - g}px` : "" + }; + setStyles(r, { + "--os-vaw": S.w, + "--os-vah": S.h + }); + } + return u; + }; + const _undoViewportArrange = t => { + if (u) { + const s = t || readViewportOverflowState(); + const {rt: e} = n; + const {et: c} = _getViewportOverflowHideOffset(s); + const {x: l, y: i} = c; + const a = {}; + const assignProps = t => each(t, (t => { + a[t] = e[t]; + })); + if (l) { + assignProps([ m, g, y ]); + } + if (i) { + assignProps([ w, S, b, h ]); + } + const _ = getStyles(r, keys(a)); + const d = removeAttrClass(r, j, X); + setStyles(r, a); + return [ () => { + setStyles(r, assignDeep({}, _, _hideNativeScrollbars(s, o, u))); + d(); + }, s ]; + } + return [ noop ]; + }; + return { + lt: _getViewportOverflowHideOffset, + it: _arrangeViewport, + ut: _undoViewportArrange, + _t: _hideNativeScrollbars + }; + } + }) + } + }))(); + const Dt = "__osClickScrollPlugin"; + const Tt = /* @__PURE__ */ (() => ({ + [Dt]: { + static: () => (t, n, o, s, e) => { + let c = false; + let r = noop; + let l = noop; + const [i, a] = selfClearTimeout(133); + const animateClickScroll = (r, a, u) => animateNumber(r, r + s * Math.sign(o), a ? 133 : 222, ((o, r, u) => { + t(o); + const _ = n(); + const d = _ + s; + const f = e >= _ && e <= d; + const animationCompletedAction = () => { + l = animateClickScroll(o, a + 1); + }; + if (!c && u && !f) { + if (a) { + animationCompletedAction(); + } else { + i(animationCompletedAction); + } + } + }), u); + r = animateClickScroll(0, 0, (t => 1 - (1 - t) * (1 - t))); + return t => { + c = true; + a(); + if (t) { + r(); + l(); + } else { + l(); + } + }; + } + } + }))(); + const createSizeObserver = (t, n, o) => { + const {dt: s} = o || {}; + const e = getStaticPluginModuleInstance(Et); + const [c] = createCache({ + o: false, + u: true + }); + return () => { + const o = []; + const r = createDOM(`
`); + const l = r[0]; + const i = l.firstChild; + const onSizeChangedCallbackProxy = t => { + const o = t instanceof ResizeObserverEntry; + let s = false; + let e = false; + if (o) { + const [n, , o] = c(t.contentRect); + const r = domRectHasDimensions(n); + e = domRectAppeared(n, o); + s = !e && !r; + } else { + e = t === true; + } + if (!s) { + n({ + ft: true, + dt: e + }); + } + }; + if (v) { + const t = new v((t => onSizeChangedCallbackProxy(t.pop()))); + t.observe(i); + push(o, (() => { + t.disconnect(); + })); + } else if (e) { + const [t, n] = e(i, onSizeChangedCallbackProxy, s); + push(o, concat([ addClass(l, tt), addEventListener(l, "animationstart", t) ], n)); + } else { + return noop; + } + return bind(runEachAndClear, push(o, appendChildren(t, l))); + }; + }; + const createTrinsicObserver = (t, n) => { + let o; + const isHeightIntrinsic = t => t.h === 0 || t.isIntersecting || t.intersectionRatio > 0; + const s = createDiv(ct); + const [e] = createCache({ + o: false + }); + const triggerOnTrinsicChangedCallback = (t, o) => { + if (t) { + const s = e(isHeightIntrinsic(t)); + const [, c] = s; + return c && !o && n(s) && [ s ]; + } + }; + const intersectionObserverCallback = (t, n) => triggerOnTrinsicChangedCallback(n.pop(), t); + return [ () => { + const n = []; + if (f) { + o = new f(bind(intersectionObserverCallback, false), { + root: t + }); + o.observe(s); + push(n, (() => { + o.disconnect(); + })); + } else { + const onSizeChanged = () => { + const t = A(s); + triggerOnTrinsicChangedCallback(t); + }; + push(n, createSizeObserver(s, onSizeChanged)()); + onSizeChanged(); + } + return bind(runEachAndClear, push(n, appendChildren(t, s))); + }, () => o && intersectionObserverCallback(true, o.takeRecords()) ]; + }; + const createObserversSetup = (t, n, o, s) => { + let e; + let c; + let r; + let l; + let i; + let a; + const u = `[${N}]`; + const _ = `[${j}]`; + const d = [ "id", "class", "style", "open", "wrap", "cols", "rows" ]; + const {vt: f, gt: p, ot: g, ht: h, bt: b, nt: y, yt: w, wt: S, St: m, Ot: O} = t; + const getDirectionIsRTL = t => getStyles(t, "direction") === "rtl"; + const $ = { + $t: false, + ct: getDirectionIsRTL(f) + }; + const C = getEnvironment(); + const x = getStaticPluginModuleInstance(It); + const [H] = createCache({ + i: equalWH, + o: { + w: 0, + h: 0 + } + }, (() => { + const s = x && x.tt(t, n, $, C, o).ut; + const e = w && y; + const c = !e && hasAttrClass(p, N, U); + const r = !y && S(X); + const l = r && getElementScroll(h); + const i = l && O(); + const a = m(Y, c); + const u = r && s && s()[0]; + const _ = T(g); + const d = getFractionalSize(g); + u && u(); + scrollElementTo(h, l); + i && i(); + c && a(); + return { + w: _.w + d.w, + h: _.h + d.h + }; + })); + const E = debounce(s, { + _: () => e, + v: () => c, + S(t, n) { + const [o] = t; + const [s] = n; + return [ concat(keys(o), keys(s)).reduce(((t, n) => { + t[n] = o[n] || s[n]; + return t; + }), {}) ]; + } + }); + const setDirection = t => { + const n = getDirectionIsRTL(f); + assignDeep(t, { + Ct: a !== n + }); + assignDeep($, { + ct: n + }); + a = n; + }; + const onTrinsicChanged = (t, n) => { + const [o, e] = t; + const c = { + xt: e + }; + assignDeep($, { + $t: o + }); + !n && s(c); + return c; + }; + const onSizeChanged = ({ft: t, dt: n}) => { + const o = t && !n; + const e = !o && C.R ? E : s; + const c = { + ft: t || n, + dt: n + }; + setDirection(c); + e(c); + }; + const onContentMutation = (t, n) => { + const [, o] = H(); + const e = { + Ht: o + }; + setDirection(e); + const c = t ? s : E; + o && !n && c(e); + return e; + }; + const onHostMutation = (t, n, o) => { + const s = { + Et: n + }; + setDirection(s); + if (n && !o) { + E(s); + } + return s; + }; + const [z, I] = b ? createTrinsicObserver(p, onTrinsicChanged) : []; + const A = !y && createSizeObserver(p, onSizeChanged, { + dt: true + }); + const [D, M] = createDOMObserver(p, false, onHostMutation, { + X: d, + F: d + }); + const k = y && v && new v((t => { + const n = t[t.length - 1].contentRect; + onSizeChanged({ + ft: true, + dt: domRectAppeared(n, i) + }); + i = n; + })); + const R = debounce((() => { + const [, t] = H(); + s({ + Ht: t + }); + }), { + _: 222, + p: true + }); + return [ () => { + k && k.observe(p); + const t = A && A(); + const n = z && z(); + const o = D(); + const s = C.L((t => { + if (t) { + E({ + zt: t + }); + } else { + R(); + } + })); + return () => { + k && k.disconnect(); + t && t(); + n && n(); + l && l(); + o(); + s(); + }; + }, ({It: t, At: n, Dt: o}) => { + const s = {}; + const [i] = t("update.ignoreMutation"); + const [a, f] = t("update.attributes"); + const [v, p] = t("update.elementEvents"); + const [h, w] = t("update.debounce"); + const S = p || f; + const m = n || o; + const ignoreMutationFromOptions = t => isFunction(i) && i(t); + if (S) { + r && r(); + l && l(); + const [t, n] = createDOMObserver(b || g, true, onContentMutation, { + F: concat(d, a || []), + Y: v, + W: u, + J: (t, n) => { + const {target: o, attributeName: s} = t; + const e = !n && s && !y ? liesBetween(o, u, _) : false; + return e || !!closest(o, `.${lt}`) || !!ignoreMutationFromOptions(t); + } + }); + l = t(); + r = n; + } + if (w) { + E.m(); + if (isArray(h)) { + const t = h[0]; + const n = h[1]; + e = isNumber(t) && t; + c = isNumber(n) && n; + } else if (isNumber(h)) { + e = h; + c = false; + } else { + e = false; + c = false; + } + } + if (m) { + const t = M(); + const n = I && I(); + const o = r && r(); + t && assignDeep(s, onHostMutation(t[0], t[1], m)); + n && assignDeep(s, onTrinsicChanged(n[0], m)); + o && assignDeep(s, onContentMutation(o[0], m)); + } + setDirection(s); + return s; + }, $ ]; + }; + const createScrollbarsSetupElements = (t, n, o, s) => { + const e = "--os-viewport-percent"; + const c = "--os-scroll-percent"; + const r = "--os-scroll-direction"; + const {U: l} = getEnvironment(); + const {scrollbars: i} = l(); + const {slot: a} = i; + const {vt: u, gt: _, ot: d, Tt: f, ht: v, yt: g, nt: h} = n; + const {scrollbars: b} = f ? {} : t; + const {slot: y} = b || {}; + const w = []; + const S = []; + const m = []; + const O = dynamicInitializationElement([ u, _, d ], (() => h && g ? u : _), a, y); + const initScrollTimeline = t => { + if (p) { + const n = new p({ + source: v, + axis: t + }); + const _addScrollPercentAnimation = t => { + const o = t.Mt.animate({ + clear: [ "left" ], + [c]: [ 0, 1 ] + }, { + timeline: n + }); + return () => o.cancel(); + }; + return { + kt: _addScrollPercentAnimation + }; + } + }; + const $ = { + x: initScrollTimeline("x"), + y: initScrollTimeline("y") + }; + const getViewportPercent = () => { + const {Rt: t, Vt: n} = o; + const getAxisValue = (t, n) => capNumber(0, 1, t / (t + n) || 0); + return { + x: getAxisValue(n.x, t.x), + y: getAxisValue(n.y, t.y) + }; + }; + const scrollbarStructureAddRemoveClass = (t, n, o) => { + const s = o ? addClass : removeClass; + each(t, (t => { + s(t.Mt, n); + })); + }; + const scrollbarStyle = (t, n) => { + each(t, (t => { + const [o, s] = n(t); + setStyles(o, s); + })); + }; + const scrollbarsAddRemoveClass = (t, n, o) => { + const s = isBoolean(o); + const e = s ? o : true; + const c = s ? !o : true; + e && scrollbarStructureAddRemoveClass(S, t, n); + c && scrollbarStructureAddRemoveClass(m, t, n); + }; + const refreshScrollbarsHandleLength = () => { + const t = getViewportPercent(); + const createScrollbarStyleFn = t => n => [ n.Mt, { + [e]: roundCssNumber(t) + "" + } ]; + scrollbarStyle(S, createScrollbarStyleFn(t.x)); + scrollbarStyle(m, createScrollbarStyleFn(t.y)); + }; + const refreshScrollbarsHandleOffset = () => { + if (!p) { + const {Lt: t} = o; + const n = getScrollCoordinatesPercent(t, getElementScroll(v)); + const createScrollbarStyleFn = t => n => [ n.Mt, { + [c]: roundCssNumber(t) + "" + } ]; + scrollbarStyle(S, createScrollbarStyleFn(n.x)); + scrollbarStyle(m, createScrollbarStyleFn(n.y)); + } + }; + const refreshScrollbarsScrollCoordinates = () => { + const {Lt: t} = o; + const n = isDefaultDirectionScrollCoordinates(t); + const createScrollbarStyleFn = t => n => [ n.Mt, { + [r]: t ? "0" : "1" + } ]; + scrollbarStyle(S, createScrollbarStyleFn(n.x)); + scrollbarStyle(m, createScrollbarStyleFn(n.y)); + }; + const refreshScrollbarsScrollbarOffset = () => { + if (h && !g) { + const {Rt: t, Lt: n} = o; + const s = isDefaultDirectionScrollCoordinates(n); + const e = getScrollCoordinatesPercent(n, getElementScroll(v)); + const styleScrollbarPosition = n => { + const {Mt: o} = n; + const c = parent(o) === d && o; + const getTranslateValue = (t, n, o) => { + const s = n * t; + return numberToCssPx(o ? s : -s); + }; + return [ c, c && { + transform: getTrasformTranslateValue({ + x: getTranslateValue(e.x, t.x, s.x), + y: getTranslateValue(e.y, t.y, s.y) + }) + } ]; + }; + scrollbarStyle(S, styleScrollbarPosition); + scrollbarStyle(m, styleScrollbarPosition); + } + }; + const generateScrollbarDOM = t => { + const n = t ? "x" : "y"; + const o = t ? at : ut; + const e = createDiv(`${lt} ${o}`); + const c = createDiv(_t); + const r = createDiv(dt); + const l = { + Mt: e, + Ut: c, + Pt: r + }; + const i = $[n]; + push(t ? S : m, l); + push(w, [ appendChildren(e, c), appendChildren(c, r), bind(removeElements, e), i && i.kt(l), s(l, scrollbarsAddRemoveClass, t) ]); + return l; + }; + const C = bind(generateScrollbarDOM, true); + const x = bind(generateScrollbarDOM, false); + const appendElements = () => { + appendChildren(O, S[0].Mt); + appendChildren(O, m[0].Mt); + return bind(runEachAndClear, w); + }; + C(); + x(); + return [ { + Nt: refreshScrollbarsHandleLength, + qt: refreshScrollbarsHandleOffset, + jt: refreshScrollbarsScrollCoordinates, + Bt: refreshScrollbarsScrollbarOffset, + Ft: scrollbarsAddRemoveClass, + Xt: { + Yt: S, + Wt: C, + Gt: bind(scrollbarStyle, S) + }, + Jt: { + Yt: m, + Wt: x, + Gt: bind(scrollbarStyle, m) + } + }, appendElements ]; + }; + const createScrollbarsSetupEvents = (t, n, o, s) => (e, l, i) => { + const {gt: a, ot: _, nt: d, ht: f, Kt: v, Ot: p} = n; + const {Mt: g, Ut: h, Pt: b} = e; + const [y, w] = selfClearTimeout(333); + const [S, m] = selfClearTimeout(444); + const scrollOffsetElementScrollBy = t => { + isFunction(f.scrollBy) && f.scrollBy({ + behavior: "smooth", + left: t.x, + top: t.y + }); + }; + const createInteractiveScrollEvents = () => { + const n = "pointerup pointercancel lostpointercapture"; + const s = `client${i ? "X" : "Y"}`; + const e = i ? C : x; + const l = i ? "left" : "top"; + const a = i ? "w" : "h"; + const u = i ? "x" : "y"; + const createRelativeHandleMove = (t, n) => s => { + const {Rt: e} = o; + const c = A(h)[a] - A(b)[a]; + const r = n * s / c; + const l = r * e[u]; + scrollElementTo(f, { + [u]: t + l + }); + }; + const _ = []; + return addEventListener(h, "pointerdown", (o => { + const i = closest(o.target, `.${dt}`) === b; + const d = i ? b : h; + const g = t.scrollbars; + const {button: y, isPrimary: w, pointerType: O} = o; + const {pointers: $} = g; + const C = y === 0 && w && g[i ? "dragScroll" : "clickScroll"] && ($ || []).includes(O); + if (C) { + runEachAndClear(_); + m(); + const t = !i && o.shiftKey; + const g = bind(getBoundingClientRect, b); + const y = bind(getBoundingClientRect, h); + const getHandleOffset = (t, n) => (t || g())[l] - (n || y())[l]; + const w = c(getBoundingClientRect(f)[e]) / A(f)[a] || 1; + const O = createRelativeHandleMove(getElementScroll(f)[u], 1 / w); + const $ = o[s]; + const C = g(); + const x = y(); + const H = C[e]; + const E = getHandleOffset(C, x) + H / 2; + const z = $ - x[l]; + const I = i ? 0 : z - E; + const releasePointerCapture = t => { + runEachAndClear(T); + d.releasePointerCapture(t.pointerId); + }; + const D = p(); + const T = [ () => { + const t = getElementScroll(f); + D(); + const n = getElementScroll(f); + const o = { + x: n.x - t.x, + y: n.y - t.y + }; + if (r(o.x) > 3 || r(o.y) > 3) { + p(); + scrollElementTo(f, t); + scrollOffsetElementScrollBy(o); + S(D); + } + }, addEventListener(v, n, releasePointerCapture), addEventListener(v, "selectstart", (t => preventDefault(t)), { + H: false + }), addEventListener(h, n, releasePointerCapture), addEventListener(h, "pointermove", (n => { + const o = n[s] - $; + if (i || t) { + O(I + o); + } + })) ]; + d.setPointerCapture(o.pointerId); + if (t) { + O(I); + } else if (!i) { + const t = getStaticPluginModuleInstance(Dt); + if (t) { + const n = t(O, getHandleOffset, I, H, z); + push(T, bind(n)); + push(_, bind(n, true)); + } + } + } + })); + }; + let O = true; + return bind(runEachAndClear, [ addEventListener(b, "pointermove pointerleave", s), addEventListener(g, "pointerenter", (() => { + l(pt, true); + })), addEventListener(g, "pointerleave pointercancel", (() => { + l(pt, false); + })), !d && addEventListener(g, "mousedown", (() => { + const t = getFocusedElement(); + if (hasAttr(t, j) || hasAttr(t, N) || t === document.body) { + u(bind(focusElement, _), 25); + } + })), addEventListener(g, "wheel", (t => { + const {deltaX: n, deltaY: o, deltaMode: s} = t; + if (O && s === 0 && parent(g) === a) { + scrollOffsetElementScrollBy({ + x: n, + y: o + }); + } + O = false; + l(yt, true); + y((() => { + O = true; + l(yt); + })); + preventDefault(t); + }), { + H: false, + I: true + }), addEventListener(g, "pointerdown", bind(addEventListener, v, "click", stopAndPrevent, { + A: true, + I: true, + H: false + }), { + I: true + }), createInteractiveScrollEvents(), w, m ]); + }; + const createScrollbarsSetup = (t, n, o, s, e, c) => { + let r; + let l; + let i; + let a; + let u; + let _ = noop; + let d = 0; + const isHoverablePointerType = t => t.pointerType === "mouse"; + const [f, v] = selfClearTimeout(); + const [p, g] = selfClearTimeout(100); + const [h, b] = selfClearTimeout(100); + const [y, w] = selfClearTimeout((() => d)); + const [S, m] = createScrollbarsSetupElements(t, e, s, createScrollbarsSetupEvents(n, e, s, (t => isHoverablePointerType(t) && manageScrollbarsAutoHideInstantInteraction()))); + const {gt: O, Qt: $, yt: C} = e; + const {Ft: x, Nt: E, qt: I, jt: A, Bt: D} = S; + const manageScrollbarsAutoHide = (t, n) => { + w(); + if (t) { + x(bt); + } else { + const t = bind(x, bt, true); + if (d > 0 && !n) { + y(t); + } else { + t(); + } + } + }; + const manageScrollbarsAutoHideInstantInteraction = () => { + if (i ? !r : !a) { + manageScrollbarsAutoHide(true); + p((() => { + manageScrollbarsAutoHide(false); + })); + } + }; + const manageAutoHideSuspension = t => { + x(ht, t, true); + x(ht, t, false); + }; + const onHostMouseEnter = t => { + if (isHoverablePointerType(t)) { + r = i; + i && manageScrollbarsAutoHide(true); + } + }; + const T = [ w, g, b, v, () => _(), addEventListener(O, "pointerover", onHostMouseEnter, { + A: true + }), addEventListener(O, "pointerenter", onHostMouseEnter), addEventListener(O, "pointerleave", (t => { + if (isHoverablePointerType(t)) { + r = false; + i && manageScrollbarsAutoHide(false); + } + })), addEventListener(O, "pointermove", (t => { + isHoverablePointerType(t) && l && manageScrollbarsAutoHideInstantInteraction(); + })), addEventListener($, "scroll", (t => { + f((() => { + I(); + manageScrollbarsAutoHideInstantInteraction(); + })); + c(t); + D(); + })) ]; + return [ () => bind(runEachAndClear, push(T, m())), ({It: t, Dt: n, Zt: e, tn: c}) => { + const {nn: r, sn: f, en: v, cn: p} = c || {}; + const {Ct: g, dt: b} = e || {}; + const {ct: y} = o; + const {k: w} = getEnvironment(); + const {K: S, rn: m} = s; + const [O, T] = t("showNativeOverlaidScrollbars"); + const [M, k] = t("scrollbars.theme"); + const [R, V] = t("scrollbars.visibility"); + const [L, U] = t("scrollbars.autoHide"); + const [P, N] = t("scrollbars.autoHideSuspend"); + const [q] = t("scrollbars.autoHideDelay"); + const [j, B] = t("scrollbars.dragScroll"); + const [F, X] = t("scrollbars.clickScroll"); + const [Y, W] = t("overflow"); + const G = b && !n; + const J = m.x || m.y; + const K = r || f || p || g || n; + const Q = v || V || W; + const Z = O && w.x && w.y; + const setScrollbarVisibility = (t, n, o) => { + const s = t.includes(z) && (R === H || R === "auto" && n === z); + x(ft, s, o); + return s; + }; + d = q; + if (G) { + if (P && J) { + manageAutoHideSuspension(false); + _(); + h((() => { + _ = addEventListener($, "scroll", bind(manageAutoHideSuspension, true), { + A: true + }); + })); + } else { + manageAutoHideSuspension(true); + } + } + if (T) { + x(rt, Z); + } + if (k) { + x(u); + x(M, true); + u = M; + } + if (N && !P) { + manageAutoHideSuspension(true); + } + if (U) { + l = L === "move"; + i = L === "leave"; + a = L === "never"; + manageScrollbarsAutoHide(a, true); + } + if (B) { + x(St, j); + } + if (X) { + x(wt, F); + } + if (Q) { + const t = setScrollbarVisibility(Y.x, S.x, true); + const n = setScrollbarVisibility(Y.y, S.y, false); + const o = t && n; + x(vt, !o); + } + if (K) { + I(); + E(); + D(); + p && A(); + x(gt, !m.x, true); + x(gt, !m.y, false); + x(it, y && !C); + } + }, {}, S ]; + }; + const createStructureSetupElements = t => { + const n = getEnvironment(); + const {U: s, R: e} = n; + const {elements: c} = s(); + const {padding: r, viewport: l, content: i} = c; + const a = isHTMLElement(t); + const u = a ? {} : t; + const {elements: _} = u; + const {padding: d, viewport: f, content: v} = _ || {}; + const p = a ? t : u.target; + const g = isBodyElement(p); + const h = p.ownerDocument; + const b = h.documentElement; + const getDocumentWindow = () => h.defaultView || o; + const y = bind(staticInitializationElement, [ p ]); + const w = bind(dynamicInitializationElement, [ p ]); + const S = bind(createDiv, ""); + const m = bind(y, S, l); + const C = bind(w, S, i); + const elementHasOverflow = t => { + const n = A(t); + const o = T(t); + const s = getStyles(t, O); + const e = getStyles(t, $); + return o.w - n.w > 0 && !overflowIsVisible(s) || o.h - n.h > 0 && !overflowIsVisible(e); + }; + const x = m(f); + const H = x === p; + const E = H && g; + const z = !H && C(v); + const I = !H && x === z; + const D = E ? b : x; + const M = E ? D : p; + const k = !H && w(S, r, d); + const R = !I && z; + const V = [ R, D, k, M ].map((t => isHTMLElement(t) && !parent(t) && t)); + const elementIsGenerated = t => t && inArray(V, t); + const U = !elementIsGenerated(D) && elementHasOverflow(D) ? D : p; + const B = E ? b : D; + const F = E ? h : D; + const X = { + vt: p, + gt: M, + ot: D, + ln: k, + bt: R, + ht: B, + Qt: F, + an: g ? b : U, + Kt: h, + yt: g, + Tt: a, + nt: H, + un: getDocumentWindow, + wt: t => hasAttrClass(D, j, t), + St: (t, n) => addRemoveAttrClass(D, j, t, n), + Ot: () => addRemoveAttrClass(B, j, W, true) + }; + const {vt: Y, gt: J, ln: Z, ot: tt, bt: nt} = X; + const ot = [ () => { + removeAttrs(J, [ N, L ]); + removeAttrs(Y, L); + if (g) { + removeAttrs(b, [ L, N ]); + } + } ]; + let st = contents([ nt, tt, Z, J, Y ].find((t => t && !elementIsGenerated(t)))); + const et = E ? Y : nt || tt; + const ct = bind(runEachAndClear, ot); + const appendElements = () => { + const t = getDocumentWindow(); + const n = getFocusedElement(); + const unwrap = t => { + appendChildren(parent(t), contents(t)); + removeElements(t); + }; + const prepareWrapUnwrapFocus = t => addEventListener(t, "focusin focusout focus blur", stopAndPrevent, { + I: true, + H: false + }); + const o = "tabindex"; + const s = getAttr(tt, o); + const c = prepareWrapUnwrapFocus(n); + setAttrs(J, N, H ? "" : q); + setAttrs(Z, K, ""); + setAttrs(tt, j, ""); + setAttrs(nt, Q, ""); + if (!H) { + setAttrs(tt, o, s || "-1"); + g && setAttrs(b, P, ""); + } + appendChildren(et, st); + appendChildren(J, Z); + appendChildren(Z || J, !H && tt); + appendChildren(tt, nt); + push(ot, [ c, () => { + const t = getFocusedElement(); + const n = elementIsGenerated(tt); + const e = n && t === tt ? Y : t; + const c = prepareWrapUnwrapFocus(e); + removeAttrs(Z, K); + removeAttrs(nt, Q); + removeAttrs(tt, j); + g && removeAttrs(b, P); + s ? setAttrs(tt, o, s) : removeAttrs(tt, o); + elementIsGenerated(nt) && unwrap(nt); + n && unwrap(tt); + elementIsGenerated(Z) && unwrap(Z); + focusElement(e); + c(); + } ]); + if (e && !H) { + addAttrClass(tt, j, G); + push(ot, bind(removeAttrs, tt, j)); + } + focusElement(!H && g && n === Y && t.top === t ? tt : n); + c(); + st = 0; + return ct; + }; + return [ X, appendElements, ct ]; + }; + const createTrinsicUpdateSegment = ({bt: t}) => ({Zt: n, _n: o, Dt: s}) => { + const {xt: e} = n || {}; + const {$t: c} = o; + const r = t && (e || s); + if (r) { + setStyles(t, { + [x]: c && "100%" + }); + } + }; + const createPaddingUpdateSegment = ({gt: t, ln: n, ot: o, nt: s}, e) => { + const [c, r] = createCache({ + i: equalTRBL, + o: topRightBottomLeft() + }, bind(topRightBottomLeft, t, "padding", "")); + return ({It: t, Zt: l, _n: i, Dt: a}) => { + let [u, _] = r(a); + const {R: d} = getEnvironment(); + const {ft: f, Ht: v, Ct: p} = l || {}; + const {ct: O} = i; + const [$, x] = t("paddingAbsolute"); + const H = a || v; + if (f || _ || H) { + [u, _] = c(a); + } + const E = !s && (x || p || _); + if (E) { + const t = !$ || !n && !d; + const s = u.r + u.l; + const c = u.t + u.b; + const r = { + [S]: t && !O ? -s : 0, + [m]: t ? -c : 0, + [w]: t && O ? -s : 0, + top: t ? -u.t : 0, + right: t ? O ? -u.r : "auto" : 0, + left: t ? O ? "auto" : -u.l : 0, + [C]: t && `calc(100% + ${s}px)` + }; + const l = { + [g]: t ? u.t : 0, + [h]: t ? u.r : 0, + [y]: t ? u.b : 0, + [b]: t ? u.l : 0 + }; + setStyles(n || o, r); + setStyles(o, l); + assignDeep(e, { + ln: u, + dn: !t, + rt: n ? l : assignDeep({}, r, l) + }); + } + return { + fn: E + }; + }; + }; + const createOverflowUpdateSegment = (t, n) => { + const e = getEnvironment(); + const {gt: c, ln: r, ot: l, nt: i, Qt: u, ht: _, yt: d, St: f, un: v} = t; + const {R: p} = e; + const g = d && i; + const h = bind(s, 0); + const b = { + display: () => false, + direction: t => t !== "ltr", + flexDirection: t => t.endsWith("-reverse"), + writingMode: t => t !== "horizontal-tb" + }; + const y = keys(b); + const w = { + i: equalWH, + o: { + w: 0, + h: 0 + } + }; + const S = { + i: equalXY, + o: {} + }; + const setMeasuringMode = t => { + f(Y, !g && t); + }; + const getMeasuredScrollCoordinates = t => { + const n = y.some((n => { + const o = t[n]; + return o && b[n](o); + })); + if (!n) { + return { + D: { + x: 0, + y: 0 + }, + T: { + x: 1, + y: 1 + } + }; + } + setMeasuringMode(true); + const o = getElementScroll(_); + const s = f(J, true); + const e = addEventListener(u, z, (t => { + const n = getElementScroll(_); + if (t.isTrusted && n.x === o.x && n.y === o.y) { + stopPropagation(t); + } + }), { + I: true, + A: true + }); + scrollElementTo(_, { + x: 0, + y: 0 + }); + s(); + const c = getElementScroll(_); + const r = T(_); + scrollElementTo(_, { + x: r.w, + y: r.h + }); + const l = getElementScroll(_); + scrollElementTo(_, { + x: l.x - c.x < 1 && -r.w, + y: l.y - c.y < 1 && -r.h + }); + const i = getElementScroll(_); + scrollElementTo(_, o); + a((() => e())); + return { + D: c, + T: i + }; + }; + const getOverflowAmount = (t, n) => { + const s = o.devicePixelRatio % 1 !== 0 ? 1 : 0; + const e = { + w: h(t.w - n.w), + h: h(t.h - n.h) + }; + return { + w: e.w > s ? e.w : 0, + h: e.h > s ? e.h : 0 + }; + }; + const [m, O] = createCache(w, bind(getFractionalSize, l)); + const [$, C] = createCache(w, bind(T, l)); + const [x, I] = createCache(w); + const [A] = createCache(S); + const [M, k] = createCache(w); + const [R] = createCache(S); + const [V] = createCache({ + i: (t, n) => equal(t, n, y), + o: {} + }, (() => hasDimensions(l) ? getStyles(l, y) : {})); + const [L, P] = createCache({ + i: (t, n) => equalXY(t.D, n.D) && equalXY(t.T, n.T), + o: getZeroScrollCoordinates() + }); + const q = getStaticPluginModuleInstance(It); + const createViewportOverflowStyleClassName = (t, n) => { + const o = n ? B : F; + return `${o}${capitalizeFirstLetter(t)}`; + }; + const setViewportOverflowStyle = t => { + const createAllOverflowStyleClassNames = t => [ H, E, z ].map((n => createViewportOverflowStyleClassName(n, t))); + const n = createAllOverflowStyleClassNames(true).concat(createAllOverflowStyleClassNames()).join(" "); + f(n); + f(keys(t).map((n => createViewportOverflowStyleClassName(t[n], n === "x"))).join(" "), true); + }; + return ({It: o, Zt: s, _n: i, Dt: a}, {fn: u}) => { + const {ft: _, Ht: d, Ct: b, dt: y, zt: w} = s || {}; + const S = q && q.tt(t, n, i, e, o); + const {it: H, ut: E, _t: z} = S || {}; + const [T, j] = getShowNativeOverlaidScrollbars(o, e); + const [B, F] = o("overflow"); + const X = overflowIsVisible(B.x); + const Y = overflowIsVisible(B.y); + const W = true; + let J = O(a); + let Q = C(a); + let Z = I(a); + let tt = k(a); + if (j && p) { + f(G, !T); + } + { + if (hasAttrClass(c, N, U)) { + setMeasuringMode(true); + } + const [t] = E ? E() : []; + const [n] = J = m(a); + const [o] = Q = $(a); + const s = D(l); + const e = g && getWindowSize(v()); + const r = { + w: h(o.w + n.w), + h: h(o.h + n.h) + }; + const i = { + w: h((e ? e.w : s.w + h(s.w - o.w)) + n.w), + h: h((e ? e.h : s.h + h(s.h - o.h)) + n.h) + }; + t && t(); + tt = M(i); + Z = x(getOverflowAmount(r, i), a); + } + const [nt, ot] = tt; + const [st, et] = Z; + const [ct, rt] = Q; + const [lt, it] = J; + const [at, ut] = A({ + x: st.w > 0, + y: st.h > 0 + }); + const _t = X && Y && (at.x || at.y) || X && at.x && !at.y || Y && at.y && !at.x; + const dt = u || b || w || it || rt || ot || et || F || j || W; + const ft = createViewportOverflowState(at, B); + const [vt, pt] = R(ft.K); + const [gt, ht] = V(a); + const bt = b || y || ht || ut || a; + const [yt, wt] = bt ? L(getMeasuredScrollCoordinates(gt), a) : P(); + if (dt) { + pt && setViewportOverflowStyle(ft.K); + if (z && H) { + setStyles(l, z(ft, i, H(ft, ct, lt))); + } + } + setMeasuringMode(false); + addRemoveAttrClass(c, N, U, _t); + addRemoveAttrClass(r, K, U, _t); + assignDeep(n, { + K: vt, + Vt: { + x: nt.w, + y: nt.h + }, + Rt: { + x: st.w, + y: st.h + }, + rn: at, + Lt: sanitizeScrollCoordinates(yt, st) + }); + return { + en: pt, + nn: ot, + sn: et, + cn: wt || et, + vn: bt + }; + }; + }; + const createStructureSetup = t => { + const [n, o, s] = createStructureSetupElements(t); + const e = { + ln: { + t: 0, + r: 0, + b: 0, + l: 0 + }, + dn: false, + rt: { + [S]: 0, + [m]: 0, + [w]: 0, + [g]: 0, + [h]: 0, + [y]: 0, + [b]: 0 + }, + Vt: { + x: 0, + y: 0 + }, + Rt: { + x: 0, + y: 0 + }, + K: { + x: E, + y: E + }, + rn: { + x: false, + y: false + }, + Lt: getZeroScrollCoordinates() + }; + const {vt: c, ht: r, nt: l, Ot: i} = n; + const {R: a, k: u} = getEnvironment(); + const _ = !a && (u.x || u.y); + const d = [ createTrinsicUpdateSegment(n), createPaddingUpdateSegment(n, e), createOverflowUpdateSegment(n, e) ]; + return [ o, t => { + const n = {}; + const o = _; + const s = o && getElementScroll(r); + const e = s && i(); + each(d, (o => { + assignDeep(n, o(t, n) || {}); + })); + scrollElementTo(r, s); + e && e(); + !l && scrollElementTo(c, 0); + return n; + }, e, n, s ]; + }; + const createSetups = (t, n, o, s, e) => { + let c = false; + const r = createOptionCheck(n, {}); + const [l, i, a, u, _] = createStructureSetup(t); + const [d, f, v] = createObserversSetup(u, a, r, (t => { + update({}, t); + })); + const [p, g, , h] = createScrollbarsSetup(t, n, v, a, u, e); + const updateHintsAreTruthy = t => keys(t).some((n => !!t[n])); + const update = (t, e) => { + if (o()) { + return false; + } + const {pn: r, Dt: l, At: a, gn: u} = t; + const _ = r || {}; + const d = !!l || !c; + const p = { + It: createOptionCheck(n, _, d), + pn: _, + Dt: d + }; + if (u) { + g(p); + return false; + } + const h = e || f(assignDeep({}, p, { + At: a + })); + const b = i(assignDeep({}, p, { + _n: v, + Zt: h + })); + g(assignDeep({}, p, { + Zt: h, + tn: b + })); + const y = updateHintsAreTruthy(h); + const w = updateHintsAreTruthy(b); + const S = y || w || !isEmptyObject(_) || d; + c = true; + S && s(t, { + Zt: h, + tn: b + }); + return S; + }; + return [ () => { + const {an: t, ht: n, Ot: o} = u; + const s = getElementScroll(t); + const e = [ d(), l(), p() ]; + const c = o(); + scrollElementTo(n, s); + c(); + return bind(runEachAndClear, e); + }, update, () => ({ + hn: v, + bn: a + }), { + yn: u, + wn: h + }, _ ]; + }; + const OverlayScrollbars = (t, n, o) => { + const {N: s} = getEnvironment(); + const e = isHTMLElement(t); + const c = e ? t : t.target; + const r = getInstance(c); + if (n && !r) { + let r = false; + const l = []; + const i = {}; + const validateOptions = t => { + const n = removeUndefinedProperties(t, true); + const o = getStaticPluginModuleInstance(Ht); + return o ? o(n, true) : n; + }; + const a = assignDeep({}, s(), validateOptions(n)); + const [u, _, d] = createEventListenerHub(); + const [f, v, p] = createEventListenerHub(o); + const triggerEvent = (t, n) => { + p(t, n); + d(t, n); + }; + const [g, h, b, y, w] = createSetups(t, a, (() => r), (({pn: t, Dt: n}, {Zt: o, tn: s}) => { + const {ft: e, Ct: c, xt: r, Ht: l, Et: i, dt: a} = o; + const {nn: u, sn: _, en: d, cn: f} = s; + triggerEvent("updated", [ S, { + updateHints: { + sizeChanged: !!e, + directionChanged: !!c, + heightIntrinsicChanged: !!r, + overflowEdgeChanged: !!u, + overflowAmountChanged: !!_, + overflowStyleChanged: !!d, + scrollCoordinatesChanged: !!f, + contentMutation: !!l, + hostMutation: !!i, + appear: !!a + }, + changedOptions: t || {}, + force: !!n + } ]); + }), (t => triggerEvent("scroll", [ S, t ]))); + const destroy = t => { + removeInstance(c); + runEachAndClear(l); + r = true; + triggerEvent("destroyed", [ S, t ]); + _(); + v(); + }; + const S = { + options(t, n) { + if (t) { + const o = n ? s() : {}; + const e = getOptionsDiff(a, assignDeep(o, validateOptions(t))); + if (!isEmptyObject(e)) { + assignDeep(a, e); + h({ + pn: e + }); + } + } + return assignDeep({}, a); + }, + on: f, + off: (t, n) => { + t && n && v(t, n); + }, + state() { + const {hn: t, bn: n} = b(); + const {ct: o} = t; + const {Vt: s, Rt: e, K: c, rn: l, ln: i, dn: a, Lt: u} = n; + return assignDeep({}, { + overflowEdge: s, + overflowAmount: e, + overflowStyle: c, + hasOverflow: l, + scrollCoordinates: { + start: u.D, + end: u.T + }, + padding: i, + paddingAbsolute: a, + directionRTL: o, + destroyed: r + }); + }, + elements() { + const {vt: t, gt: n, ln: o, ot: s, bt: e, ht: c, Qt: r} = y.yn; + const {Xt: l, Jt: i} = y.wn; + const translateScrollbarStructure = t => { + const {Pt: n, Ut: o, Mt: s} = t; + return { + scrollbar: s, + track: o, + handle: n + }; + }; + const translateScrollbarsSetupElement = t => { + const {Yt: n, Wt: o} = t; + const s = translateScrollbarStructure(n[0]); + return assignDeep({}, s, { + clone: () => { + const t = translateScrollbarStructure(o()); + h({ + gn: true + }); + return t; + } + }); + }; + return assignDeep({}, { + target: t, + host: n, + padding: o || s, + viewport: s, + content: e || s, + scrollOffsetElement: c, + scrollEventElement: r, + scrollbarHorizontal: translateScrollbarsSetupElement(l), + scrollbarVertical: translateScrollbarsSetupElement(i) + }); + }, + update: t => h({ + Dt: t, + At: true + }), + destroy: bind(destroy, false), + plugin: t => i[keys(t)[0]] + }; + push(l, [ w ]); + addInstance(c, S); + registerPluginModuleInstances(Ct, OverlayScrollbars, [ S, u, i ]); + if (cancelInitialization(y.yn.yt, !e && t.cancel)) { + destroy(true); + return S; + } + push(l, g()); + triggerEvent("initialized", [ S ]); + S.update(); + return S; + } + return r; + }; + OverlayScrollbars.plugin = t => { + const n = isArray(t); + const o = n ? t : [ t ]; + const s = o.map((t => registerPluginModuleInstances(t, OverlayScrollbars)[0])); + addPlugins(o); + return n ? s : s[0]; + }; + OverlayScrollbars.valid = t => { + const n = t && t.elements; + const o = isFunction(n) && n(); + return isPlainObject(o) && !!getInstance(o.target); + }; + OverlayScrollbars.env = () => { + const {M: t, k: n, R: o, V: s, j: e, B: c, U: r, P: l, N: i, q: a} = getEnvironment(); + return assignDeep({}, { + scrollbarsSize: t, + scrollbarsOverlaid: n, + scrollbarsHiding: o, + scrollTimeline: s, + staticDefaultInitialization: e, + staticDefaultOptions: c, + getDefaultInitialization: r, + setDefaultInitialization: l, + getDefaultOptions: i, + setDefaultOptions: a + }); + }; + OverlayScrollbars.nonce = setNonce; + t.ClickScrollPlugin = Tt; + t.OverlayScrollbars = OverlayScrollbars; + t.ScrollbarsHidingPlugin = At; + t.SizeObserverPlugin = zt; + Object.defineProperty(t, Symbol.toStringTag, { + value: "Module" + }); + return t; +}({}); +//# sourceMappingURL=overlayscrollbars.browser.es6.js.map diff --git a/ckanext/bulk/assets/vendor/slick-theme.css b/ckanext/bulk/assets/vendor/slick-theme.css new file mode 100644 index 0000000..1232fca --- /dev/null +++ b/ckanext/bulk/assets/vendor/slick-theme.css @@ -0,0 +1,204 @@ +@charset 'UTF-8'; +/* Slider */ +.slick-loading .slick-list +{ + background: #fff url('./ajax-loader.gif') center center no-repeat; +} + +/* Icons */ +@font-face +{ + font-family: 'slick'; + font-weight: normal; + font-style: normal; + + src: url('./fonts/slick.eot'); + src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); +} +/* Arrows */ +.slick-prev, +.slick-next +{ + font-size: 0; + line-height: 0; + + position: absolute; + top: 50%; + + display: block; + + width: 20px; + height: 20px; + padding: 0; + -webkit-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); + + cursor: pointer; + + color: transparent; + border: none; + outline: none; + background: transparent; +} +.slick-prev:hover, +.slick-prev:focus, +.slick-next:hover, +.slick-next:focus +{ + color: transparent; + outline: none; + background: transparent; +} +.slick-prev:hover:before, +.slick-prev:focus:before, +.slick-next:hover:before, +.slick-next:focus:before +{ + opacity: 1; +} +.slick-prev.slick-disabled:before, +.slick-next.slick-disabled:before +{ + opacity: .25; +} + +.slick-prev:before, +.slick-next:before +{ + font-family: 'slick'; + font-size: 20px; + line-height: 1; + + opacity: .75; + color: white; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.slick-prev +{ + left: -25px; +} +[dir='rtl'] .slick-prev +{ + right: -25px; + left: auto; +} +.slick-prev:before +{ + content: '←'; +} +[dir='rtl'] .slick-prev:before +{ + content: '→'; +} + +.slick-next +{ + right: -25px; +} +[dir='rtl'] .slick-next +{ + right: auto; + left: -25px; +} +.slick-next:before +{ + content: '→'; +} +[dir='rtl'] .slick-next:before +{ + content: '←'; +} + +/* Dots */ +.slick-dotted.slick-slider +{ + margin-bottom: 30px; +} + +.slick-dots +{ + position: absolute; + bottom: -25px; + + display: block; + + width: 100%; + padding: 0; + margin: 0; + + list-style: none; + + text-align: center; +} +.slick-dots li +{ + position: relative; + + display: inline-block; + + width: 20px; + height: 20px; + margin: 0 5px; + padding: 0; + + cursor: pointer; +} +.slick-dots li button +{ + font-size: 0; + line-height: 0; + + display: block; + + width: 20px; + height: 20px; + padding: 5px; + + cursor: pointer; + + color: transparent; + border: 0; + outline: none; + background: transparent; +} +.slick-dots li button:hover, +.slick-dots li button:focus +{ + outline: none; +} +.slick-dots li button:hover:before, +.slick-dots li button:focus:before +{ + opacity: 1; +} +.slick-dots li button:before +{ + font-family: 'slick'; + font-size: 6px; + line-height: 20px; + + position: absolute; + top: 0; + left: 0; + + width: 20px; + height: 20px; + + content: '•'; + text-align: center; + + opacity: .25; + color: black; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.slick-dots li.slick-active button:before +{ + opacity: .75; + color: black; +} diff --git a/ckanext/bulk/assets/vendor/slick.css b/ckanext/bulk/assets/vendor/slick.css new file mode 100644 index 0000000..57477e8 --- /dev/null +++ b/ckanext/bulk/assets/vendor/slick.css @@ -0,0 +1,119 @@ +/* Slider */ +.slick-slider +{ + position: relative; + + display: block; + box-sizing: border-box; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + -webkit-touch-callout: none; + -khtml-user-select: none; + -ms-touch-action: pan-y; + touch-action: pan-y; + -webkit-tap-highlight-color: transparent; +} + +.slick-list +{ + position: relative; + + display: block; + overflow: hidden; + + margin: 0; + padding: 0; +} +.slick-list:focus +{ + outline: none; +} +.slick-list.dragging +{ + cursor: pointer; + cursor: hand; +} + +.slick-slider .slick-track, +.slick-slider .slick-list +{ + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} + +.slick-track +{ + position: relative; + top: 0; + left: 0; + + display: block; + margin-left: auto; + margin-right: auto; +} +.slick-track:before, +.slick-track:after +{ + display: table; + + content: ''; +} +.slick-track:after +{ + clear: both; +} +.slick-loading .slick-track +{ + visibility: hidden; +} + +.slick-slide +{ + display: none; + float: left; + + height: 100%; + min-height: 1px; +} +[dir='rtl'] .slick-slide +{ + float: right; +} +.slick-slide img +{ + display: block; +} +.slick-slide.slick-loading img +{ + display: none; +} +.slick-slide.dragging img +{ + pointer-events: none; +} +.slick-initialized .slick-slide +{ + display: block; +} +.slick-loading .slick-slide +{ + visibility: hidden; +} +.slick-vertical .slick-slide +{ + display: block; + + height: auto; + + border: 1px solid transparent; +} +.slick-arrow.slick-hidden { + display: none; +} diff --git a/ckanext/bulk/assets/vendor/slick.js b/ckanext/bulk/assets/vendor/slick.js new file mode 100644 index 0000000..7aca613 --- /dev/null +++ b/ckanext/bulk/assets/vendor/slick.js @@ -0,0 +1,3011 @@ +/* + _ _ _ _ + ___| (_) ___| | __ (_)___ +/ __| | |/ __| |/ / | / __| +\__ \ | | (__| < _ | \__ \ +|___/_|_|\___|_|\_(_)/ |___/ + |__/ + + Version: 1.8.1 + Author: Ken Wheeler + Website: http://kenwheeler.github.io + Docs: http://kenwheeler.github.io/slick + Repo: http://github.com/kenwheeler/slick + Issues: http://github.com/kenwheeler/slick/issues + + */ +/* global window, document, define, jQuery, setInterval, clearInterval */ +;(function(factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof exports !== 'undefined') { + module.exports = factory(require('jquery')); + } else { + factory(jQuery); + } + +}(function($) { + 'use strict'; + var Slick = window.Slick || {}; + + Slick = (function() { + + var instanceUid = 0; + + function Slick(element, settings) { + + var _ = this, dataSettings; + + _.defaults = { + accessibility: true, + adaptiveHeight: false, + appendArrows: $(element), + appendDots: $(element), + arrows: true, + asNavFor: null, + prevArrow: '', + nextArrow: '', + autoplay: false, + autoplaySpeed: 3000, + centerMode: false, + centerPadding: '50px', + cssEase: 'ease', + customPaging: function(slider, i) { + return $('\n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),yt=function(){v.currentInstance.resetValidationMessage()},wt=function(t){var e,n=!!(e=O())&&(e.remove(),rt([document.documentElement,document.body],[y["no-backdrop"],y["toast-shown"],y["has-column"]]),!0);if(gt())E("SweetAlert2 requires document to initialize");else{var o=document.createElement("div");o.className=y.container,n&&it(o,y["no-transition"]),G(o,bt);var i,r,a,c,u,s,l,d,f,p="string"==typeof(i=t.target)?document.querySelector(i):i;p.appendChild(o),function(t){var e=I();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&it(O(),y.rtl)}(p),r=I(),a=at(r,y.input),c=at(r,y.file),u=r.querySelector(".".concat(y.range," input")),s=r.querySelector(".".concat(y.range," output")),l=at(r,y.select),d=r.querySelector(".".concat(y.checkbox," input")),f=at(r,y.textarea),a.oninput=yt,c.onchange=yt,l.onchange=yt,d.onchange=yt,f.oninput=yt,u.oninput=function(){yt(),s.value=u.value},u.onchange=function(){yt(),s.value=u.value}}},Ct=function(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===m(t)?At(t,e):t&&G(e,t)},At=function(t,e){t.jquery?kt(e,t):G(e,t.toString())},kt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},Et=function(){if(gt())return!1;var t=document.createElement("div");return void 0!==t.style.webkitAnimation?"webkitAnimationEnd":void 0!==t.style.animation&&"animationend"}(),Bt=function(t,e){var n=K(),o=z();n&&o&&(e.showConfirmButton||e.showDenyButton||e.showCancelButton?ut(n):st(n),tt(n,e,"actions"),function(t,e,n){var o=N(),i=U(),r=F();if(!o||!i||!r)return;Pt(o,"confirm",n),Pt(i,"deny",n),Pt(r,"cancel",n),function(t,e,n,o){if(!o.buttonsStyling)return void rt([t,e,n],y.styled);it([t,e,n],y.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,it(t,y["default-outline"]));o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,it(e,y["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,it(n,y["default-outline"]))}(o,i,r,n),n.reverseButtons&&(n.toast?(t.insertBefore(r,o),t.insertBefore(i,o)):(t.insertBefore(r,e),t.insertBefore(i,e),t.insertBefore(o,e)))}(n,o,e),G(o,e.loaderHtml||""),tt(o,e,"loader"))};function Pt(t,e,n){var o=A(e);ft(t,n["show".concat(o,"Button")],"inline-block"),G(t,n["".concat(e,"ButtonText")]||""),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]||""),t.className=y[e],tt(t,n,"".concat(e,"Button"))}var Tt=function(t,e){var n=O();n&&(!function(t,e){"string"==typeof e?t.style.background=e:e||it([document.documentElement,document.body],y["no-backdrop"])}(n,e.backdrop),function(t,e){if(!e)return;e in y?it(t,y[e]):(k('The "position" parameter is not valid, defaulting to "center"'),it(t,y.center))}(n,e.position),function(t,e){if(!e)return;it(t,y["grow-".concat(e)])}(n,e.grow),tt(n,e,"container"))};var xt={innerParams:new WeakMap,domCache:new WeakMap},St=["input","file","range","select","radio","checkbox","textarea"],Lt=function(t){if(t.input)if(qt[t.input]){var e=Ht(t.input),n=qt[t.input](e,t);ut(e),t.inputAutoFocus&&setTimeout((function(){nt(n)}))}else E("Unexpected type of input! Expected ".concat(Object.keys(qt).join(" | "),', got "').concat(t.input,'"'))},Ot=function(t,e){var n=et(I(),t);if(n)for(var o in function(t){for(var e=0;en?I().style.width="".concat(i,"px"):ct(I(),"width",e.width)}})).observe(t,{attributes:!0,attributeFilter:["style"]})}})),t};var Vt=function(t,e){var n=q();n&&(lt(n),tt(n,e,"htmlContainer"),e.html?(Ct(e.html,n),ut(n,"block")):e.text?(n.textContent=e.text,ut(n,"block")):st(n),function(t,e){var n=I();if(n){var o=xt.innerParams.get(t),i=!o||e.input!==o.input;St.forEach((function(t){var o=at(n,y[t]);o&&(Ot(t,e.inputAttributes),o.className=y[t],i&&st(o))})),e.input&&(i&&Lt(e),jt(e))}}(t,e))},_t=function(t,e){for(var n=0,o=Object.entries(w);n
    \n \n
    \n
    \n',n=n.replace(/ style=".*?"/g,"");else if("error"===e.icon)o='\n \n \n \n \n';else if(e.icon){o=Ut({question:"?",warning:"!",info:"i"}[e.icon])}n.trim()!==o.trim()&&G(t,o)}},Ft=function(t,e){if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(var n=0,o=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n').concat(t,"")},zt=function(t,e){var n=e.showClass||{};t.className="".concat(y.popup," ").concat(pt(t)?n.popup:""),e.toast?(it([document.documentElement,document.body],y["toast-shown"]),it(t,y.toast)):it(t,y.modal),tt(t,e,"popup"),"string"==typeof e.customClass&&it(t,e.customClass),e.icon&&it(t,y["icon-".concat(e.icon)])},Kt=function(t){var e=document.createElement("li");return it(e,y["progress-step"]),G(e,t),e},Wt=function(t){var e=document.createElement("li");return it(e,y["progress-step-line"]),t.progressStepsDistance&&ct(e,"width",t.progressStepsDistance),e},Yt=function(t,e){!function(t,e){var n=O(),o=I();if(n&&o){if(e.toast){ct(n,"width",e.width),o.style.width="100%";var i=z();i&&o.insertBefore(i,H())}else ct(o,"width",e.width);ct(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),st(R()),zt(o,e)}}(0,e),Tt(0,e),function(t,e){var n=_();if(n){var o=e.progressSteps,i=e.currentProgressStep;o&&0!==o.length&&void 0!==i?(ut(n),n.textContent="",i>=o.length&&k("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((function(t,r){var a=Kt(t);if(n.appendChild(a),r===i&&it(a,y["active-progress-step"]),r!==o.length-1){var c=Wt(e);n.appendChild(c)}}))):st(n)}}(0,e),function(t,e){var n=xt.innerParams.get(t),o=H();if(o){if(n&&e.icon===n.icon)return Nt(o,e),void _t(o,e);if(e.icon||e.iconHtml){if(e.icon&&-1===Object.keys(w).indexOf(e.icon))return E('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),void st(o);ut(o),Nt(o,e),_t(o,e),it(o,e.showClass&&e.showClass.icon)}else st(o)}}(t,e),function(t,e){var n=V();n&&(e.imageUrl?(ut(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),ct(n,"width",e.imageWidth),ct(n,"height",e.imageHeight),n.className=y.image,tt(n,e,"image")):st(n))}(0,e),function(t,e){var n=D();n&&(lt(n),ft(n,e.title||e.titleText,"block"),e.title&&Ct(e.title,n),e.titleText&&(n.innerText=e.titleText),tt(n,e,"title"))}(0,e),function(t,e){var n=Z();n&&(G(n,e.closeButtonHtml||""),tt(n,e,"closeButton"),ft(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))}(0,e),Vt(t,e),Bt(0,e),function(t,e){var n=W();n&&(lt(n),ft(n,e.footer,"block"),e.footer&&Ct(e.footer,n),tt(n,e,"footer"))}(0,e);var n=I();"function"==typeof e.didRender&&n&&e.didRender(n)},Zt=function(){var t;return null===(t=N())||void 0===t?void 0:t.click()},$t=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Jt=function(t){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Xt=function(t,e){var n,o=$();if(o.length)return(t+=e)===o.length?t=0:-1===t&&(t=o.length-1),void o[t].focus();null===(n=I())||void 0===n||n.focus()},Gt=["ArrowRight","ArrowDown"],Qt=["ArrowLeft","ArrowUp"],te=function(t,e,n){t&&(e.isComposing||229===e.keyCode||(t.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?ee(e,t):"Tab"===e.key?ne(e):[].concat(Gt,Qt).includes(e.key)?oe(e.key):"Escape"===e.key&&ie(e,t,n)))},ee=function(t,e){if(T(e.allowEnterKey)){var n=et(I(),e.input);if(t.target&&n&&t.target instanceof HTMLElement&&t.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(e.input))return;Zt(),t.preventDefault()}}},ne=function(t){for(var e=t.target,n=$(),o=-1,i=0;i1},fe=null,pe=function(t){null===fe&&(document.body.scrollHeight>window.innerHeight||"scroll"===t)&&(fe=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(fe+function(){var t=document.createElement("div");t.className=y["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))};function me(t,e,n,o){X()?Ae(t,o):(g(n).then((function(){return Ae(t,o)})),Jt(v)),ce?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),J()&&(null!==fe&&(document.body.style.paddingRight="".concat(fe,"px"),fe=null),function(){if(Q(document.body,y.iosfix)){var t=parseInt(document.body.style.top,10);rt(document.body,y.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),ae()),rt([document.documentElement,document.body],[y.shown,y["height-auto"],y["no-backdrop"],y["toast-shown"]])}function he(t){t=ye(t);var e=re.swalPromiseResolve.get(this),n=ve(this);this.isAwaitingPromise?t.isDismissed||(be(this),e(t)):n&&e(t)}var ve=function(t){var e=I();if(!e)return!1;var n=xt.innerParams.get(t);if(!n||Q(e,n.hideClass.popup))return!1;rt(e,n.showClass.popup),it(e,n.hideClass.popup);var o=O();return rt(o,n.showClass.backdrop),it(o,n.hideClass.backdrop),we(t,e,n),!0};function ge(t){var e=re.swalPromiseReject.get(this);be(this),e&&e(t)}var be=function(t){t.isAwaitingPromise&&(delete t.isAwaitingPromise,xt.innerParams.get(t)||t._destroy())},ye=function(t){return void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t)},we=function(t,e,n){var o=O(),i=Et&&ht(e);"function"==typeof n.willClose&&n.willClose(e),i?Ce(t,e,o,n.returnFocus,n.didClose):me(t,o,n.returnFocus,n.didClose)},Ce=function(t,e,n,o,i){Et&&(v.swalCloseEventFinishedCallback=me.bind(null,t,n,o,i),e.addEventListener(Et,(function(t){t.target===e&&(v.swalCloseEventFinishedCallback(),delete v.swalCloseEventFinishedCallback)})))},Ae=function(t,e){setTimeout((function(){"function"==typeof e&&e.bind(t.params)(),t._destroy&&t._destroy()}))},ke=function(t){var e=I();if(e||new io,e=I()){var n=z();X()?st(H()):Ee(e,t),ut(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()}},Ee=function(t,e){var n=K(),o=z();n&&o&&(!e&&pt(N())&&(e=N()),ut(n),e&&(st(e),o.setAttribute("data-button-to-replace",e.className),n.insertBefore(o,e)),it([t,n],y.loading))},Be=function(t){return t.checked?1:0},Pe=function(t){return t.checked?t.value:null},Te=function(t){return t.files&&t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},xe=function(t,e){var n=I();if(n){var o=function(t){"select"===e.input?function(t,e,n){var o=at(t,y.select);if(!o)return;var i=function(t,e,o){var i=document.createElement("option");i.value=o,G(i,e),i.selected=Oe(o,n.inputValue),t.appendChild(i)};e.forEach((function(t){var e=t[0],n=t[1];if(Array.isArray(n)){var r=document.createElement("optgroup");r.label=e,r.disabled=!1,o.appendChild(r),n.forEach((function(t){return i(r,t[1],t[0])}))}else i(o,n,e)})),o.focus()}(n,Le(t),e):"radio"===e.input&&function(t,e,n){var o=at(t,y.radio);if(!o)return;e.forEach((function(t){var e=t[0],i=t[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=y.radio,r.value=e,Oe(e,n.inputValue)&&(r.checked=!0);var c=document.createElement("span");G(c,i),c.className=y.label,a.appendChild(r),a.appendChild(c),o.appendChild(a)}));var i=o.querySelectorAll("input");i.length&&i[0].focus()}(n,Le(t),e)};x(e.inputOptions)||L(e.inputOptions)?(ke(N()),S(e.inputOptions).then((function(e){t.hideLoading(),o(e)}))):"object"===m(e.inputOptions)?o(e.inputOptions):E("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(m(e.inputOptions)))}},Se=function(t,e){var n=t.getInput();n&&(st(n),S(e.inputValue).then((function(o){n.value="number"===e.input?"".concat(parseFloat(o)||0):"".concat(o),ut(n),n.focus(),t.hideLoading()})).catch((function(e){E("Error in inputValue promise: ".concat(e)),n.value="",ut(n),n.focus(),t.hideLoading()})))};var Le=function t(e){var n=[];return e instanceof Map?e.forEach((function(e,o){var i=e;"object"===m(i)&&(i=t(i)),n.push([o,i])})):Object.keys(e).forEach((function(o){var i=e[o];"object"===m(i)&&(i=t(i)),n.push([o,i])})),n},Oe=function(t,e){return!!e&&e.toString()===t.toString()},je=void 0,Me=function(t,e){var n=xt.innerParams.get(t);if(n.input){var o=t.getInput(),i=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Be(n);case"radio":return Pe(n);case"file":return Te(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,n);n.inputValidator?Ie(t,i,e):o&&!o.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage||o.validationMessage)):"deny"===e?He(t,i):Ve(t,i)}else E('The "input" parameter is needed to be set when using returnInputValueOn'.concat(A(e)))},Ie=function(t,e,n){var o=xt.innerParams.get(t);t.disableInput(),Promise.resolve().then((function(){return S(o.inputValidator(e,o.validationMessage))})).then((function(o){t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):"deny"===n?He(t,e):Ve(t,e)}))},He=function(t,e){var n=xt.innerParams.get(t||je);(n.showLoaderOnDeny&&ke(U()),n.preDeny)?(t.isAwaitingPromise=!0,Promise.resolve().then((function(){return S(n.preDeny(e,n.validationMessage))})).then((function(n){!1===n?(t.hideLoading(),be(t)):t.close({isDenied:!0,value:void 0===n?e:n})})).catch((function(e){return qe(t||je,e)}))):t.close({isDenied:!0,value:e})},De=function(t,e){t.close({isConfirmed:!0,value:e})},qe=function(t,e){t.rejectPromise(e)},Ve=function(t,e){var n=xt.innerParams.get(t||je);(n.showLoaderOnConfirm&&ke(),n.preConfirm)?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then((function(){return S(n.preConfirm(e,n.validationMessage))})).then((function(n){pt(R())||!1===n?(t.hideLoading(),be(t)):De(t,void 0===n?e:n)})).catch((function(e){return qe(t||je,e)}))):De(t,e)};function _e(){var t=xt.innerParams.get(this);if(t){var e=xt.domCache.get(this);st(e.loader),X()?t.icon&&ut(H()):Re(e),rt([e.popup,e.actions],y.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}}var Re=function(t){var e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?ut(e[0],"inline-block"):pt(N())||pt(U())||pt(F())||st(t.actions)};function Ne(){var t=xt.innerParams.get(this),e=xt.domCache.get(this);return e?et(e.popup,t.input):null}function Fe(t,e,n){var o=xt.domCache.get(t);e.forEach((function(t){o[t].disabled=n}))}function Ue(t,e){var n=I();if(n&&t)if("radio"===t.type)for(var o=n.querySelectorAll('[name="'.concat(y.radio,'"]')),i=0;i0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,kn||(document.body.addEventListener("click",Pn),kn=!0)},clickCancel:function(){var t;return null===(t=F())||void 0===t?void 0:t.click()},clickConfirm:Zt,clickDeny:function(){var t;return null===(t=U())||void 0===t?void 0:t.click()},enableLoading:ke,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n"))}))},Vn=function(t,e){Array.from(t.attributes).forEach((function(n){-1===e.indexOf(n.name)&&k(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))},_n=function(t){var e=O(),n=I();"function"==typeof t.willOpen&&t.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;Un(e,n,t),setTimeout((function(){Nn(e,n)}),10),J()&&(Fn(e,t.scrollbarPadding,o),function(){var t=O();Array.from(document.body.children).forEach((function(e){e.contains(t)||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")||""),e.setAttribute("aria-hidden","true"))}))}()),X()||v.previousActiveElement||(v.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((function(){return t.didOpen(n)})),rt(e,y["no-transition"])},Rn=function t(e){var n=I();if(e.target===n&&Et){var o=O();n.removeEventListener(Et,t),o.style.overflowY="auto"}},Nn=function(t,e){Et&&ht(e)?(t.style.overflowY="hidden",e.addEventListener(Et,Rn)):t.style.overflowY="auto"},Fn=function(t,e,n){!function(){if(ce&&!Q(document.body,y.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),it(document.body,y.iosfix),ue()}}(),e&&"hidden"!==n&&pe(n),setTimeout((function(){t.scrollTop=0}))},Un=function(t,e,n){it(t,n.showClass.backdrop),n.animation?(e.style.setProperty("opacity","0","important"),ut(e,"grid"),setTimeout((function(){it(e,n.showClass.popup),e.style.removeProperty("opacity")}),10)):ut(e,"grid"),it([document.documentElement,document.body],y.shown),n.heightAuto&&n.backdrop&&!n.toast&&it([document.documentElement,document.body],y["height-auto"])},zn={email:function(t,e){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function Kn(t){!function(t){t.inputValidator||("email"===t.input&&(t.inputValidator=zn.email),"url"===t.input&&(t.inputValidator=zn.url))}(t),t.showLoaderOnConfirm&&!t.preConfirm&&k("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(k('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("
    ")),wt(t)}var Wn=new WeakMap,Yn=function(){return a((function t(){if(o(this,t),r(this,Wn,void 0),"undefined"!=typeof window){Bn=this;for(var n=arguments.length,i=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};if(function(t){for(var e in!1===t.backdrop&&t.allowOutsideClick&&k('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t)on(e),t.toast&&rn(e),an(e)}(Object.assign({},e,t)),v.currentInstance){var n=re.swalPromiseResolve.get(v.currentInstance),o=v.currentInstance.isAwaitingPromise;v.currentInstance._destroy(),o||n({isDismissed:!0}),J()&&ae()}v.currentInstance=Bn;var i=$n(t,e);Kn(i),Object.freeze(i),v.timeout&&(v.timeout.stop(),delete v.timeout),clearTimeout(v.restoreFocusTimeout);var r=Jn(Bn);return Yt(Bn,i),xt.innerParams.set(Bn,i),Zn(Bn,r,i)}},{key:"then",value:function(t){return i(Wn,this).then(t)}},{key:"finally",value:function(t){return i(Wn,this).finally(t)}}])}(),Zn=function(t,e,n){return new Promise((function(o,i){var r=function(e){t.close({isDismissed:!0,dismiss:e})};re.swalPromiseResolve.set(t,o),re.swalPromiseReject.set(t,i),e.confirmButton.onclick=function(){!function(t){var e=xt.innerParams.get(t);t.disableButtons(),e.input?Me(t,"confirm"):Ve(t,!0)}(t)},e.denyButton.onclick=function(){!function(t){var e=xt.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Me(t,"deny"):He(t,!1)}(t)},e.cancelButton.onclick=function(){!function(t,e){t.disableButtons(),e($t.cancel)}(t,r)},e.closeButton.onclick=function(){r($t.close)},function(t,e,n){t.toast?mn(t,e,n):(gn(e),bn(e),yn(t,e,n))}(n,e,r),function(t,e,n){Jt(t),e.toast||(t.keydownHandler=function(t){return te(e,t,n)},t.keydownTarget=e.keydownListenerCapture?window:I(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}(v,n,r),function(t,e){"select"===e.input||"radio"===e.input?xe(t,e):["text","email","number","tel","textarea"].some((function(t){return t===e.input}))&&(x(e.inputValue)||L(e.inputValue))&&(ke(N()),Se(t,e))}(t,n),_n(n),Xn(v,n,r),Gn(e,n),setTimeout((function(){e.container.scrollTop=0}))}))},$n=function(t,e){var n=function(t){var e="string"==typeof t.template?document.querySelector(t.template):t.template;if(!e)return{};var n=e.content;return qn(n),Object.assign(Ln(n),On(n),jn(n),Mn(n),In(n),Hn(n),Dn(n,Sn))}(t),o=Object.assign({},Je,e,n,t);return o.showClass=Object.assign({},Je.showClass,o.showClass),o.hideClass=Object.assign({},Je.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Jn=function(t){var e={popup:I(),container:O(),actions:K(),confirmButton:N(),denyButton:U(),cancelButton:F(),loader:z(),closeButton:Z(),validationMessage:R(),progressSteps:_()};return xt.domCache.set(t,e),e},Xn=function(t,e,n){var o=Y();st(o),e.timer&&(t.timeout=new xn((function(){n("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(ut(o),tt(o,e,"timerProgressBar"),setTimeout((function(){t.timeout&&t.timeout.running&&vt(e.timer)}))))},Gn=function(t,e){if(!e.toast)return T(e.allowEnterKey)?void(Qn(t)||to(t,e)||Xt(-1,1)):(P("allowEnterKey"),void eo())},Qn=function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=h(t))||e){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw r}}}}(t.popup.querySelectorAll("[autofocus]"));try{for(n.s();!(e=n.n()).done;){var o=e.value;if(o instanceof HTMLElement&&pt(o))return o.focus(),!0}}catch(t){n.e(t)}finally{n.f()}return!1},to=function(t,e){return e.focusDeny&&pt(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&pt(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!pt(t.confirmButton))&&(t.confirmButton.focus(),!0)},eo=function(){document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var no=new Date,oo=localStorage.getItem("swal-initiation");oo?(no.getTime()-Date.parse(oo))/864e5>3&&setTimeout((function(){document.body.style.pointerEvents="none";var t=document.createElement("audio");t.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",t.loop=!0,document.body.appendChild(t),setTimeout((function(){t.play().catch((function(){}))}),2500)}),500):localStorage.setItem("swal-initiation","".concat(no))}Yn.prototype.disableButtons=Ke,Yn.prototype.enableButtons=ze,Yn.prototype.getInput=Ne,Yn.prototype.disableInput=Ye,Yn.prototype.enableInput=We,Yn.prototype.hideLoading=_e,Yn.prototype.disableLoading=_e,Yn.prototype.showValidationMessage=Ze,Yn.prototype.resetValidationMessage=$e,Yn.prototype.close=he,Yn.prototype.closePopup=he,Yn.prototype.closeModal=he,Yn.prototype.closeToast=he,Yn.prototype.rejectPromise=ge,Yn.prototype.update=cn,Yn.prototype._destroy=sn,Object.assign(Yn,Tn),Object.keys(pn).forEach((function(t){Yn[t]=function(){var e;return Bn&&Bn[t]?(e=Bn)[t].apply(e,arguments):null}})),Yn.DismissReason=$t,Yn.version="11.12.2";var io=Yn;return io.default=io,io})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}"); \ No newline at end of file diff --git a/ckanext/bulk/assets/vendor/tom-select.base.min.js b/ckanext/bulk/assets/vendor/tom-select.base.min.js new file mode 100644 index 0000000..4994976 --- /dev/null +++ b/ckanext/bulk/assets/vendor/tom-select.base.min.js @@ -0,0 +1,368 @@ +/** +* Tom Select v2.3.0 +* Licensed under the Apache License, Version 2.0 (the "License"); +*/ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).TomSelect=e()}(this,(function(){"use strict" +function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,i){t(e,(t=>{const e=this._events[t]||[] +e.push(i),this._events[t]=e}))}off(e,i){var s=arguments.length +0!==s?t(e,(t=>{if(1===s)return void delete this._events[t] +const e=this._events[t] +void 0!==e&&(e.splice(e.indexOf(i),1),this._events[t]=e)})):this._events={}}trigger(e,...i){var s=this +t(e,(t=>{const e=s._events[t] +void 0!==e&&e.forEach((t=>{t.apply(s,i)}))}))}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==l(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",s=t=>{if(!o(t))return t.join("") +let e="",i=0 +const s=()=>{i>1&&(e+="{"+i+"}")} +return t.forEach(((n,o)=>{n!==t[o-1]?(s(),e+=n,i=1):i++})),s(),e},n=t=>{let e=c(t) +return i(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),l=t=>t.reduce(((t,e)=>Math.max(t,a(e))),0),a=t=>c(t).length,c=t=>Array.from(t),d=t=>{if(1===t.length)return[[t]] +let e=[] +const i=t.substring(1) +return d(i).forEach((function(i){let s=i.slice(0) +s[0]=t.charAt(0)+s[0],e.push(s),s=i.slice(0),s.unshift(t.charAt(0)),e.push(s)})),e},u=[[0,65535]] +let p,h +const g={},f={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"} +for(let t in f){let e=f[t]||"" +for(let i=0;it.normalize(e),y=t=>c(t).reduce(((t,e)=>t+O(e)),""),O=t=>(t=m(t).toLowerCase().replace(v,(t=>g[t]||"")),m(t,"NFC")) +const b=t=>{const e={},i=(t,i)=>{const s=e[t]||new Set,o=new RegExp("^"+n(s)+"$","iu") +i.match(o)||(s.add(r(i)),e[t]=s)} +for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=y(e) +i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed) +return e},w=t=>{const e=b(t),s={} +let o=[] +for(let t in e){let i=e[t] +i&&(s[t]=n(i)),t.length>1&&o.push(r(t))}o.sort(((t,e)=>e.length-t.length)) +const l=i(o) +return h=new RegExp("^"+l,"u"),s},I=(t,e=1)=>(e=Math.max(e,t.length-1),i(d(t).map((t=>((t,e=1)=>{let i=0 +return t=t.map((t=>(p[t]&&(i+=t.length),p[t]||t))),i>=e?s(t):""})(t,e))))),S=(t,e=!0)=>{let n=t.length>1?1:0 +return i(t.map((t=>{let i=[] +const o=e?t.length():t.length()-1 +for(let e=0;e{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue +if(i.substrs.join("")!==t.substrs.join(""))continue +let e=t.parts +const s=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1 +if(1!=t.length&&1!=i.length){if(t.starti.start)return!0 +if(i.startt.start)return!0}}return!1} +if(!(i.parts.filter(s).length>0))return!0}return!1} +class A{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new A,s=JSON.parse(JSON.stringify(this.parts)),n=s.pop() +for(const t of s)i.add(t) +let o=e.substr.substring(0,t-n.start),r=o.length +return i.add({start:n.start,end:n.start+r,length:r,substr:o}),i}}const C=t=>{var e +void 0===p&&(p=w(e||u)),t=y(t) +let i="",s=[new A] +for(let e=0;e0){l=l.sort(((t,e)=>t.length()-e.length())) +for(let t of l)_(t,s)||s.push(t)}else if(e>0&&1==a.size&&!a.has("3")){i+=S(s,!1) +let t=new A +const e=s[0] +e&&t.add(e.last()),s=[t]}}return i+=S(s,!0),i},F=(t,e)=>{if(t)return t[e]},x=(t,e)=>{if(t){for(var i,s=e.split(".");(i=s.shift())&&(t=t[i]););return t}},L=(t,e,i)=>{var s,n +return t?(t+="",null==e.regex||-1===(n=t.search(e.regex))?0:(s=e.string.length/t.length,0===n&&(s+=.5),s*i)):0},k=(t,e)=>{var i=t[e] +if("function"==typeof i)return i +i&&!Array.isArray(i)&&(t[e]=[i])},E=(t,e)=>{if(Array.isArray(t))t.forEach(e) +else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},T=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=y(e+"").toLowerCase())?1:e>t?-1:0 +class P{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[] +const s=[],n=t.split(/\s+/) +var o +return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),n.forEach((t=>{let i,n=null,l=null +o&&(i=t.match(o))&&(n=i[1],t=i[2]),t.length>0&&(l=this.settings.diacritics?C(t)||null:r(t),l&&e&&(l="\\b"+l)),s.push({string:t,regex:l?new RegExp(l,"iu"):null,field:n})})),s}getScoreFunction(t,e){var i=this.prepareSearch(t,e) +return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length +if(!i)return function(){return 0} +const s=t.options.fields,n=t.weights,o=s.length,r=t.getAttrFn +if(!o)return function(){return 1} +const l=1===o?function(t,e){const i=s[0].field +return L(r(e,i),t,n[i]||1)}:function(t,e){var i=0 +if(t.field){const s=r(e,t.field) +!t.regex&&s?i+=1/o:i+=L(s,t,1)}else E(n,((s,n)=>{i+=L(r(e,n),t,s)})) +return i/o} +return 1===i?function(t){return l(e[0],t)}:"and"===t.options.conjunction?function(t){var s,n=0 +for(let i of e){if((s=l(i,t))<=0)return 0 +n+=s}return n/i}:function(t){var s=0 +return E(e,(e=>{s+=l(e,t)})),s/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e) +return this._getSortFunction(i)}_getSortFunction(t){var e,i=[] +const s=this,n=t.options,o=!t.query&&n.sort_empty?n.sort_empty:n.sort +if("function"==typeof o)return o.bind(this) +const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(s.items[i.id],e)} +if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e) +if(t.query){e=!0 +for(let t of i)if("$score"===t.field){e=!1 +break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>"$score"!==t.field)) +return i.length?function(t,e){var s,n +for(let o of i){if(n=o.field,s=("desc"===o.direction?-1:1)*T(r(n,t),r(n,e)))return s}return 0}:null}prepareSearch(t,e){const i={} +var s=Object.assign({},e) +if(k(s,"sort"),k(s,"sort_empty"),s.fields){k(s,"fields") +const t=[] +s.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1})),s.fields=t}return{options:s,query:t.toLowerCase().trim(),tokens:this.tokenize(t,s.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:s.nesting?x:F}}search(t,e){var i,s,n=this +s=this.prepareSearch(t,e),e=s.options,t=s.query +const o=e.score||n._getScoreFunction(s) +t.length?E(n.items,((t,n)=>{i=o(t),(!1===e.filter||i>0)&&s.items.push({score:i,id:n})})):E(n.items,((t,e)=>{s.items.push({score:1,id:e})})) +const r=n._getSortFunction(s) +return r&&s.items.sort(r),s.total=s.items.length,"number"==typeof e.limit&&(s.items=s.items.slice(0,e.limit)),s}}const $=(t,e)=>{if(Array.isArray(t))t.forEach(e) +else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},V=t=>{if(t.jquery)return t[0] +if(t instanceof HTMLElement)return t +if(j(t)){var e=document.createElement("template") +return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},j=t=>"string"==typeof t&&t.indexOf("<")>-1,q=(t,e)=>{var i=document.createEvent("HTMLEvents") +i.initEvent(e,!0,!1),t.dispatchEvent(i)},D=(t,e)=>{Object.assign(t.style,e)},R=(t,...e)=>{var i=N(e);(t=M(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},H=(t,...e)=>{var i=N(e);(t=M(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},N=t=>{var e=[] +return $(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},M=t=>(Array.isArray(t)||(t=[t]),t),z=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t +t=t.parentNode}},B=(t,e=0)=>e>0?t[t.length-1]:t[0],K=(t,e)=>{if(!t)return-1 +e=e||t.nodeName +for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++ +return i},Q=(t,e)=>{$(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},G=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return +if("string"==typeof e){if(!e.length)return +e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e) +if(i&&t.data.length>0){var s=document.createElement("span") +s.className="highlight" +var n=t.splitText(i.index) +n.splitText(i[0].length) +var o=n.cloneNode(!0) +return s.appendChild(o),G(n,s),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0) +i(t)},U="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey" +var W={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}} +const X=t=>null==t?null:Y(t),Y=t=>"boolean"==typeof t?t?"1":"0":t+"",Z=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),tt=(t,e)=>{var i +return function(s,n){var o=this +i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[s]=!0,t.call(o,s,n)}),e)}},et=(t,e,i)=>{var s,n=t.trigger,o={} +for(s of(t.trigger=function(){var i=arguments[0] +if(-1===e.indexOf(i))return n.apply(t,arguments) +o[i]=arguments},i.apply(t,[]),t.trigger=n,e))s in o&&n.apply(t,o[s])},it=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},st=(t,e,i,s)=>{t.addEventListener(e,i,s)},nt=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),ot=(t,e)=>{const i=t.getAttribute("id") +return i||(t.setAttribute("id",e),e)},rt=t=>t.replace(/[\\"']/g,"\\$&"),lt=(t,e)=>{e&&t.append(e)} +function at(t,e){var i=Object.assign({},W,e),s=i.dataAttr,n=i.labelField,o=i.valueField,r=i.disabledField,l=i.optgroupField,a=i.optgroupLabelField,c=i.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder") +if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]') +e&&(u=e.textContent)}var p={placeholder:u,options:[],optgroups:[],items:[],maxItems:null} +return"select"===d?(()=>{var e,d=p.options,u={},h=1 +let g=0 +var f=t=>{var e=Object.assign({},t.dataset),i=s&&e[s] +return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},v=(t,e)=>{var s=X(t.value) +if(null!=s&&(s||i.allowEmptyOption)){if(u.hasOwnProperty(s)){if(e){var a=u[s][l] +a?Array.isArray(a)?a.push(e):u[s][l]=[a,e]:u[s][l]=e}}else{var c=f(t) +c[n]=c[n]||t.textContent,c[o]=c[o]||s,c[r]=c[r]||t.disabled,c[l]=c[l]||e,c.$option=t,c.$order=c.$order||++g,u[s]=c,d.push(c)}t.selected&&p.items.push(s)}} +p.maxItems=t.hasAttribute("multiple")?null:1,$(t.children,(t=>{var i,s,n +"optgroup"===(e=t.tagName.toLowerCase())?((n=f(i=t))[a]=n[a]||i.getAttribute("label")||"",n[c]=n[c]||h++,n[r]=n[r]||i.disabled,n.$order=n.$order||++g,p.optgroups.push(n),s=n[c],$(i.children,(t=>{v(t,s)}))):"option"===e&&v(t)}))})():(()=>{const e=t.getAttribute(s) +if(e)p.options=JSON.parse(e),$(p.options,(t=>{p.items.push(t[o])})) +else{var r=t.value.trim()||"" +if(!i.allowEmptyOption&&!r.length)return +const e=r.split(i.delimiter) +$(e,(t=>{const e={} +e[n]=t,e[o]=t,p.options.push(e)})),p.items=e}})(),Object.assign({},W,p,e)}var ct=0 +class dt extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i +const s=this,n=[] +if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?n.push(t):(s.plugins.settings[t.name]=t.options,n.push(t.name))})) +else if(t)for(e in t)t.hasOwnProperty(e)&&(s.plugins.settings[e]=t[e],n.push(e)) +for(;i=n.shift();)s.require(i)}loadPlugin(e){var i=this,s=i.plugins,n=t.plugins[e] +if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin') +s.requested[e]=!0,s.loaded[e]=n.fn.apply(i,[i.plugins.settings[e]||{}]),s.names.push(e)}require(t){var e=this,i=e.plugins +if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")') +e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i +super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,ct++ +var s=V(t) +if(s.tomselect)throw new Error("Tom Select already initialized on this element") +s.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(s,null)).getPropertyValue("direction") +const n=at(s,e) +this.settings=n,this.input=s,this.tabIndex=s.tabIndex||0,this.is_select_tag="select"===s.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=ot(s,"tomselect-"+ct),this.isRequired=s.required,this.sifter=new P(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode) +var o=n.createFilter +"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?n.createFilter=t=>o.test(t):n.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates() +const r=V("
    "),l=V("
    "),a=this._render("dropdown"),c=V('
    '),d=this.input.getAttribute("class")||"",u=n.mode +var p +if(R(r,n.wrapperClass,d,u),R(l,n.controlClass),lt(r,l),R(a,n.dropdownClass,u),n.copyClassesToDropdown&&R(a,d),R(c,n.dropdownContentClass),lt(a,c),V(n.dropdownParent||r).appendChild(a),j(n.controlInput)){p=V(n.controlInput) +E(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{s.getAttribute(t)&&Q(p,{[t]:s.getAttribute(t)})})),p.tabIndex=-1,l.appendChild(p),this.focus_node=p}else n.controlInput?(p=V(n.controlInput),this.focus_node=p):(p=V(""),this.focus_node=l) +this.wrapper=r,this.dropdown=a,this.dropdown_content=c,this.control=l,this.control_input=p,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,s=t.dropdown,n=t.dropdown_content,o=t.wrapper,l=t.control,a=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown" +Q(n,{id:u}),Q(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u}) +const p=ot(c,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",g=document.querySelector(h),f=t.focus.bind(t) +if(g){st(g,"click",f),Q(g,{for:p}) +const e=ot(g,t.inputId+"-ts-label") +Q(c,{"aria-labelledby":e}),Q(n,{"aria-labelledby":e})}if(o.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-") +R([o,s],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Q(a,{multiple:"multiple"}),e.placeholder&&Q(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=tt(e.load,e.loadThrottle)),st(s,"mousemove",(()=>{t.ignoreHover=!1})),st(s,"mouseenter",(e=>{var i=z(e.target,"[data-selectable]",s) +i&&t.onOptionHover(e,i)}),{capture:!0}),st(s,"click",(e=>{const i=z(e.target,"[data-selectable]") +i&&(t.onOptionSelect(e,i),it(e,!0))})),st(l,"click",(e=>{var s=z(e.target,"[data-ts-item]",l) +s&&t.onItemSelect(e,s)?it(e,!0):""==i.value&&(t.onClick(),it(e,!0))})),st(c,"keydown",(e=>t.onKeyDown(e))),st(i,"keypress",(e=>t.onKeyPress(e))),st(i,"input",(e=>t.onInput(e))),st(c,"blur",(e=>t.onBlur(e))),st(c,"focus",(e=>t.onFocus(e))),st(i,"paste",(e=>t.onPaste(e))) +const v=e=>{const n=e.composedPath()[0] +if(!o.contains(n)&&!s.contains(n))return t.isFocused&&t.blur(),void t.inputState() +n==i&&t.isOpen?e.stopPropagation():it(e,!0)},m=()=>{t.isOpen&&t.positionDropdown()} +st(document,"mousedown",v),st(window,"scroll",m,d),st(window,"resize",m,d),this._destroy=()=>{document.removeEventListener("mousedown",v),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),g&&g.removeEventListener("click",f)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,st(a,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),R(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),E(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,s={optgroup:t=>{let e=document.createElement("div") +return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
    '+e(t[i])+"
    ",option:(t,i)=>"
    "+i(t[e])+"
    ",item:(t,i)=>"
    "+i(t[e])+"
    ",option_create:(t,e)=>'
    Add '+e(t.input)+"
    ",no_results:()=>'
    No results found
    ',loading:()=>'
    ',not_loading:()=>{},dropdown:()=>"
    "} +t.settings.render=Object.assign({},s,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"} +for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?at(e.input,{delimiter:e.settings.delimiter}):e.settings +e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this +if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus() +t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){q(this.input,"input"),q(this.input,"change")}onPaste(t){var e=this +e.isInputHidden||e.isLocked?it(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue() +if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn) +E(i,(t=>{X(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this +if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which) +return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void it(t)):void 0}it(t)}onKeyDown(t){var e=this +if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&it(t) +else{switch(t.keyCode){case 65:if(nt(U,t)&&""==e.control_input.value)return it(t),void e.selectAll() +break +case 27:return e.isOpen&&(it(t,!0),e.close()),void e.clearActiveItems() +case 40:if(!e.isOpen&&e.hasOptions)e.open() +else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1) +t&&e.setActiveOption(t)}return void it(t) +case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1) +t&&e.setActiveOption(t)}return void it(t) +case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),it(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&it(t)) +case 37:return void e.advanceSelection(-1,t) +case 39:return void e.advanceSelection(1,t) +case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),it(t)),e.settings.create&&e.createItem()&&it(t))) +case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!nt(U,t)&&it(t)}}onInput(t){if(this.isLocked)return +const e=this.inputValue() +this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?setTimeout(t,e):(t.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue +this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused +if(e.isDisabled||e.isReadOnly)return e.blur(),void it(t) +e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this +if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1 +var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")} +e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,s=this +e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?s.createItem(null,(()=>{s.settings.closeAfterSelect&&s.close()})):void 0!==(i=e.dataset.value)&&(s.lastQuery=null,s.addItem(i),s.settings.closeAfterSelect&&s.close(),!s.settings.hideSelected&&t.type&&/click/.test(t.type)&&s.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this +return!i.isLocked&&"multi"===i.settings.mode&&(it(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this +if(!e.canLoad(t))return +R(e.wrapper,e.settings.loadingClass),e.loading++ +const i=e.loadCallback.bind(e) +e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this +i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||H(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList +t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input +e.value!==t&&(e.value=t,q(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){et(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,s,n,o,r,l,a=this +if("single"!==a.settings.mode){if(!t)return a.clearActiveItems(),void(a.isFocused&&a.inputState()) +if("click"===(i=e&&e.type.toLowerCase())&&nt("shiftKey",e)&&a.activeItems.length){for(l=a.getLastActive(),(n=Array.prototype.indexOf.call(a.control.children,l))>(o=Array.prototype.indexOf.call(a.control.children,t))&&(r=n,n=o,o=r),s=n;s<=o;s++)t=a.control.children[s],-1===a.activeItems.indexOf(t)&&a.setActiveItemClass(t) +it(e)}else"click"===i&&nt(U,e)||"keydown"===i&&nt("shiftKey",e)?t.classList.contains("active")?a.removeActiveItem(t):a.setActiveItemClass(t):(a.clearActiveItems(),a.setActiveItemClass(t)) +a.inputState(),a.isFocused||a.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active") +i&&H(i,"last-active"),R(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t) +this.activeItems.splice(e,1),H(t,"active")}clearActiveItems(){H(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Q(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Q(t,{"aria-selected":"true"}),R(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return +const i=this.dropdown_content,s=i.clientHeight,n=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+n +r+o>s+n?this.scroll(r-s+o,e):r{t.setActiveItemClass(e)})))}inputState(){var t=this +t.control.contains(t.control_input)&&(Q(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Q(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this +t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField +return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,s=this,n=this.getSearchOptions() +if(s.settings.score&&"function"!=typeof(i=s.settings.score.call(s,t)))throw new Error('Tom Select "score" setting must be a function that returns a function') +return t!==s.lastQuery?(s.lastQuery=t,e=s.sifter.search(t,Object.assign(n,{score:i})),s.currentResults=e):e=Object.assign({},s.currentResults),s.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=X(t.id) +return!(e&&-1!==s.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,s,n,o,r,l,a,c,d +const u={},p=[] +var h=this,g=h.inputValue() +const f=g===h.lastQuery||""==g&&null==h.lastQuery +var v=h.search(g),m=null,y=h.settings.shouldOpen||!1,O=h.dropdown_content +f&&(m=h.activeOption)&&(c=m.closest("[data-group]")),n=v.items.length,"number"==typeof h.settings.maxOptions&&(n=Math.min(n,h.settings.maxOptions)),n>0&&(y=!0) +const b=(t,e)=>{let i=u[t] +if(void 0!==i){let t=p[i] +if(void 0!==t)return[i,t.fragment]}let s=document.createDocumentFragment() +return i=p.length,p.push({fragment:s,order:e,optgroup:t}),[i,s]} +for(e=0;e0&&(d=d.cloneNode(!0),Q(d,{id:l.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),H(d,"active"),h.activeOption&&h.activeOption.dataset.value==n&&c&&c.dataset.group===o.toString()&&(m=d)),a.appendChild(d),""!=o&&(u[o]=s)}}var w +h.settings.lockOptgroupOrder&&p.sort(((t,e)=>t.order-e.order)),l=document.createDocumentFragment(),E(p,(t=>{let e=t.fragment,i=t.optgroup +if(!e||!e.children.length)return +let s=h.optgroups[i] +if(void 0!==s){let t=document.createDocumentFragment(),i=h.render("optgroup_header",s) +lt(t,i),lt(t,e) +let n=h.render("optgroup",{group:s,options:t}) +lt(l,n)}else lt(l,e)})),O.innerHTML="",lt(O,l),h.settings.highlight&&(w=O.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(t){var e=t.parentNode +e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length&&E(v.tokens,(t=>{J(O,t.regex)}))) +var I=t=>{let e=h.render(t,{input:g}) +return e&&(y=!0,O.insertBefore(e,O.firstChild)),e} +if(h.loading?I("loading"):h.settings.shouldLoad.call(h,g)?0===v.items.length&&I("no_results"):I("not_loading"),(a=h.canCreate(g))&&(d=I("option_create")),h.hasOptions=v.items.length>0||a,y){if(v.items.length>0){if(m||"single"!==h.settings.mode||null==h.items[0]||(m=h.getOption(h.items[0])),!O.contains(m)){let t=0 +d&&!h.settings.addPrecedence&&(t=1),m=h.selectable()[t]}}else d&&(m=d) +t&&!h.isOpen&&(h.open(),h.scrollToOption(m,"auto")),h.setActiveOption(m)}else h.clearActiveOption(),t&&h.isOpen&&h.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this +if(Array.isArray(t))return i.addOptions(t,e),!1 +const s=X(t[i.settings.valueField]) +return null!==s&&!i.options.hasOwnProperty(s)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[s]=t,i.lastQuery=null,e&&(i.userOptions[s]=e,i.trigger("option_add",s,t)),s)}addOptions(t,e=!1){E(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=X(t[this.settings.optgroupValueField]) +return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i +e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this +var s,n +const o=X(t),r=X(e[i.settings.valueField]) +if(null===o)return +const l=i.options[o] +if(null==l)return +if("string"!=typeof r)throw new Error("Value must be set in option data") +const a=i.getOption(o),c=i.getItem(o) +if(e.$order=e.$order||l.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,a){if(i.dropdown_content.contains(a)){const t=i._render("option",e) +G(a,t),i.activeOption===a&&i.setActiveOption(t)}a.remove()}c&&(-1!==(n=i.items.indexOf(o))&&i.items.splice(n,1,r),s=i._render("item",e),c.classList.contains("active")&&R(s,"active"),G(c,s)),i.lastQuery=null}removeOption(t,e){const i=this +t=Y(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this) +this.loadedSearches={},this.userOptions={},this.clearCache() +const i={} +E(this.options,((t,s)=>{e(t,s)&&(i[s]=t)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=X(t) +if(null===i)return null +const s=this.options[i] +if(null!=s){if(s.$div)return s.$div +if(e)return this._render("option",s)}return null}getAdjacent(t,e,i="option"){var s +if(!t)return null +s="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]") +for(let i=0;i0?s[i+1]:s[i-1] +return null}getItem(t){if("object"==typeof t)return t +var e=X(t) +return null!==e?this.control.querySelector(`[data-value="${rt(e)}"]`):null}addItems(t,e){var i=this,s=Array.isArray(t)?t:[t] +const n=(s=s.filter((t=>-1===i.items.indexOf(t))))[s.length-1] +s.forEach((t=>{i.isPending=t!==n,i.addItem(t,e)}))}addItem(t,e){et(this,e?[]:["change","dropdown_close"],(()=>{var i,s +const n=this,o=n.settings.mode,r=X(t) +if((!r||-1===n.items.indexOf(r)||("single"===o&&n.close(),"single"!==o&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===o&&n.clear(e),"multi"!==o||!n.isFull())){if(i=n._render("item",n.options[r]),n.control.contains(i)&&(i=i.cloneNode(!0)),s=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(i),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let t=n.getOption(r),e=n.getAdjacent(t,1) +e&&n.setActiveOption(e)}n.isPending||n.settings.closeAfterSelect||n.refreshOptions(n.isFocused&&"single"!==o),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,i),n.isPending||n.updateOriginalInput({silent:e})}(!n.isPending||!s&&n.isFull())&&(n.inputState(),n.refreshState())}}))}removeItem(t=null,e){const i=this +if(!(t=i.getItem(t)))return +var s,n +const o=t.dataset.value +s=K(t),t.remove(),t.classList.contains("active")&&(n=i.activeItems.indexOf(t),i.activeItems.splice(n,1),H(t,"active")),i.items.splice(s,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),s{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{}) +var i,s=this,n=s.caretPos +if(t=t||s.inputValue(),!s.canCreate(t))return e(),!1 +s.lock() +var o=!1,r=t=>{if(s.unlock(),!t||"object"!=typeof t)return e() +var i=X(t[s.settings.valueField]) +if("string"!=typeof i)return e() +s.setTextboxValue(),s.addOption(t,!0),s.setCaret(n),s.addItem(i),e(t),o=!0} +return i="function"==typeof s.settings.create?s.settings.create.call(this,t,r):{[s.settings.labelField]:t,[s.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this +t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this +t.refreshValidityState() +const e=t.isFull(),i=t.isLocked +t.wrapper.classList.toggle("rtl",t.rtl) +const s=t.wrapper.classList +var n +s.toggle("focus",t.isFocused),s.toggle("disabled",t.isDisabled),s.toggle("readonly",t.isReadOnly),s.toggle("required",t.isRequired),s.toggle("invalid",!t.isValid),s.toggle("locked",i),s.toggle("full",e),s.toggle("input-active",t.isFocused&&!t.isInputHidden),s.toggle("dropdown-active",t.isOpen),s.toggle("has-options",(n=t.options,0===Object.keys(n).length)),s.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this +t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this +var i,s +const n=e.input.querySelector('option[value=""]') +if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length +function l(t,i,s){return t||(t=V('")),t!=n&&e.input.append(t),o.push(t),(t!=n||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?l(n,"",""):e.items.forEach((t=>{if(i=e.options[t],s=i[e.settings.labelField]||"",o.includes(i.$option)){l(e.input.querySelector(`option[value="${rt(t)}"]:not(:checked)`),t,s)}else i.$option=l(i.$option,t,s)}))}else e.input.value=e.getValue() +e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this +t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Q(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),D(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),D(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen +t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,Q(e.focus_node,{"aria-expanded":"false"}),D(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,s=e.left+window.scrollX +D(this.dropdown,{width:e.width+"px",top:i+"px",left:s+"px"})}}clear(t){var e=this +if(e.items.length){var i=e.controlChildren() +E(i,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,s=e.control +s.insertBefore(t,s.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,s,n,o,r=this +e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)} +const l=[] +if(r.activeItems.length)n=B(r.activeItems,e),s=K(n),e>0&&s++,E(r.activeItems,(t=>l.push(t))) +else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren() +let s +e<0&&0===i.start&&0===i.length?s=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(s=t[r.caretPos]),void 0!==s&&l.push(s)}if(!r.shouldDelete(l,t))return!1 +for(it(t,!0),void 0!==s&&r.setCaret(s);l.length;)r.removeItem(l.pop()) +return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map((t=>t.dataset.value)) +return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,s,n=this +n.rtl&&(t*=-1),n.inputValue().length||(nt(U,e)||nt("shiftKey",e)?(s=(i=n.getLastActive(t))?i.classList.contains("active")?n.getAdjacent(i,t,"item"):i:t>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(s.classList.contains("active")&&n.removeActiveItem(i),n.setActiveItemClass(s)):n.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active") +if(e)return e +var i=this.control.querySelectorAll(".active") +return i?B(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings +t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,H(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,s +const n=this +if("function"!=typeof this.settings.render[t])return null +if(!(s=n.settings.render[t].call(this,e,Z)))return null +if(s=V(s),"option"===t||"option_create"===t?e[n.settings.disabledField]?Q(s,{"aria-disabled":"true"}):Q(s,{"data-selectable":""}):"optgroup"===t&&(i=e.group[n.settings.optgroupValueField],Q(s,{"data-group":i}),e.group[n.settings.disabledField]&&Q(s,{"data-disabled":""})),"option"===t||"item"===t){const i=Y(e[n.settings.valueField]) +Q(s,{"data-value":i}),"item"===t?(R(s,n.settings.itemClass),Q(s,{"data-ts-item":""})):(R(s,n.settings.optionClass),Q(s,{role:"option",id:e.$id}),e.$div=s,n.options[i]=e)}return s}_render(t,e){const i=this.render(t,e) +if(null==i)throw"HTMLElement expected" +return i}clearCache(){E(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t) +e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var s=this,n=s[e] +s[e]=function(){var e,o +return"after"===t&&(e=n.apply(s,arguments)),o=i.apply(s,arguments),"instead"===t?o:("before"===t&&(e=n.apply(s,arguments)),e)}}}return dt})) +var tomSelect=function(t,e){return new TomSelect(t,e)} +//# sourceMappingURL=tom-select.base.min.js.map diff --git a/ckanext/bulk/assets/vendor/tom-select.bootstrap5.css b/ckanext/bulk/assets/vendor/tom-select.bootstrap5.css new file mode 100644 index 0000000..9fa6ac0 --- /dev/null +++ b/ckanext/bulk/assets/vendor/tom-select.bootstrap5.css @@ -0,0 +1,608 @@ +/** + * Tom Select Bootstrap 5 + */ +/** + * tom-select.css (v2.3.0) + * Copyright (c) contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + */ +.ts-control { + border: 1px solid var(--bs-border-color); + padding: 0.375rem 0.75rem; + width: 100%; + overflow: hidden; + position: relative; + z-index: 1; + box-sizing: border-box; + box-shadow: none; + border-radius: var(--bs-border-radius); + display: flex; + flex-wrap: wrap; +} +.ts-wrapper.multi.has-items .ts-control { + padding: calc(0.375rem - 1px - 0) 0.75rem calc(0.375rem - 1px - 3px - 0); +} +.full .ts-control { + background-color: var(--bs-body-bg); +} +.disabled .ts-control, .disabled .ts-control * { + cursor: default !important; +} +.focus .ts-control { + box-shadow: none; +} +.ts-control > * { + vertical-align: baseline; + display: inline-block; +} +.ts-wrapper.multi .ts-control > div { + cursor: pointer; + margin: 0 3px 3px 0; + padding: 1px 5px; + background: #efefef; + color: #343a40; + border: 0 solid #dee2e6; +} +.ts-wrapper.multi .ts-control > div.active { + background: #0d6efd; + color: #fff; + border: 0 solid rgba(0, 0, 0, 0); +} +.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active { + color: #878787; + background: white; + border: 0 solid white; +} +.ts-control > input { + flex: 1 1 auto; + min-width: 7rem; + display: inline-block !important; + padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; + margin: 0 !important; + text-indent: 0 !important; + border: 0 none !important; + background: none !important; + line-height: inherit !important; + -webkit-user-select: auto !important; + -moz-user-select: auto !important; + -ms-user-select: auto !important; + user-select: auto !important; + box-shadow: none !important; +} +.ts-control > input::-ms-clear { + display: none; +} +.ts-control > input:focus { + outline: none !important; +} +.has-items .ts-control > input { + margin: 0 4px !important; +} +.ts-control.rtl { + text-align: right; +} +.ts-control.rtl.single .ts-control:after { + left: calc(0.75rem + 5px); + right: auto; +} +.ts-control.rtl .ts-control > input { + margin: 0 4px 0 -2px !important; +} +.disabled .ts-control { + opacity: 0.5; + background-color: var(--bs-secondary-bg); +} +.input-hidden .ts-control > input { + opacity: 0; + position: absolute; + left: -10000px; +} + +.ts-dropdown { + position: absolute; + top: 100%; + left: 0; + width: 100%; + z-index: 10; + border: 1px solid #d0d0d0; + background: var(--bs-body-bg); + margin: 0.25rem 0 0; + border-top: 0 none; + box-sizing: border-box; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); +} +.ts-dropdown [data-selectable] { + cursor: pointer; + overflow: hidden; +} +.ts-dropdown [data-selectable] .highlight { + background: rgba(255, 237, 40, 0.4); + border-radius: 1px; +} +.ts-dropdown .option, +.ts-dropdown .optgroup-header, +.ts-dropdown .no-results, +.ts-dropdown .create { + padding: 3px 0.75rem; +} +.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option { + cursor: inherit; + opacity: 0.5; +} +.ts-dropdown [data-selectable].option { + opacity: 1; + cursor: pointer; +} +.ts-dropdown .optgroup:first-child .optgroup-header { + border-top: 0 none; +} +.ts-dropdown .optgroup-header { + color: #6c757d; + background: var(--bs-body-bg); + cursor: default; +} +.ts-dropdown .active { + background-color: var(--bs-tertiary-bg); + color: var(--bs-body-color); +} +.ts-dropdown .active.create { + color: var(--bs-body-color); +} +.ts-dropdown .create { + color: rgba(52, 58, 64, 0.5); +} +.ts-dropdown .spinner { + display: inline-block; + width: 30px; + height: 30px; + margin: 3px 0.75rem; +} +.ts-dropdown .spinner::after { + content: " "; + display: block; + width: 24px; + height: 24px; + margin: 3px; + border-radius: 50%; + border: 5px solid #d0d0d0; + border-color: #d0d0d0 transparent #d0d0d0 transparent; + animation: lds-dual-ring 1.2s linear infinite; +} +@keyframes lds-dual-ring { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.ts-dropdown-content { + overflow: hidden auto; + max-height: 200px; + scroll-behavior: smooth; +} + +.ts-wrapper.plugin-drag_drop .ts-dragging { + color: transparent !important; +} +.ts-wrapper.plugin-drag_drop .ts-dragging > * { + visibility: hidden !important; +} + +.plugin-checkbox_options:not(.rtl) .option input { + margin-right: 0.5rem; +} + +.plugin-checkbox_options.rtl .option input { + margin-left: 0.5rem; +} + +/* stylelint-disable function-name-case */ +.plugin-clear_button { + --ts-pr-clear-button: 1em; +} +.plugin-clear_button .clear-button { + opacity: 0; + position: absolute; + top: 50%; + transform: translateY(-50%); + right: calc(0.75rem - 5px); + margin-right: 0 !important; + background: transparent !important; + transition: opacity 0.5s; + cursor: pointer; +} +.plugin-clear_button.form-select .clear-button, .plugin-clear_button.single .clear-button { + right: max(var(--ts-pr-caret), 0.75rem); +} +.plugin-clear_button.focus.has-items .clear-button, .plugin-clear_button:not(.disabled):hover.has-items .clear-button { + opacity: 1; +} + +.ts-wrapper .dropdown-header { + position: relative; + padding: 6px 0.75rem; + border-bottom: 1px solid #d0d0d0; + background: color-mix(var(--bs-body-bg), #d0d0d0, 85%); + border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0; +} +.ts-wrapper .dropdown-header-close { + position: absolute; + right: 0.75rem; + top: 50%; + color: #343a40; + opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; +} +.ts-wrapper .dropdown-header-close:hover { + color: black; +} + +.plugin-dropdown_input.focus.dropdown-active .ts-control { + box-shadow: none; + border: 1px solid var(--bs-border-color); + box-shadow: var(--bs-box-shadow-inset); +} +.plugin-dropdown_input .dropdown-input { + border: 1px solid #d0d0d0; + border-width: 0 0 1px; + display: block; + padding: 0.375rem 0.75rem; + box-shadow: none; + width: 100%; + background: transparent; +} +.plugin-dropdown_input.focus .ts-dropdown .dropdown-input { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.plugin-dropdown_input .items-placeholder { + border: 0 none !important; + box-shadow: none !important; + width: 100%; +} +.plugin-dropdown_input.has-items .items-placeholder, .plugin-dropdown_input.dropdown-active .items-placeholder { + display: none !important; +} + +.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input { + min-width: 0; +} +.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input { + flex: none; + min-width: 4px; +} +.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder { + color: transparent; +} +.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder { + color: transparent; +} + +.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content { + display: flex; +} +.ts-dropdown.plugin-optgroup_columns .optgroup { + border-right: 1px solid #f2f2f2; + border-top: 0 none; + flex-grow: 1; + flex-basis: 0; + min-width: 0; +} +.ts-dropdown.plugin-optgroup_columns .optgroup:last-child { + border-right: 0 none; +} +.ts-dropdown.plugin-optgroup_columns .optgroup::before { + display: none; +} +.ts-dropdown.plugin-optgroup_columns .optgroup-header { + border-top: 0 none; +} + +.ts-wrapper.plugin-remove_button .item { + display: inline-flex; + align-items: center; +} +.ts-wrapper.plugin-remove_button .item .remove { + color: inherit; + text-decoration: none; + vertical-align: middle; + display: inline-block; + padding: 0 5px; + border-radius: 0 2px 2px 0; + box-sizing: border-box; +} +.ts-wrapper.plugin-remove_button .item .remove:hover { + background: rgba(0, 0, 0, 0.05); +} +.ts-wrapper.plugin-remove_button.disabled .item .remove:hover { + background: none; +} +.ts-wrapper.plugin-remove_button .remove-single { + position: absolute; + right: 0; + top: 0; + font-size: 23px; +} + +.ts-wrapper.plugin-remove_button:not(.rtl) .item { + padding-right: 0 !important; +} +.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove { + border-left: 1px solid #dee2e6; + margin-left: 5px; +} +.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove { + border-left-color: rgba(0, 0, 0, 0); +} +.ts-wrapper.plugin-remove_button:not(.rtl).disabled .item .remove { + border-left-color: white; +} + +.ts-wrapper.plugin-remove_button.rtl .item { + padding-left: 0 !important; +} +.ts-wrapper.plugin-remove_button.rtl .item .remove { + border-right: 1px solid #dee2e6; + margin-right: 5px; +} +.ts-wrapper.plugin-remove_button.rtl .item.active .remove { + border-right-color: rgba(0, 0, 0, 0); +} +.ts-wrapper.plugin-remove_button.rtl.disabled .item .remove { + border-right-color: white; +} + +:root { + --ts-pr-clear-button: 0; + --ts-pr-caret: 0; + --ts-pr-min: .75rem; +} + +.ts-wrapper.single .ts-control, .ts-wrapper.single .ts-control input { + cursor: pointer; +} + +.ts-control:not(.rtl) { + padding-right: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important; +} + +.ts-control.rtl { + padding-left: max(var(--ts-pr-min), var(--ts-pr-clear-button) + var(--ts-pr-caret)) !important; +} + +.ts-wrapper { + position: relative; +} + +.ts-dropdown, +.ts-control, +.ts-control input { + color: #343a40; + font-family: inherit; + font-size: inherit; + line-height: 1.5; +} + +.ts-control, +.ts-wrapper.single.input-active .ts-control { + background: var(--bs-body-bg); + cursor: text; +} + +.ts-hidden-accessible { + border: 0 !important; + clip: rect(0 0 0 0) !important; + -webkit-clip-path: inset(50%) !important; + clip-path: inset(50%) !important; + overflow: hidden !important; + padding: 0 !important; + position: absolute !important; + width: 1px !important; + white-space: nowrap !important; +} + +.ts-dropdown, +.ts-dropdown.form-control, +.ts-dropdown.form-select { + height: auto; + padding: 0; + z-index: 1000; + background: var(--bs-body-bg); + border: 1px solid var(--bs-border-color-translucent); + border-radius: 0.375rem; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); +} + +.ts-dropdown .optgroup-header { + font-size: 0.875rem; + line-height: 1.5; +} +.ts-dropdown .optgroup:first-child::before { + display: none; +} +.ts-dropdown .optgroup::before { + content: " "; + display: block; + height: 0; + margin: 0.5rem 0; + overflow: hidden; + border-top: 1px solid var(--bs-border-color-translucent); + margin-left: -0.75rem; + margin-right: -0.75rem; +} +.ts-dropdown .create { + padding-left: 0.75rem; +} + +.ts-dropdown-content { + padding: 5px 0; +} + +.ts-control { + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + display: flex; + align-items: center; +} +@media (prefers-reduced-motion: reduce) { + .ts-control { + transition: none; + } +} +.focus .ts-control { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.ts-control .item { + display: flex; + align-items: center; +} + +.ts-wrapper.is-invalid, +.was-validated .invalid, +.was-validated :invalid + .ts-wrapper { + border-color: var(--bs-form-invalid-color); +} +.ts-wrapper.is-invalid:not(.single), +.was-validated .invalid:not(.single), +.was-validated :invalid + .ts-wrapper:not(.single) { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-repeat: no-repeat; +} +.ts-wrapper.is-invalid.single, +.was-validated .invalid.single, +.was-validated :invalid + .ts-wrapper.single { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-repeat: no-repeat; +} +.ts-wrapper.is-invalid.focus .ts-control, +.was-validated .invalid.focus .ts-control, +.was-validated :invalid + .ts-wrapper.focus .ts-control { + border-color: var(--bs-form-invalid-color); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-form-invalid-color), 0.25); +} + +.ts-wrapper.is-valid, +.was-validated .valid, +.was-validated :valid + .ts-wrapper { + border-color: var(--bs-form-valid-color); +} +.ts-wrapper.is-valid:not(.single), +.was-validated .valid:not(.single), +.was-validated :valid + .ts-wrapper:not(.single) { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right calc(0.375em + 0.1875rem) center; + background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-repeat: no-repeat; +} +.ts-wrapper.is-valid.single, +.was-validated .valid.single, +.was-validated :valid + .ts-wrapper.single { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); + background-position: right 0.75rem center, center right 2.25rem; + background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-repeat: no-repeat; +} +.ts-wrapper.is-valid.focus .ts-control, +.was-validated .valid.focus .ts-control, +.was-validated :valid + .ts-wrapper.focus .ts-control { + border-color: var(--bs-form-valid-color); + box-shadow: 0 0 0 0.25rem rgba(var(--bs-form-valid-color), 0.25); +} + +.ts-wrapper { + min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); + display: flex; +} +.input-group-sm > .ts-wrapper, .ts-wrapper.form-select-sm, .ts-wrapper.form-control-sm { + min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); +} +.input-group-sm > .ts-wrapper .ts-control, .ts-wrapper.form-select-sm .ts-control, .ts-wrapper.form-control-sm .ts-control { + border-radius: var(--bs-border-radius-sm); + font-size: 0.875rem; +} +.input-group-sm > .ts-wrapper.has-items .ts-control, .ts-wrapper.form-select-sm.has-items .ts-control, .ts-wrapper.form-control-sm.has-items .ts-control { + font-size: 0.875rem; + padding-bottom: 0; +} +.input-group-sm > .ts-wrapper.multi.has-items .ts-control, .ts-wrapper.form-select-sm.multi.has-items .ts-control, .ts-wrapper.form-control-sm.multi.has-items .ts-control { + padding-top: calc((calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)) - 1.5 * 0.875rem - calc((var(--bs-border-width) + 1px) * 2)) / 2) !important; +} +.ts-wrapper.multi.has-items .ts-control { + padding-left: calc(0.75rem - 5px); + --ts-pr-min: calc(0.75rem - 5px); +} +.ts-wrapper.multi .ts-control > div { + border-radius: calc(var(--bs-border-radius) - 1px); +} +.input-group-lg > .ts-wrapper, .ts-wrapper.form-control-lg, .ts-wrapper.form-select-lg { + min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); +} +.input-group-lg > .ts-wrapper .ts-control, .ts-wrapper.form-control-lg .ts-control, .ts-wrapper.form-select-lg .ts-control { + border-radius: var(--bs-border-radius-lg); + font-size: 1.25rem; +} +.ts-wrapper:not(.form-control, .form-select) { + padding: 0; + border: none; + height: auto; + box-shadow: none; + background: none; +} +.ts-wrapper:not(.form-control, .form-select).single .ts-control { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; +} +.ts-wrapper.form-select, .ts-wrapper.single { + --ts-pr-caret: 2.25rem; +} +.ts-wrapper.form-control, .ts-wrapper.form-select { + padding: 0 !important; + height: auto; + box-shadow: none; + display: flex; +} +.ts-wrapper.form-control .ts-control, .ts-wrapper.form-control.single.input-active .ts-control, .ts-wrapper.form-select .ts-control, .ts-wrapper.form-select.single.input-active .ts-control { + border: none !important; +} +.ts-wrapper.form-control:not(.disabled) .ts-control, .ts-wrapper.form-control:not(.disabled).single.input-active .ts-control, .ts-wrapper.form-select:not(.disabled) .ts-control, .ts-wrapper.form-select:not(.disabled).single.input-active .ts-control { + background: transparent !important; +} + +.input-group > .ts-wrapper { + flex-grow: 1; + width: 1%; +} +.input-group > .ts-wrapper:not(:nth-child(2)) > .ts-control { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group > .ts-wrapper:not(:last-child) > .ts-control { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +/*# sourceMappingURL=tom-select.bootstrap5.css.map */ \ No newline at end of file diff --git a/ckanext/bulk/assets/vendor/tom-select.complete.min.js b/ckanext/bulk/assets/vendor/tom-select.complete.min.js new file mode 100644 index 0000000..1a5e189 --- /dev/null +++ b/ckanext/bulk/assets/vendor/tom-select.complete.min.js @@ -0,0 +1,440 @@ +/** +* Tom Select v2.3.0 +* Licensed under the Apache License, Version 2.0 (the "License"); +*/ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TomSelect=t()}(this,(function(){"use strict" +function e(e,t){e.split(/\s+/).forEach((e=>{t(e)}))}class t{constructor(){this._events=void 0,this._events={}}on(t,i){e(t,(e=>{const t=this._events[e]||[] +t.push(i),this._events[e]=t}))}off(t,i){var s=arguments.length +0!==s?e(t,(e=>{if(1===s)return void delete this._events[e] +const t=this._events[e] +void 0!==t&&(t.splice(t.indexOf(i),1),this._events[e]=t)})):this._events={}}trigger(t,...i){var s=this +e(t,(e=>{const t=s._events[e] +void 0!==t&&t.forEach((e=>{e.apply(s,i)}))}))}}const i=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==l(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",s=e=>{if(!o(e))return e.join("") +let t="",i=0 +const s=()=>{i>1&&(t+="{"+i+"}")} +return e.forEach(((n,o)=>{n!==e[o-1]?(s(),t+=n,i=1):i++})),s(),t},n=e=>{let t=c(e) +return i(t)},o=e=>new Set(e).size!==e.length,r=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),l=e=>e.reduce(((e,t)=>Math.max(e,a(t))),0),a=e=>c(e).length,c=e=>Array.from(e),d=e=>{if(1===e.length)return[[e]] +let t=[] +const i=e.substring(1) +return d(i).forEach((function(i){let s=i.slice(0) +s[0]=e.charAt(0)+s[0],t.push(s),s=i.slice(0),s.unshift(e.charAt(0)),t.push(s)})),t},u=[[0,65535]] +let p,h +const g={},f={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"} +for(let e in f){let t=f[e]||"" +for(let i=0;ie.normalize(t),y=e=>c(e).reduce(((e,t)=>e+O(t)),""),O=e=>(e=m(e).toLowerCase().replace(v,(e=>g[e]||"")),m(e,"NFC")) +const b=e=>{const t={},i=(e,i)=>{const s=t[e]||new Set,o=new RegExp("^"+n(s)+"$","iu") +i.match(o)||(s.add(r(i)),t[e]=s)} +for(let t of function*(e){for(const[t,i]of e)for(let e=t;e<=i;e++){let t=String.fromCharCode(e),i=y(t) +i!=t.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:t,code_point:e}))}}(e))i(t.folded,t.folded),i(t.folded,t.composed) +return t},w=e=>{const t=b(e),s={} +let o=[] +for(let e in t){let i=t[e] +i&&(s[e]=n(i)),e.length>1&&o.push(r(e))}o.sort(((e,t)=>t.length-e.length)) +const l=i(o) +return h=new RegExp("^"+l,"u"),s},_=(e,t=1)=>(t=Math.max(t,e.length-1),i(d(e).map((e=>((e,t=1)=>{let i=0 +return e=e.map((e=>(p[e]&&(i+=e.length),p[e]||e))),i>=t?s(e):""})(e,t))))),C=(e,t=!0)=>{let n=e.length>1?1:0 +return i(e.map((e=>{let i=[] +const o=t?e.length():e.length()-1 +for(let t=0;t{for(const i of t){if(i.start!=e.start||i.end!=e.end)continue +if(i.substrs.join("")!==e.substrs.join(""))continue +let t=e.parts +const s=e=>{for(const i of t){if(i.start===e.start&&i.substr===e.substr)return!1 +if(1!=e.length&&1!=i.length){if(e.starti.start)return!0 +if(i.starte.start)return!0}}return!1} +if(!(i.parts.filter(s).length>0))return!0}return!1} +class I{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let i=new I,s=JSON.parse(JSON.stringify(this.parts)),n=s.pop() +for(const e of s)i.add(e) +let o=t.substr.substring(0,e-n.start),r=o.length +return i.add({start:n.start,end:n.start+r,length:r,substr:o}),i}}const A=e=>{var t +void 0===p&&(p=w(t||u)),e=y(e) +let i="",s=[new I] +for(let t=0;t0){l=l.sort(((e,t)=>e.length()-t.length())) +for(let e of l)S(e,s)||s.push(e)}else if(t>0&&1==a.size&&!a.has("3")){i+=C(s,!1) +let e=new I +const t=s[0] +t&&e.add(t.last()),s=[e]}}return i+=C(s,!0),i},x=(e,t)=>{if(e)return e[t]},k=(e,t)=>{if(e){for(var i,s=t.split(".");(i=s.shift())&&(e=e[i]););return e}},F=(e,t,i)=>{var s,n +return e?(e+="",null==t.regex||-1===(n=e.search(t.regex))?0:(s=t.string.length/e.length,0===n&&(s+=.5),s*i)):0},L=(e,t)=>{var i=e[t] +if("function"==typeof i)return i +i&&!Array.isArray(i)&&(e[t]=[i])},E=(e,t)=>{if(Array.isArray(e))e.forEach(t) +else for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},T=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e(t=y(t+"").toLowerCase())?1:t>e?-1:0 +class P{constructor(e,t){this.items=void 0,this.settings=void 0,this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,i){if(!e||!e.length)return[] +const s=[],n=e.split(/\s+/) +var o +return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),n.forEach((e=>{let i,n=null,l=null +o&&(i=e.match(o))&&(n=i[1],e=i[2]),e.length>0&&(l=this.settings.diacritics?A(e)||null:r(e),l&&t&&(l="\\b"+l)),s.push({string:e,regex:l?new RegExp(l,"iu"):null,field:n})})),s}getScoreFunction(e,t){var i=this.prepareSearch(e,t) +return this._getScoreFunction(i)}_getScoreFunction(e){const t=e.tokens,i=t.length +if(!i)return function(){return 0} +const s=e.options.fields,n=e.weights,o=s.length,r=e.getAttrFn +if(!o)return function(){return 1} +const l=1===o?function(e,t){const i=s[0].field +return F(r(t,i),e,n[i]||1)}:function(e,t){var i=0 +if(e.field){const s=r(t,e.field) +!e.regex&&s?i+=1/o:i+=F(s,e,1)}else E(n,((s,n)=>{i+=F(r(t,n),e,s)})) +return i/o} +return 1===i?function(e){return l(t[0],e)}:"and"===e.options.conjunction?function(e){var s,n=0 +for(let i of t){if((s=l(i,e))<=0)return 0 +n+=s}return n/i}:function(e){var s=0 +return E(t,(t=>{s+=l(t,e)})),s/i}}getSortFunction(e,t){var i=this.prepareSearch(e,t) +return this._getSortFunction(i)}_getSortFunction(e){var t,i=[] +const s=this,n=e.options,o=!e.query&&n.sort_empty?n.sort_empty:n.sort +if("function"==typeof o)return o.bind(this) +const r=function(t,i){return"$score"===t?i.score:e.getAttrFn(s.items[i.id],t)} +if(o)for(let t of o)(e.query||"$score"!==t.field)&&i.push(t) +if(e.query){t=!0 +for(let e of i)if("$score"===e.field){t=!1 +break}t&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((e=>"$score"!==e.field)) +return i.length?function(e,t){var s,n +for(let o of i){if(n=o.field,s=("desc"===o.direction?-1:1)*T(r(n,e),r(n,t)))return s}return 0}:null}prepareSearch(e,t){const i={} +var s=Object.assign({},t) +if(L(s,"sort"),L(s,"sort_empty"),s.fields){L(s,"fields") +const e=[] +s.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),i[t.field]="weight"in t?t.weight:1})),s.fields=e}return{options:s,query:e.toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:s.nesting?k:x}}search(e,t){var i,s,n=this +s=this.prepareSearch(e,t),t=s.options,e=s.query +const o=t.score||n._getScoreFunction(s) +e.length?E(n.items,((e,n)=>{i=o(e),(!1===t.filter||i>0)&&s.items.push({score:i,id:n})})):E(n.items,((e,t)=>{s.items.push({score:1,id:t})})) +const r=n._getSortFunction(s) +return r&&s.items.sort(r),s.total=s.items.length,"number"==typeof t.limit&&(s.items=s.items.slice(0,t.limit)),s}}const N=(e,t)=>{if(Array.isArray(e))e.forEach(t) +else for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},j=e=>{if(e.jquery)return e[0] +if(e instanceof HTMLElement)return e +if($(e)){var t=document.createElement("template") +return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},$=e=>"string"==typeof e&&e.indexOf("<")>-1,V=(e,t)=>{var i=document.createEvent("HTMLEvents") +i.initEvent(t,!0,!1),e.dispatchEvent(i)},q=(e,t)=>{Object.assign(e.style,t)},D=(e,...t)=>{var i=H(t);(e=M(e)).map((e=>{i.map((t=>{e.classList.add(t)}))}))},R=(e,...t)=>{var i=H(t);(e=M(e)).map((e=>{i.map((t=>{e.classList.remove(t)}))}))},H=e=>{var t=[] +return N(e,(e=>{"string"==typeof e&&(e=e.trim().split(/[\11\12\14\15\40]/)),Array.isArray(e)&&(t=t.concat(e))})),t.filter(Boolean)},M=e=>(Array.isArray(e)||(e=[e]),e),z=(e,t,i)=>{if(!i||i.contains(e))for(;e&&e.matches;){if(e.matches(t))return e +e=e.parentNode}},B=(e,t=0)=>t>0?e[e.length-1]:e[0],K=(e,t)=>{if(!e)return-1 +t=t||e.nodeName +for(var i=0;e=e.previousElementSibling;)e.matches(t)&&i++ +return i},Q=(e,t)=>{N(t,((t,i)=>{null==t?e.removeAttribute(i):e.setAttribute(i,""+t)}))},G=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},U=(e,t)=>{if(null===t)return +if("string"==typeof t){if(!t.length)return +t=new RegExp(t,"i")}const i=e=>3===e.nodeType?(e=>{var i=e.data.match(t) +if(i&&e.data.length>0){var s=document.createElement("span") +s.className="highlight" +var n=e.splitText(i.index) +n.splitText(i[0].length) +var o=n.cloneNode(!0) +return s.appendChild(o),G(n,s),1}return 0})(e):((e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach((e=>{i(e)}))})(e),0) +i(e)},J="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey" +var W={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}} +const X=e=>null==e?null:Y(e),Y=e=>"boolean"==typeof e?e?"1":"0":e+"",Z=e=>(e+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),ee=(e,t)=>{var i +return function(s,n){var o=this +i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[s]=!0,e.call(o,s,n)}),t)}},te=(e,t,i)=>{var s,n=e.trigger,o={} +for(s of(e.trigger=function(){var i=arguments[0] +if(-1===t.indexOf(i))return n.apply(e,arguments) +o[i]=arguments},i.apply(e,[]),e.trigger=n,t))s in o&&n.apply(e,o[s])},ie=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},se=(e,t,i,s)=>{e.addEventListener(t,i,s)},ne=(e,t)=>!!t&&(!!t[e]&&1===(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0)),oe=(e,t)=>{const i=e.getAttribute("id") +return i||(e.setAttribute("id",t),t)},re=e=>e.replace(/[\\"']/g,"\\$&"),le=(e,t)=>{t&&e.append(t)} +function ae(e,t){var i=Object.assign({},W,t),s=i.dataAttr,n=i.labelField,o=i.valueField,r=i.disabledField,l=i.optgroupField,a=i.optgroupLabelField,c=i.optgroupValueField,d=e.tagName.toLowerCase(),u=e.getAttribute("placeholder")||e.getAttribute("data-placeholder") +if(!u&&!i.allowEmptyOption){let t=e.querySelector('option[value=""]') +t&&(u=t.textContent)}var p={placeholder:u,options:[],optgroups:[],items:[],maxItems:null} +return"select"===d?(()=>{var t,d=p.options,u={},h=1 +let g=0 +var f=e=>{var t=Object.assign({},e.dataset),i=s&&t[s] +return"string"==typeof i&&i.length&&(t=Object.assign(t,JSON.parse(i))),t},v=(e,t)=>{var s=X(e.value) +if(null!=s&&(s||i.allowEmptyOption)){if(u.hasOwnProperty(s)){if(t){var a=u[s][l] +a?Array.isArray(a)?a.push(t):u[s][l]=[a,t]:u[s][l]=t}}else{var c=f(e) +c[n]=c[n]||e.textContent,c[o]=c[o]||s,c[r]=c[r]||e.disabled,c[l]=c[l]||t,c.$option=e,c.$order=c.$order||++g,u[s]=c,d.push(c)}e.selected&&p.items.push(s)}} +p.maxItems=e.hasAttribute("multiple")?null:1,N(e.children,(e=>{var i,s,n +"optgroup"===(t=e.tagName.toLowerCase())?((n=f(i=e))[a]=n[a]||i.getAttribute("label")||"",n[c]=n[c]||h++,n[r]=n[r]||i.disabled,n.$order=n.$order||++g,p.optgroups.push(n),s=n[c],N(i.children,(e=>{v(e,s)}))):"option"===t&&v(e)}))})():(()=>{const t=e.getAttribute(s) +if(t)p.options=JSON.parse(t),N(p.options,(e=>{p.items.push(e[o])})) +else{var r=e.value.trim()||"" +if(!i.allowEmptyOption&&!r.length)return +const t=r.split(i.delimiter) +N(t,(e=>{const t={} +t[n]=e,t[o]=e,p.options.push(t)})),p.items=t}})(),Object.assign({},W,p,t)}var ce=0 +class de extends(function(e){return e.plugins={},class extends e{constructor(...e){super(...e),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,i){e.plugins[t]={name:t,fn:i}}initializePlugins(e){var t,i +const s=this,n=[] +if(Array.isArray(e))e.forEach((e=>{"string"==typeof e?n.push(e):(s.plugins.settings[e.name]=e.options,n.push(e.name))})) +else if(e)for(t in e)e.hasOwnProperty(t)&&(s.plugins.settings[t]=e[t],n.push(t)) +for(;i=n.shift();)s.require(i)}loadPlugin(t){var i=this,s=i.plugins,n=e.plugins[t] +if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin') +s.requested[t]=!0,s.loaded[t]=n.fn.apply(i,[i.plugins.settings[t]||{}]),s.names.push(t)}require(e){var t=this,i=t.plugins +if(!t.plugins.loaded.hasOwnProperty(e)){if(i.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")') +t.loadPlugin(e)}return i.loaded[e]}}}(t)){constructor(e,t){var i +super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,ce++ +var s=j(e) +if(s.tomselect)throw new Error("Tom Select already initialized on this element") +s.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(s,null)).getPropertyValue("direction") +const n=ae(s,t) +this.settings=n,this.input=s,this.tabIndex=s.tabIndex||0,this.is_select_tag="select"===s.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=oe(s,"tomselect-"+ce),this.isRequired=s.required,this.sifter=new P(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode) +var o=n.createFilter +"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?n.createFilter=e=>o.test(e):n.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates() +const r=j("
    "),l=j("
    "),a=this._render("dropdown"),c=j('
    '),d=this.input.getAttribute("class")||"",u=n.mode +var p +if(D(r,n.wrapperClass,d,u),D(l,n.controlClass),le(r,l),D(a,n.dropdownClass,u),n.copyClassesToDropdown&&D(a,d),D(c,n.dropdownContentClass),le(a,c),j(n.dropdownParent||r).appendChild(a),$(n.controlInput)){p=j(n.controlInput) +E(["autocorrect","autocapitalize","autocomplete","spellcheck"],(e=>{s.getAttribute(e)&&Q(p,{[e]:s.getAttribute(e)})})),p.tabIndex=-1,l.appendChild(p),this.focus_node=p}else n.controlInput?(p=j(n.controlInput),this.focus_node=p):(p=j(""),this.focus_node=l) +this.wrapper=r,this.dropdown=a,this.dropdown_content=c,this.control=l,this.control_input=p,this.setup()}setup(){const e=this,t=e.settings,i=e.control_input,s=e.dropdown,n=e.dropdown_content,o=e.wrapper,l=e.control,a=e.input,c=e.focus_node,d={passive:!0},u=e.inputId+"-ts-dropdown" +Q(n,{id:u}),Q(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u}) +const p=oe(c,e.inputId+"-ts-control"),h="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",g=document.querySelector(h),f=e.focus.bind(e) +if(g){se(g,"click",f),Q(g,{for:p}) +const t=oe(g,e.inputId+"-ts-label") +Q(c,{"aria-labelledby":t}),Q(n,{"aria-labelledby":t})}if(o.style.width=a.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-") +D([o,s],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&Q(a,{multiple:"multiple"}),t.placeholder&&Q(i,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+r(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=ee(t.load,t.loadThrottle)),se(s,"mousemove",(()=>{e.ignoreHover=!1})),se(s,"mouseenter",(t=>{var i=z(t.target,"[data-selectable]",s) +i&&e.onOptionHover(t,i)}),{capture:!0}),se(s,"click",(t=>{const i=z(t.target,"[data-selectable]") +i&&(e.onOptionSelect(t,i),ie(t,!0))})),se(l,"click",(t=>{var s=z(t.target,"[data-ts-item]",l) +s&&e.onItemSelect(t,s)?ie(t,!0):""==i.value&&(e.onClick(),ie(t,!0))})),se(c,"keydown",(t=>e.onKeyDown(t))),se(i,"keypress",(t=>e.onKeyPress(t))),se(i,"input",(t=>e.onInput(t))),se(c,"blur",(t=>e.onBlur(t))),se(c,"focus",(t=>e.onFocus(t))),se(i,"paste",(t=>e.onPaste(t))) +const v=t=>{const n=t.composedPath()[0] +if(!o.contains(n)&&!s.contains(n))return e.isFocused&&e.blur(),void e.inputState() +n==i&&e.isOpen?t.stopPropagation():ie(t,!0)},m=()=>{e.isOpen&&e.positionDropdown()} +se(document,"mousedown",v),se(window,"scroll",m,d),se(window,"resize",m,d),this._destroy=()=>{document.removeEventListener("mousedown",v),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),g&&g.removeEventListener("click",f)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,se(a,"invalid",(()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())})),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,a.disabled?e.disable():a.readOnly?e.setReadOnly(!0):e.enable(),e.on("change",this.onChange),D(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),E(t,(e=>{this.registerOptionGroup(e)}))}setupTemplates(){var e=this,t=e.settings.labelField,i=e.settings.optgroupLabelField,s={optgroup:e=>{let t=document.createElement("div") +return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'
    '+t(e[i])+"
    ",option:(e,i)=>"
    "+i(e[t])+"
    ",item:(e,i)=>"
    "+i(e[t])+"
    ",option_create:(e,t)=>'
    Add '+t(e.input)+"
    ",no_results:()=>'
    No results found
    ',loading:()=>'
    ',not_loading:()=>{},dropdown:()=>"
    "} +e.settings.render=Object.assign({},s,e.settings.render)}setupCallbacks(){var e,t,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"} +for(e in i)(t=this.settings[i[e]])&&this.on(e,t)}sync(e=!0){const t=this,i=e?ae(t.input,{delimiter:t.settings.delimiter}):t.settings +t.setupOptions(i.options,i.optgroups),t.setValue(i.items||[],!0),t.lastQuery=null}onClick(){var e=this +if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus() +e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){V(this.input,"input"),V(this.input,"change")}onPaste(e){var t=this +t.isInputHidden||t.isLocked?ie(e):t.settings.splitOn&&setTimeout((()=>{var e=t.inputValue() +if(e.match(t.settings.splitOn)){var i=e.trim().split(t.settings.splitOn) +E(i,(e=>{X(e)&&(this.options[e]?t.addItem(e):t.createItem(e))}))}}),0)}onKeyPress(e){var t=this +if(!t.isLocked){var i=String.fromCharCode(e.keyCode||e.which) +return t.settings.create&&"multi"===t.settings.mode&&i===t.settings.delimiter?(t.createItem(),void ie(e)):void 0}ie(e)}onKeyDown(e){var t=this +if(t.ignoreHover=!0,t.isLocked)9!==e.keyCode&&ie(e) +else{switch(e.keyCode){case 65:if(ne(J,e)&&""==t.control_input.value)return ie(e),void t.selectAll() +break +case 27:return t.isOpen&&(ie(e,!0),t.close()),void t.clearActiveItems() +case 40:if(!t.isOpen&&t.hasOptions)t.open() +else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1) +e&&t.setActiveOption(e)}return void ie(e) +case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1) +e&&t.setActiveOption(e)}return void ie(e) +case 13:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),ie(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&ie(e)) +case 37:return void t.advanceSelection(-1,e) +case 39:return void t.advanceSelection(1,e) +case 9:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)&&(t.onOptionSelect(e,t.activeOption),ie(e)),t.settings.create&&t.createItem()&&ie(e))) +case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!ne(J,e)&&ie(e)}}onInput(e){if(this.isLocked)return +const t=this.inputValue() +this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=((e,t)=>t>0?setTimeout(e,t):(e.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const e=this.lastValue +this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,i=t.isFocused +if(t.isDisabled||t.isReadOnly)return t.blur(),void ie(e) +t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),i||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this +if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1 +var i=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")} +t.settings.create&&t.settings.createOnBlur?t.createItem(null,i):i()}}}onOptionSelect(e,t){var i,s=this +t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?s.createItem(null,(()=>{s.settings.closeAfterSelect&&s.close()})):void 0!==(i=t.dataset.value)&&(s.lastQuery=null,s.addItem(i),s.settings.closeAfterSelect&&s.close(),!s.settings.hideSelected&&e.type&&/click/.test(e.type)&&s.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var i=this +return!i.isLocked&&"multi"===i.settings.mode&&(ie(e),i.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this +if(!t.canLoad(e))return +D(t.wrapper,t.settings.loadingClass),t.loading++ +const i=t.loadCallback.bind(t) +t.settings.load.call(t,e,i)}loadCallback(e,t){const i=this +i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(e,t),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||R(i.wrapper,i.settings.loadingClass),i.trigger("load",e,t)}preload(){var e=this.wrapper.classList +e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input +t.value!==e&&(t.value=e,V(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){te(this,t?[]:["change"],(()=>{this.clear(t),this.addItems(e,t)}))}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var i,s,n,o,r,l,a=this +if("single"!==a.settings.mode){if(!e)return a.clearActiveItems(),void(a.isFocused&&a.inputState()) +if("click"===(i=t&&t.type.toLowerCase())&&ne("shiftKey",t)&&a.activeItems.length){for(l=a.getLastActive(),(n=Array.prototype.indexOf.call(a.control.children,l))>(o=Array.prototype.indexOf.call(a.control.children,e))&&(r=n,n=o,o=r),s=n;s<=o;s++)e=a.control.children[s],-1===a.activeItems.indexOf(e)&&a.setActiveItemClass(e) +ie(t)}else"click"===i&&ne(J,t)||"keydown"===i&&ne("shiftKey",t)?e.classList.contains("active")?a.removeActiveItem(e):a.setActiveItemClass(e):(a.clearActiveItems(),a.setActiveItemClass(e)) +a.inputState(),a.isFocused||a.focus()}}setActiveItemClass(e){const t=this,i=t.control.querySelector(".last-active") +i&&R(i,"last-active"),D(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e) +this.activeItems.splice(t,1),R(e,"active")}clearActiveItems(){R(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,Q(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),Q(e,{"aria-selected":"true"}),D(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return +const i=this.dropdown_content,s=i.clientHeight,n=i.scrollTop||0,o=e.offsetHeight,r=e.getBoundingClientRect().top-i.getBoundingClientRect().top+n +r+o>s+n?this.scroll(r-s+o,t):r{e.setActiveItemClass(t)})))}inputState(){var e=this +e.control.contains(e.control_input)&&(Q(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&Q(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this +e.isDisabled||e.isReadOnly||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout((()=>{e.ignoreFocus=!1,e.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField +return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,i,s=this,n=this.getSearchOptions() +if(s.settings.score&&"function"!=typeof(i=s.settings.score.call(s,e)))throw new Error('Tom Select "score" setting must be a function that returns a function') +return e!==s.lastQuery?(s.lastQuery=e,t=s.sifter.search(e,Object.assign(n,{score:i})),s.currentResults=t):t=Object.assign({},s.currentResults),s.settings.hideSelected&&(t.items=t.items.filter((e=>{let t=X(e.id) +return!(t&&-1!==s.items.indexOf(t))}))),t}refreshOptions(e=!0){var t,i,s,n,o,r,l,a,c,d +const u={},p=[] +var h=this,g=h.inputValue() +const f=g===h.lastQuery||""==g&&null==h.lastQuery +var v=h.search(g),m=null,y=h.settings.shouldOpen||!1,O=h.dropdown_content +f&&(m=h.activeOption)&&(c=m.closest("[data-group]")),n=v.items.length,"number"==typeof h.settings.maxOptions&&(n=Math.min(n,h.settings.maxOptions)),n>0&&(y=!0) +const b=(e,t)=>{let i=u[e] +if(void 0!==i){let e=p[i] +if(void 0!==e)return[i,e.fragment]}let s=document.createDocumentFragment() +return i=p.length,p.push({fragment:s,order:t,optgroup:e}),[i,s]} +for(t=0;t0&&(d=d.cloneNode(!0),Q(d,{id:l.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),R(d,"active"),h.activeOption&&h.activeOption.dataset.value==n&&c&&c.dataset.group===o.toString()&&(m=d)),a.appendChild(d),""!=o&&(u[o]=s)}}var w +h.settings.lockOptgroupOrder&&p.sort(((e,t)=>e.order-t.order)),l=document.createDocumentFragment(),E(p,(e=>{let t=e.fragment,i=e.optgroup +if(!t||!t.children.length)return +let s=h.optgroups[i] +if(void 0!==s){let e=document.createDocumentFragment(),i=h.render("optgroup_header",s) +le(e,i),le(e,t) +let n=h.render("optgroup",{group:s,options:e}) +le(l,n)}else le(l,t)})),O.innerHTML="",le(O,l),h.settings.highlight&&(w=O.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(e){var t=e.parentNode +t.replaceChild(e.firstChild,e),t.normalize()})),v.query.length&&v.tokens.length&&E(v.tokens,(e=>{U(O,e.regex)}))) +var _=e=>{let t=h.render(e,{input:g}) +return t&&(y=!0,O.insertBefore(t,O.firstChild)),t} +if(h.loading?_("loading"):h.settings.shouldLoad.call(h,g)?0===v.items.length&&_("no_results"):_("not_loading"),(a=h.canCreate(g))&&(d=_("option_create")),h.hasOptions=v.items.length>0||a,y){if(v.items.length>0){if(m||"single"!==h.settings.mode||null==h.items[0]||(m=h.getOption(h.items[0])),!O.contains(m)){let e=0 +d&&!h.settings.addPrecedence&&(e=1),m=h.selectable()[e]}}else d&&(m=d) +e&&!h.isOpen&&(h.open(),h.scrollToOption(m,"auto")),h.setActiveOption(m)}else h.clearActiveOption(),e&&h.isOpen&&h.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const i=this +if(Array.isArray(e))return i.addOptions(e,t),!1 +const s=X(e[i.settings.valueField]) +return null!==s&&!i.options.hasOwnProperty(s)&&(e.$order=e.$order||++i.order,e.$id=i.inputId+"-opt-"+e.$order,i.options[s]=e,i.lastQuery=null,t&&(i.userOptions[s]=t,i.trigger("option_add",s,e)),s)}addOptions(e,t=!1){E(e,(e=>{this.addOption(e,t)}))}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=X(e[this.settings.optgroupValueField]) +return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var i +t[this.settings.optgroupValueField]=e,(i=this.registerOptionGroup(t))&&this.trigger("optgroup_add",i,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const i=this +var s,n +const o=X(e),r=X(t[i.settings.valueField]) +if(null===o)return +const l=i.options[o] +if(null==l)return +if("string"!=typeof r)throw new Error("Value must be set in option data") +const a=i.getOption(o),c=i.getItem(o) +if(t.$order=t.$order||l.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=t,a){if(i.dropdown_content.contains(a)){const e=i._render("option",t) +G(a,e),i.activeOption===a&&i.setActiveOption(e)}a.remove()}c&&(-1!==(n=i.items.indexOf(o))&&i.items.splice(n,1,r),s=i._render("item",t),c.classList.contains("active")&&D(s,"active"),G(c,s)),i.lastQuery=null}removeOption(e,t){const i=this +e=Y(e),i.uncacheValue(e),delete i.userOptions[e],delete i.options[e],i.lastQuery=null,i.trigger("option_remove",e),i.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this) +this.loadedSearches={},this.userOptions={},this.clearCache() +const i={} +E(this.options,((e,s)=>{t(e,s)&&(i[s]=e)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const i=X(e) +if(null===i)return null +const s=this.options[i] +if(null!=s){if(s.$div)return s.$div +if(t)return this._render("option",s)}return null}getAdjacent(e,t,i="option"){var s +if(!e)return null +s="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]") +for(let i=0;i0?s[i+1]:s[i-1] +return null}getItem(e){if("object"==typeof e)return e +var t=X(e) +return null!==t?this.control.querySelector(`[data-value="${re(t)}"]`):null}addItems(e,t){var i=this,s=Array.isArray(e)?e:[e] +const n=(s=s.filter((e=>-1===i.items.indexOf(e))))[s.length-1] +s.forEach((e=>{i.isPending=e!==n,i.addItem(e,t)}))}addItem(e,t){te(this,t?[]:["change","dropdown_close"],(()=>{var i,s +const n=this,o=n.settings.mode,r=X(e) +if((!r||-1===n.items.indexOf(r)||("single"===o&&n.close(),"single"!==o&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===o&&n.clear(t),"multi"!==o||!n.isFull())){if(i=n._render("item",n.options[r]),n.control.contains(i)&&(i=i.cloneNode(!0)),s=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(i),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let e=n.getOption(r),t=n.getAdjacent(e,1) +t&&n.setActiveOption(t)}n.isPending||n.settings.closeAfterSelect||n.refreshOptions(n.isFocused&&"single"!==o),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,i),n.isPending||n.updateOriginalInput({silent:t})}(!n.isPending||!s&&n.isFull())&&(n.inputState(),n.refreshState())}}))}removeItem(e=null,t){const i=this +if(!(e=i.getItem(e)))return +var s,n +const o=e.dataset.value +s=K(e),e.remove(),e.classList.contains("active")&&(n=i.activeItems.indexOf(e),i.activeItems.splice(n,1),R(e,"active")),i.items.splice(s,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,t),s{})){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{}) +var i,s=this,n=s.caretPos +if(e=e||s.inputValue(),!s.canCreate(e))return t(),!1 +s.lock() +var o=!1,r=e=>{if(s.unlock(),!e||"object"!=typeof e)return t() +var i=X(e[s.settings.valueField]) +if("string"!=typeof i)return t() +s.setTextboxValue(),s.addOption(e,!0),s.setCaret(n),s.addItem(i),t(e),o=!0} +return i="function"==typeof s.settings.create?s.settings.create.call(this,e,r):{[s.settings.labelField]:e,[s.settings.valueField]:e},o||r(i),!0}refreshItems(){var e=this +e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this +e.refreshValidityState() +const t=e.isFull(),i=e.isLocked +e.wrapper.classList.toggle("rtl",e.rtl) +const s=e.wrapper.classList +var n +s.toggle("focus",e.isFocused),s.toggle("disabled",e.isDisabled),s.toggle("readonly",e.isReadOnly),s.toggle("required",e.isRequired),s.toggle("invalid",!e.isValid),s.toggle("locked",i),s.toggle("full",t),s.toggle("input-active",e.isFocused&&!e.isInputHidden),s.toggle("dropdown-active",e.isOpen),s.toggle("has-options",(n=e.options,0===Object.keys(n).length)),s.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this +e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this +var i,s +const n=t.input.querySelector('option[value=""]') +if(t.is_select_tag){const o=[],r=t.input.querySelectorAll("option:checked").length +function l(e,i,s){return e||(e=j('")),e!=n&&t.input.append(e),o.push(e),(e!=n||r>0)&&(e.selected=!0),e}t.input.querySelectorAll("option:checked").forEach((e=>{e.selected=!1})),0==t.items.length&&"single"==t.settings.mode?l(n,"",""):t.items.forEach((e=>{if(i=t.options[e],s=i[t.settings.labelField]||"",o.includes(i.$option)){l(t.input.querySelector(`option[value="${re(e)}"]:not(:checked)`),e,s)}else i.$option=l(i.$option,e,s)}))}else t.input.value=t.getValue() +t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this +e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,Q(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),q(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),q(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,i=t.isOpen +e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,Q(t.focus_node,{"aria-expanded":"false"}),q(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),i&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),i=e.offsetHeight+t.top+window.scrollY,s=t.left+window.scrollX +q(this.dropdown,{width:t.width+"px",top:i+"px",left:s+"px"})}}clear(e){var t=this +if(t.items.length){var i=t.controlChildren() +E(i,(e=>{t.removeItem(e,!0)})),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,i=t.caretPos,s=t.control +s.insertBefore(e,s.children[i]||null),t.setCaret(i+1)}deleteSelection(e){var t,i,s,n,o,r=this +t=e&&8===e.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)} +const l=[] +if(r.activeItems.length)n=B(r.activeItems,t),s=K(n),t>0&&s++,E(r.activeItems,(e=>l.push(e))) +else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren() +let s +t<0&&0===i.start&&0===i.length?s=e[r.caretPos-1]:t>0&&i.start===r.inputValue().length&&(s=e[r.caretPos]),void 0!==s&&l.push(s)}if(!r.shouldDelete(l,e))return!1 +for(ie(e,!0),void 0!==s&&r.setCaret(s);l.length;)r.removeItem(l.pop()) +return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(e,t){const i=e.map((e=>e.dataset.value)) +return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,t))}advanceSelection(e,t){var i,s,n=this +n.rtl&&(e*=-1),n.inputValue().length||(ne(J,t)||ne("shiftKey",t)?(s=(i=n.getLastActive(e))?i.classList.contains("active")?n.getAdjacent(i,e,"item"):i:e>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(s.classList.contains("active")&&n.removeActiveItem(i),n.setActiveItemClass(s)):n.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active") +if(t)return t +var i=this.control.querySelectorAll(".active") +return i?B(i,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings +e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,R(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var i,s +const n=this +if("function"!=typeof this.settings.render[e])return null +if(!(s=n.settings.render[e].call(this,t,Z)))return null +if(s=j(s),"option"===e||"option_create"===e?t[n.settings.disabledField]?Q(s,{"aria-disabled":"true"}):Q(s,{"data-selectable":""}):"optgroup"===e&&(i=t.group[n.settings.optgroupValueField],Q(s,{"data-group":i}),t.group[n.settings.disabledField]&&Q(s,{"data-disabled":""})),"option"===e||"item"===e){const i=Y(t[n.settings.valueField]) +Q(s,{"data-value":i}),"item"===e?(D(s,n.settings.itemClass),Q(s,{"data-ts-item":""})):(D(s,n.settings.optionClass),Q(s,{role:"option",id:t.$id}),t.$div=s,n.options[i]=t)}return s}_render(e,t){const i=this.render(e,t) +if(null==i)throw"HTMLElement expected" +return i}clearCache(){E(this.options,(e=>{e.$div&&(e.$div.remove(),delete e.$div)}))}uncacheValue(e){const t=this.getOption(e) +t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,i){var s=this,n=s[t] +s[t]=function(){var t,o +return"after"===e&&(t=n.apply(s,arguments)),o=i.apply(s,arguments),"instead"===e?o:("before"===e&&(t=n.apply(s,arguments)),t)}}}return de.define("change_listener",(function(){se(this.input,"change",(()=>{this.sync()}))})),de.define("checkbox_options",(function(e){var t=this,i=t.onOptionSelect +t.settings.hideSelected=!1 +const s=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e) +var n=function(e,t){t?(e.checked=!0,s.uncheckedClassNames&&e.classList.remove(...s.uncheckedClassNames),s.checkedClassNames&&e.classList.add(...s.checkedClassNames)):(e.checked=!1,s.checkedClassNames&&e.classList.remove(...s.checkedClassNames),s.uncheckedClassNames&&e.classList.add(...s.uncheckedClassNames))},o=function(e){setTimeout((()=>{var t=e.querySelector("input."+s.className) +t instanceof HTMLInputElement&&n(t,e.classList.contains("selected"))}),1)} +t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option +t.settings.render.option=(i,o)=>{var r=j(e.call(t,i,o)),l=document.createElement("input") +s.className&&l.classList.add(s.className),l.addEventListener("click",(function(e){ie(e)})),l.type="checkbox" +const a=X(i[t.settings.valueField]) +return n(l,!!(a&&t.items.indexOf(a)>-1)),r.prepend(l),r}})),t.on("item_remove",(e=>{var i=t.getOption(e) +i&&(i.classList.remove("selected"),o(i))})),t.on("item_add",(e=>{var i=t.getOption(e) +i&&o(i)})),t.hook("instead","onOptionSelect",((e,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),t.removeItem(s.dataset.value),t.refreshOptions(),void ie(e,!0) +i.call(t,e,s),o(s)}))})),de.define("clear_button",(function(e){const t=this,i=Object.assign({className:"clear-button",title:"Clear All",html:e=>`
    `},e) +t.on("initialize",(()=>{var e=j(i.html(i)) +e.addEventListener("click",(e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation())})),t.control.appendChild(e)}))})),de.define("drag_drop",(function(){var e=this +if("multi"!==e.settings.mode)return +var t=e.lock,i=e.unlock +let s,n=!0 +e.hook("after","setupTemplates",(()=>{var t=e.settings.render.item +e.settings.render.item=(i,o)=>{const r=j(t.call(e,i,o)) +Q(r,{draggable:"true"}) +const l=e=>{e.preventDefault(),r.classList.add("ts-drag-over"),a(r,s)},a=(e,t)=>{var i,s,n +void 0!==t&&(((e,t)=>{do{var i +if(e==(t=null==(i=t)?void 0:i.previousElementSibling))return!0}while(t&&t.previousElementSibling) +return!1})(t,r)?(s=t,null==(n=(i=e).parentNode)||n.insertBefore(s,i.nextSibling)):((e,t)=>{var i +null==(i=e.parentNode)||i.insertBefore(t,e)})(e,t))} +return se(r,"mousedown",(e=>{n||ie(e),e.stopPropagation()})),se(r,"dragstart",(e=>{s=r,setTimeout((()=>{r.classList.add("ts-dragging")}),0)})),se(r,"dragenter",l),se(r,"dragover",l),se(r,"dragleave",(()=>{r.classList.remove("ts-drag-over")})),se(r,"dragend",(()=>{var t +document.querySelectorAll(".ts-drag-over").forEach((e=>e.classList.remove("ts-drag-over"))),null==(t=s)||t.classList.remove("ts-dragging"),s=void 0 +var i=[] +e.control.querySelectorAll("[data-value]").forEach((e=>{if(e.dataset.value){let t=e.dataset.value +t&&i.push(t)}})),e.setValue(i)})),r}})),e.hook("instead","lock",(()=>(n=!1,t.call(e)))),e.hook("instead","unlock",(()=>(n=!0,i.call(e))))})),de.define("dropdown_header",(function(e){const t=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'
    '+e.title+'×
    '},e) +t.on("initialize",(()=>{var e=j(i.html(i)),s=e.querySelector("."+i.closeClass) +s&&s.addEventListener("click",(e=>{ie(e,!0),t.close()})),t.dropdown.insertBefore(e,t.dropdown.firstChild)}))})),de.define("caret_position",(function(){var e=this +e.hook("instead","setCaret",(t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach(((i,s)=>{s{if(!e.isFocused)return +const i=e.getLastActive(t) +if(i){const s=K(i) +e.setCaret(t>0?s+1:s),e.setActiveItem(),R(i,"last-active")}else e.setCaret(e.caretPos+t)}))})),de.define("dropdown_input",(function(){const e=this +e.settings.shouldOpen=!0,e.hook("before","setup",(()=>{e.focus_node=e.control,D(e.control_input,"dropdown-input") +const t=j('