diff --git a/.codecov.yml b/.codecov.yml index a74ec4583..7a1c01f63 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -6,15 +6,8 @@ coverage: patch: default: target: 90% - -comment: - layout: "reach, diff, flags, files" - behavior: new - require_changes: false - require_base: no - require_head: yes - branches: - - "!master" + +comment: false ignore: - "game/tests/*.py" diff --git a/.github/workflows/publish-python-package.yml b/.github/workflows/publish-python-package.yml index f98425f03..5a2e958e8 100644 --- a/.github/workflows/publish-python-package.yml +++ b/.github/workflows/publish-python-package.yml @@ -27,26 +27,29 @@ jobs: pipenv install --dev --system pip install -U git+https://github.com/ocadotechnology/codeforlife-portal.git#egg=codeforlife-portal #TODO: Remove as part of #688 sudo apt-get install gettext - - name: Prepare files for Crowdin - run: | - mkdir -p game/locale - cd game && django-admin makemessages -l en_GB --no-wrap && cd - - cd game && django-admin makemessages -l en_GB --no-wrap -d djangojs --ignore "static/game/js/foundation/*" && cd - # some files from foundation use '_' for their own purpose - - name: Run Crowdin (Upload sources and download translations) - uses: crowdin/github-action@1.0.13 - with: - upload_sources: true - download_translations: true - push_translations: false - project_id: ${{ secrets.CROWDIN_PROJECT_ID }} - token: ${{ secrets.CROWDIN_API_KEY }} - - name: Fix translation files owner - run: sudo chown -R $USER game/locale - - name: Compile messages - run: | - pushd game - django-admin compilemessages - popd + #TODO: Bring back these steps once we've finished setting up the CFL bot +# - name: Prepare files for Crowdin +# run: | +# mkdir -p game/locale +# cd game && django-admin makemessages -l en_GB --no-wrap && cd - +# cd game && django-admin makemessages -l en_GB --no-wrap -d djangojs --ignore "static/game/js/foundation/*" && cd - # some files from foundation use '_' for their own purpose +# - name: Run Crowdin (Upload sources and download translations) +# uses: crowdin/github-action@v1 +# with: +# upload_sources: true +# download_translations: true +# push_translations: false +# project_id: ${{ secrets.CROWDIN_PROJECT_ID }} +# token: ${{ secrets.CROWDIN_API_KEY }} +# env: +# GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} +# - name: Fix translation files owner +# run: sudo chown -R $USER game/locale +# - name: Compile messages +# run: | +# pushd game +# django-admin compilemessages +# popd - name: Release rapid-router uses: relekang/python-semantic-release@v7.34.6 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index d51160714..7c99bd9ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,152 @@ +## v5.15.13 (2023-11-28) + +### Fix + +* Bring back editor var ([#1542](https://github.com/ocadotechnology/rapid-router/issues/1542)) ([`d7cb10e`](https://github.com/ocadotechnology/rapid-router/commit/d7cb10eb0a5d2aad03f3999e6a9635177ed4b0b8)) + +## v5.15.12 (2023-11-28) + +### Fix + +* Buttons in level editor popup ([#1539](https://github.com/ocadotechnology/rapid-router/issues/1539)) ([`4ceb8a7`](https://github.com/ocadotechnology/rapid-router/commit/4ceb8a7a27aa57bcc25b9cd884a587623b9b71b6)) + +## v5.15.11 (2023-11-22) + +### Fix + +* Upgrade Django to 3.2.23 again (CI/CD measuring) ([#1532](https://github.com/ocadotechnology/rapid-router/issues/1532)) ([`b7380dd`](https://github.com/ocadotechnology/rapid-router/commit/b7380dd510fd1a8003154237a9bf11a31869cd33)) + +## v5.15.10 (2023-11-21) + +### Fix + +* Update Django to 3.2.23 (CI/CD measuring) ([#1530](https://github.com/ocadotechnology/rapid-router/issues/1530)) ([`a89a97d`](https://github.com/ocadotechnology/rapid-router/commit/a89a97dc3a9997ec70c3d740677db1ef1fb8f460)) + +## v5.15.9 (2023-11-21) + +### Fix + +* Revert Django to 3.2.22 (CI/CD measuring) ([#1527](https://github.com/ocadotechnology/rapid-router/issues/1527)) ([`3dea756`](https://github.com/ocadotechnology/rapid-router/commit/3dea7565b15c54c91d07040e5725a5548252c105)) + +## v5.15.8 (2023-11-20) + +### Fix + +* Level 36 solution ([#1526](https://github.com/ocadotechnology/rapid-router/issues/1526)) ([`d8b0f81`](https://github.com/ocadotechnology/rapid-router/commit/d8b0f81b429313d974be0dff20cf5705a661817f)) + +## v5.15.7 (2023-11-17) + +### Fix + +* Level 36 message ([#1525](https://github.com/ocadotechnology/rapid-router/issues/1525)) ([`70fe5b5`](https://github.com/ocadotechnology/rapid-router/commit/70fe5b5951366ee818eabd96dd19408317b0f16a)) + +## v5.15.6 (2023-11-17) + +### Fix + +* Compile cow block properly ([#1524](https://github.com/ocadotechnology/rapid-router/issues/1524)) ([`902d65e`](https://github.com/ocadotechnology/rapid-router/commit/902d65ef7fe606d1105a6b666aa31256e1eed019)) + +## v5.15.5 (2023-11-03) + +### Fix + +* Typo in description of 109 ([#1517](https://github.com/ocadotechnology/rapid-router/issues/1517)) ([`9f3a5e1`](https://github.com/ocadotechnology/rapid-router/commit/9f3a5e1143ac413b13907f9e252265911ef1d9eb)) + +## v5.15.4 (2023-11-03) + +### Fix + +* Set game width and height to 100% ([#1516](https://github.com/ocadotechnology/rapid-router/issues/1516)) ([`a003670`](https://github.com/ocadotechnology/rapid-router/commit/a003670da092f15f15dcbbaf32057f78ba0982bf)) + +## v5.15.3 (2023-11-03) + +### Fix + +* While loop final checks ([#1513](https://github.com/ocadotechnology/rapid-router/issues/1513)) ([`fa5b02a`](https://github.com/ocadotechnology/rapid-router/commit/fa5b02a767bde4e1836f828613e568cef01ced58)) + +### Documentation + +* Contributing and license ([#1512](https://github.com/ocadotechnology/rapid-router/issues/1512)) ([`a314fbc`](https://github.com/ocadotechnology/rapid-router/commit/a314fbc14dd4020ab936e889e1a2dbc0ab85c987)) + +## v5.15.2 (2023-11-03) + +### Fix + +* Upgrade Datatables to 1.13.6 ([#1511](https://github.com/ocadotechnology/rapid-router/issues/1511)) ([`e4b5353`](https://github.com/ocadotechnology/rapid-router/commit/e4b5353acb59c2e5f93e6295c9cc6ad6e62bc93b)) + +## v5.15.1 (2023-11-03) + +### Fix + +* **deps:** Bump django from 3.2.20 to 3.2.23 ([#1510](https://github.com/ocadotechnology/rapid-router/issues/1510)) ([`ab96e2c`](https://github.com/ocadotechnology/rapid-router/commit/ab96e2cddca1bdf6f96263eae311dcc5b298ee95)) + +## v5.15.0 (2023-11-01) + +### Feature + +* Create levels 110-122 ([#1509](https://github.com/ocadotechnology/rapid-router/issues/1509)) ([`8b8d572`](https://github.com/ocadotechnology/rapid-router/commit/8b8d5725552e390a426f58ceee7d4883d561c55e)) + +## v5.14.1 (2023-10-31) + +### Fix + +* Exclude coming soon levels ([#1508](https://github.com/ocadotechnology/rapid-router/issues/1508)) ([`d60a615`](https://github.com/ocadotechnology/rapid-router/commit/d60a6155daccf55f62415c4c10555e181e34294d)) + +## v5.14.0 (2023-10-30) + +### Feature + +* Loop level links ([#1507](https://github.com/ocadotechnology/rapid-router/issues/1507)) ([`f2dd9ed`](https://github.com/ocadotechnology/rapid-router/commit/f2dd9ed3555219876fa48a324313da0739d6fd41)) + +## v5.13.0 (2023-10-30) + +### Feature + +* Add variables, maths and comparison blocks ([#1270](https://github.com/ocadotechnology/rapid-router/issues/1270)) ([`4d424eb`](https://github.com/ocadotechnology/rapid-router/commit/4d424eb105a2d454b0f5b0490d1d4597cc40d795)) + +## v5.12.3 (2023-10-17) + +### Fix + +* Update level 47 title ([#1501](https://github.com/ocadotechnology/rapid-router/issues/1501)) ([`aea6c46`](https://github.com/ocadotechnology/rapid-router/commit/aea6c460a5d34f02368bab7e0912c1052a9f7a57)) + +## v5.12.2 (2023-10-17) + +### Fix + +* Add space in level 39 hint ([#1500](https://github.com/ocadotechnology/rapid-router/issues/1500)) ([`d31a41a`](https://github.com/ocadotechnology/rapid-router/commit/d31a41a33cde09b921704a4529d08834f0a7836c)) + +## v5.12.1 (2023-10-17) + +### Fix + +* Update level 39 hint ([#1499](https://github.com/ocadotechnology/rapid-router/issues/1499)) ([`b8a4e1f`](https://github.com/ocadotechnology/rapid-router/commit/b8a4e1f2a68fc988e7215417b789bbc190ea147c)) + +## v5.12.0 (2023-10-16) + +### Feature + +* Add cows to existing levels ([#1492](https://github.com/ocadotechnology/rapid-router/issues/1492)) ([`a57c0b3`](https://github.com/ocadotechnology/rapid-router/commit/a57c0b38eba666abd393c4b5d3a4196b37a756d6)) + +## v5.11.3 (2023-08-31) + +### Fix + +* **level_editor:** Highlight selected road piece ([#1475](https://github.com/ocadotechnology/rapid-router/issues/1475)) ([`cdc9f85`](https://github.com/ocadotechnology/rapid-router/commit/cdc9f855e1482ceb24f79772bb61c9fde1602a35)) + +## v5.11.2 (2023-08-31) + +### Fix + +* Comment out Crowdin actiosn temporarily ([`ec4167b`](https://github.com/ocadotechnology/rapid-router/commit/ec4167b39c40482dcc1e03e827574fe358438a52)) +* Add only Github token to Crowdin action ([`de3e36c`](https://github.com/ocadotechnology/rapid-router/commit/de3e36ce84511f345cc683bc48a6febdf9132c1b)) +* Try updating Crowdin action ([`adb264f`](https://github.com/ocadotechnology/rapid-router/commit/adb264fbbabab159d061376c0cbc2234054c78ae)) +* Format (bump version) ([`1f80a8f`](https://github.com/ocadotechnology/rapid-router/commit/1f80a8f2168e3d37ab5279ac27e00db55ea9c54a)) +* **messages:** Improve the readability of the description of the levels ([#1474](https://github.com/ocadotechnology/rapid-router/issues/1474)) ([`f40daa5`](https://github.com/ocadotechnology/rapid-router/commit/f40daa5339facaec1d785fc8648815de412aea46)) + ## v5.11.1 (2023-07-06) ### Fix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 96224f534..47fb07038 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,3 @@ -Please review our contributing documentation at https://docs.codeforlife.education/. +# Contributing + +Find our contribution agreement [here](https://github.com/ocadotechnology/codeforlife-workspace/blob/main/CONTRIBUTING.md). diff --git a/LICENSE.md b/LICENSE.md index eefb22c9c..3146e1509 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,577 +1,3 @@ -# GNU AFFERO GENERAL PUBLIC LICENSE +# 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 Version - -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. - -## ADDITIONAL TERMS – Section 7 GNU General Public Licence - -This licence does not grant any right, title or interest in any “Ocado” logos, trade names or the trademark “Ocado” or -any other trademarks or domain names owned by Ocado Innovation Limited or the Ocado group of companies or any other -distinctive brand features of “Ocado” as may be secured from time to time. You must not distribute any modification of -this program using the trademark “Ocado” or claim any affiliation or association with Ocado or its employees. - -You are not authorised to use the name Ocado (or any of its trade names) or the names of any author or contributor in -advertising or for publicity purposes pertaining to the distribution of this program, without the prior written -authorisation of Ocado. - -Any propagation, distribution or conveyance of this program must include this copyright notice and these terms. You must -not misrepresent the origins of this program; modified versions of the program must be marked as such and not -identified as the original program. - -# END OF TERMS AND CONDITIONS - ---- - -# CONTRIBUTOR AGREEMENT - -Thank you for Your interest in contributing to the Code for Life project (the “**Project**”) managed by Ocado Technology -(“**Ocado**”, “**We**” or “**Us**”). Please read the following terms carefully. By contributing to the Code for Life -project on this website You are agreeing to the following terms. - -**1. DEFINITIONS** - -1.1. “**Agreement**” means this contributor agreement. - -1.2. “**You**” or “**Your**” means the individual who Submits a Contribution to Us. - -1.3. “**Code**” means the computer software code, whether in human-readable or machine-executable form, that is -Submitted by You. - -1.4. “**Contribution**” means the Code and any other work of authorship that is Submitted by You to Us in which You own -or assert ownership of the copyright. - -1.5. “**Submit**” means the act of uploading, submitting, transmitting, or distributing code or other content to the -Project. - -**2. GRANT OF RIGHTS** - -**2.1. Copyright License** - -2.1.1. To the maximum extent permitted by applicable law, You grant to Us, and those who receive the Contribution -directly or indirectly from Us, a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license -to use, reproduce, modify, display, prepare derivative works of, perform, distribute and commercialise the Contribution, -with the right to sub-license, and permit sub-licensees to sub-license, the same. - -2.1.2. Each party reserves all rights not expressly granted in this Agreement. No additional licenses or rights are -granted by implication, exhaustion, estoppel or otherwise. - -2.1.3. You retain ownership of the copyright in Your Contribution. This Agreement does not affect any rights You have to -use or license Your Contribution as You see fit. - -**2.2. Patent License** - -You grant us, and those who receive the Contribution directly or indirectly from Us, a perpetual, worldwide, -non-exclusive, transferable, royalty-free, irrevocable patent license under Your patent claims (but only to the extent -that the exercise of the licensed rights infringes such patent claims) to make, have made, use, sell, offer for sale, -import and otherwise transfer or dispose of the Contribution, alone or with the Project, with the right to sub-license, -and permit sub-licensees to sub-license, the same. - -**2.3. No right to use trademarks** - -2.3.1. Neither this Agreement nor your Contribution to the Project grants You any right, title or interest in any -“Ocado” logos, trade names or the trademark “Ocado” or any other trademarks or domain names owned by Ocado Innovation -Limited or the Ocado group of companies or any other distinctive brand features of “Ocado” as may be secured from time -to time. - -2.3.2. You must not distribute any modification of this Project using the trademark “Ocado”. - -**3. USE IN THE PROJECT** - -3.1. You acknowledge that We are not obliged to use Your Contribution as part of the Project. We may decide to include -any Contribution (in whole or in part) that We consider appropriate in Our sole discretion. - -3.2. You acknowledge and agree that Contributions to the Project may be maintained in perpetuity and publicly disclosed. -This may include Your name and other information that You Submit. - -**4. ACKNOWLEDGEMENTS** - -4.1. Unless You are a current employee or contractor of Ocado or any member of its group, You must not claim any -affiliation or association with Ocado or its employees, other than as set out in this clause 4. E.g. making a -Contribution to the Project does not grant You the right to claim that You have worked for or are employed by Ocado or -any member of its group. - -4.2. If You wish to disclose publicly that You have contributed to the Project (e.g. on a website, on social media, in a -curriculum vitae, in interviews etc.) You agree that You will not do this unless You have received confirmation from Us -that we have used Your Contribution in the Project. - -**5. REPRESENTATIONS** - -5.1. You confirm that: - -5.1.1. You have the legal authority to enter into this Agreement. - -5.1.2. You are legally entitled to grant the licences in clause 2 and the grant of these licences will not infringe any -third party rights. - -5.1.3. If You are under eighteen years of age, You have Your parent(s)’ or guardian(s)’ permission to Contribute to the -Project and enter into this Agreement. - -5.1.4. If Your Contribution is made in the course of Your employment (or any other working relationship) or Your -employer (or anyone else for whom you are working) has intellectual property rights in Your Contribution, You have -secured permission from Your employer to make the Contribution on the terms of this Agreement. - -5.1.5. Each of Your Contributions is entirely Your original work. - -5.1.6. You will not Submit Contributions that contain Code or other material, the use of which is restricted by a -licence or by some other means, which: - -5.1.6.1. is incompatible with the licence grants in clause 2 of this Agreement; or - -5.1.6.2. would result in Us being unable to freely use that part of Your Contribution in the Project and/or onward -license it under the GNU Affero General Public License Version 3, 19 November 2007. - -5.2. Unless required by applicable law and except for the warranties in clause 5.1, Your Contribution is provided -“as is” and without express or implied warranty of any kind, including any warranty of merchantability, fitness for a -particular purpose and non-infringement. - -**6. MISCELLANEOUS** - -6.1. This Agreement and any non-contractual obligations arising out of or in connection with it shall be governed by and -construed in accordance with English law and the parties submit to the irrevocable jurisdiction of the English courts. - -6.2. This Agreement is the entire agreement between You and Us, and supersedes any and all prior agreements, -understandings or communications, written or oral, between You and Us relating to its subject matter. This Agreement may -be assigned by Us. +Find our license [here](https://github.com/ocadotechnology/codeforlife-workspace/blob/main/LICENSE.md). diff --git a/Pipfile b/Pipfile index 598b9927a..004ee60ef 100644 --- a/Pipfile +++ b/Pipfile @@ -9,9 +9,9 @@ ipython = "*" django-import-export = "*" [dev-packages] -django-selenium-clean = "==0.3.3" +django-selenium-clean = "==1.0.0" django-test-migrations = "==1.2.0" -selenium = "==3.141.0" +selenium = "==4.9.0" pytest-django = "==4.5.2" pytest = "==7.*" pytest-xdist = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 9329fd9a2..04f7f27f6 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "a6ac19f0ef77b80e4612cbc13f85cad19e8bcf7701da8d3946c44b8ac9b05ce4" + "sha256": "f226d4b94222f73959f2d2a2ca01b487d4d58f7f188553141389208e98bce1ca" }, "pipfile-spec": 6, "requires": { @@ -26,10 +26,10 @@ }, "asttokens": { "hashes": [ - "sha256:4622110b2a6f30b77e1473affaa97e711bc2f07d3f10848420ff1898edbe94f3", - "sha256:6b0ac9e93fb0335014d382b8fa9b3afa7df546984258005da0b9e7095b3deb1c" + "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24", + "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0" ], - "version": "==2.2.1" + "version": "==2.4.1" }, "backcall": { "hashes": [ @@ -38,12 +38,116 @@ ], "version": "==0.2.0" }, + "certifi": { + "hashes": [ + "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1", + "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474" + ], + "markers": "python_version >= '3.6'", + "version": "==2023.11.17" + }, "cfl-common": { "hashes": [ - "sha256:3c1fd2c8fc592422157c65ac8f841a62a3b0385cf0c3a0dd236d5510d1ac2ee4", - "sha256:fddf085f84f55cdba95997d8eae47d075d3bf08f54a286f19c43b0bb0b219f10" + "sha256:e11d1431329e91a1aeaec15c6df654a9fb8bf9c44a929ef394278515f9ff5936", + "sha256:f4ef1456a2a9507b0e93751596c05e8333a2feb3267d3b8cd8f88fceb88cc982" ], - "version": "==6.33.6" + "version": "==6.39.7" + }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" }, "decorator": { "hashes": [ @@ -71,11 +175,11 @@ }, "django": { "hashes": [ - "sha256:a477ab326ae7d8807dc25c186b951ab8c7648a3a23f9497763c37307a2b5ef87", - "sha256:dec2a116787b8e14962014bf78e120bba454135108e1af9e9b91ade7b2964c40" + "sha256:82968f3640e29ef4a773af2c28448f5f7a08d001c6ac05b32d02aeee6509508b", + "sha256:d48608d5f62f2c1e260986835db089fa3b79d6f58510881d316b8d88345ae6e1" ], "markers": "python_version >= '3.6'", - "version": "==3.2.20" + "version": "==3.2.23" }, "django-countries": { "hashes": [ @@ -101,11 +205,11 @@ }, "django-import-export": { "hashes": [ - "sha256:1d3f2cb2ee3cca0386ed60651fa1623be989f130d9fbdf98a67f7dc3a94b8a37", - "sha256:38fd7b9439b9e3aa1a4747421c1087a5bc194e915a28d795fb8429a5f8028f2d" + "sha256:2c1b16e1cf2ea5f62a165d8867e7c6dcff25673ab7201fd18aaf67c9ee90367e", + "sha256:78973202e93897326ab0411d64eaf89b72779fcb21ee9e5f64f3fb96571a5978" ], "index": "pypi", - "version": "==3.2.0" + "version": "==3.3.3" }, "django-js-reverse": { "hashes": [ @@ -116,11 +220,11 @@ }, "django-otp": { "hashes": [ - "sha256:007a6354dabb3a1a54574bf73abf045ebbde0bb8734a38e2ed7845ba450f345e", - "sha256:90765d5dac238a719f9550ac05681dd6307f513a81a10b6adb879b4abc6bc1a3" + "sha256:5277731bc05b6cdbf96aa84ac46018e30ed5fb248086053b0146f925de059060", + "sha256:8f4156a3c14ce2aaa31379385eadf388925cd50fc4b5d20a3b944f454c98ff7c" ], "markers": "python_version >= '3.7'", - "version": "==1.2.2" + "version": "==1.3.0" }, "django-phonenumber-field": { "hashes": [ @@ -162,26 +266,35 @@ }, "executing": { "hashes": [ - "sha256:0314a69e37426e3608aada02473b4161d4caf5a4b244d1d0c48072b8fee7bacc", - "sha256:19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107" + "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147", + "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc" ], - "version": "==1.2.0" + "markers": "python_version >= '3.5'", + "version": "==2.0.1" + }, + "idna": { + "hashes": [ + "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", + "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" + ], + "markers": "python_version >= '3.5'", + "version": "==3.4" }, "ipython": { "hashes": [ - "sha256:c7b80eb7f5a855a88efc971fda506ff7a91c280b42cdae26643e0f601ea281ea", - "sha256:ea8801f15dfe4ffb76dea1b09b847430ffd70d827b41735c64a0638a04103bfc" + "sha256:3910c4b54543c2ad73d06579aa771041b7d5707b033bd488669b4cf544e3b363", + "sha256:b0340d46a933d27c657b211a329d0be23793c36595acf9e6ef4164bc01a1804c" ], "index": "pypi", - "version": "==8.12.2" + "version": "==8.12.3" }, "jedi": { "hashes": [ - "sha256:203c1fd9d969ab8f2119ec0a3342e0b49910045abe6af0a3ae83a5764d54639e", - "sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612" + "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd", + "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0" ], "markers": "python_version >= '3.6'", - "version": "==0.18.2" + "version": "==0.19.1" }, "libsass": { "hashes": [ @@ -216,6 +329,40 @@ "markers": "python_version >= '3.5'", "version": "==8.7.0" }, + "numpy": { + "hashes": [ + "sha256:04640dab83f7c6c85abf9cd729c5b65f1ebd0ccf9de90b270cd61935eef0197f", + "sha256:1452241c290f3e2a312c137a9999cdbf63f78864d63c79039bda65ee86943f61", + "sha256:222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7", + "sha256:2541312fbf09977f3b3ad449c4e5f4bb55d0dbf79226d7724211acc905049400", + "sha256:31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef", + "sha256:4602244f345453db537be5314d3983dbf5834a9701b7723ec28923e2889e0bb2", + "sha256:4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d", + "sha256:4c21decb6ea94057331e111a5bed9a79d335658c27ce2adb580fb4d54f2ad9bc", + "sha256:6620c0acd41dbcb368610bb2f4d83145674040025e5536954782467100aa8835", + "sha256:692f2e0f55794943c5bfff12b3f56f99af76f902fc47487bdfe97856de51a706", + "sha256:7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5", + "sha256:79fc682a374c4a8ed08b331bef9c5f582585d1048fa6d80bc6c35bc384eee9b4", + "sha256:7ffe43c74893dbf38c2b0a1f5428760a1a9c98285553c89e12d70a96a7f3a4d6", + "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463", + "sha256:95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a", + "sha256:9667575fb6d13c95f1b36aca12c5ee3356bf001b714fc354eb5465ce1609e62f", + "sha256:a5425b114831d1e77e4b5d812b69d11d962e104095a5b9c3b641a218abcc050e", + "sha256:b4bea75e47d9586d31e892a7401f76e909712a0fd510f58f5337bea9572c571e", + "sha256:b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694", + "sha256:befe2bf740fd8373cf56149a5c23a0f601e82869598d41f8e188a0e9869926f8", + "sha256:c0bfb52d2169d58c1cdb8cc1f16989101639b34c7d3ce60ed70b19c63eba0b64", + "sha256:d11efb4dbecbdf22508d55e48d9c8384db795e1b7b51ea735289ff96613ff74d", + "sha256:dd80e219fd4c71fc3699fc1dadac5dcf4fd882bfc6f7ec53d30fa197b8ee22dc", + "sha256:e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254", + "sha256:e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2", + "sha256:ed094d4f0c177b1b8e7aa9cba7d6ceed51c0e569a5318ac0ca9a090680a6a1b1", + "sha256:f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810", + "sha256:f3a86ed21e4f87050382c7bc96571755193c4c1392490744ac73d660e8f564a9" + ], + "markers": "python_version >= '3.8'", + "version": "==1.24.4" + }, "odfpy": { "hashes": [ "sha256:db766a6e59c5103212f3cc92ec8dd50a0f3a02790233ed0b52148b70d3c438ec", @@ -230,6 +377,37 @@ ], "version": "==3.1.2" }, + "pandas": { + "hashes": [ + "sha256:04dbdbaf2e4d46ca8da896e1805bc04eb85caa9a82e259e8eed00254d5e0c682", + "sha256:1168574b036cd8b93abc746171c9b4f1b83467438a5e45909fed645cf8692dbc", + "sha256:1994c789bf12a7c5098277fb43836ce090f1073858c10f9220998ac74f37c69b", + "sha256:258d3624b3ae734490e4d63c430256e716f488c4fcb7c8e9bde2d3aa46c29089", + "sha256:32fca2ee1b0d93dd71d979726b12b61faa06aeb93cf77468776287f41ff8fdc5", + "sha256:37673e3bdf1551b95bf5d4ce372b37770f9529743d2498032439371fc7b7eb26", + "sha256:3ef285093b4fe5058eefd756100a367f27029913760773c8bf1d2d8bebe5d210", + "sha256:5247fb1ba347c1261cbbf0fcfba4a3121fbb4029d95d9ef4dc45406620b25c8b", + "sha256:5ec591c48e29226bcbb316e0c1e9423622bc7a4eaf1ef7c3c9fa1a3981f89641", + "sha256:694888a81198786f0e164ee3a581df7d505024fbb1f15202fc7db88a71d84ebd", + "sha256:69d7f3884c95da3a31ef82b7618af5710dba95bb885ffab339aad925c3e8ce78", + "sha256:6a21ab5c89dcbd57f78d0ae16630b090eec626360085a4148693def5452d8a6b", + "sha256:81af086f4543c9d8bb128328b5d32e9986e0c84d3ee673a2ac6fb57fd14f755e", + "sha256:9e4da0d45e7f34c069fe4d522359df7d23badf83abc1d1cef398895822d11061", + "sha256:9eae3dc34fa1aa7772dd3fc60270d13ced7346fcbcfee017d3132ec625e23bb0", + "sha256:9ee1a69328d5c36c98d8e74db06f4ad518a1840e8ccb94a4ba86920986bb617e", + "sha256:b084b91d8d66ab19f5bb3256cbd5ea661848338301940e17f4492b2ce0801fe8", + "sha256:b9cb1e14fdb546396b7e1b923ffaeeac24e4cedd14266c3497216dd4448e4f2d", + "sha256:ba619e410a21d8c387a1ea6e8a0e49bb42216474436245718d7f2e88a2f8d7c0", + "sha256:c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c", + "sha256:ce0c6f76a0f1ba361551f3e6dceaff06bde7514a374aa43e33b588ec10420183", + "sha256:d9cd88488cceb7635aebb84809d087468eb33551097d600c6dad13602029c2df", + "sha256:e4c7c9f27a4185304c7caf96dc7d91bc60bc162221152de697c98eb0b2648dd8", + "sha256:f167beed68918d62bffb6ec64f2e1d8a7d297a038f86d4aed056b9493fca407f", + "sha256:f3421a7afb1a43f7e38e82e844e2bca9a6d793d66c1a7f9f0ff39a795bbc5e02" + ], + "markers": "python_version >= '3.8'", + "version": "==2.0.3" + }, "parso": { "hashes": [ "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0", @@ -246,6 +424,14 @@ "markers": "sys_platform != 'win32'", "version": "==4.8.0" }, + "pgeocode": { + "hashes": [ + "sha256:07995d4cd2d7fec1f82afb14d6025e83bbc156b6f225fa3e0b3417da2ec020c8", + "sha256:60fc2bad60aa161c3cf46ace4fde607b77e016b1e2a25470534163305499e55e" + ], + "markers": "python_version >= '3.8'", + "version": "==0.4.0" + }, "pickleshare": { "hashes": [ "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", @@ -255,11 +441,11 @@ }, "prompt-toolkit": { "hashes": [ - "sha256:04505ade687dc26dc4284b1ad19a83be2f2afe83e7a828ace0c72f3a1df72aac", - "sha256:9dffbe1d8acf91e3de75f3b544e4842382fc06c6babe903ac9acb74dc6e08d88" + "sha256:941367d97fc815548822aa26c2a269fdc4eb21e9ec05fc5d447cf09bad5d75f0", + "sha256:f36fe301fafb7470e86aaf90f036eef600a3210be4decf461a5b1ca8403d3cb2" ], - "markers": "python_version >= '3.7'", - "version": "==3.0.39" + "markers": "python_full_version >= '3.7.0'", + "version": "==3.0.41" }, "ptyprocess": { "hashes": [ @@ -277,11 +463,11 @@ }, "pygments": { "hashes": [ - "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c", - "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1" + "sha256:1b37f1b1e1bff2af52ecaf28cc601e2ef7077000b227a0675da25aef85784bc4", + "sha256:e45a0e74bf9c530f564ca81b8952343be986a29f6afe7f5ad95c5f06b7bdf5e8" ], "markers": "python_version >= '3.7'", - "version": "==2.15.1" + "version": "==2.17.1" }, "pyhamcrest": { "hashes": [ @@ -306,16 +492,26 @@ ], "version": "==0.20220715.0" }, + "python-dateutil": { + "hashes": [ + "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", + "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.8.2" + }, "pytz": { "hashes": [ - "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588", - "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb" + "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b", + "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7" ], - "version": "==2023.3" + "version": "==2023.3.post1" }, "pyyaml": { "hashes": [ + "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5", "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", + "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df", "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", @@ -323,7 +519,10 @@ "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", + "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290", + "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9", "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", + "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6", "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", @@ -331,9 +530,12 @@ "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", + "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0", "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", + "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28", + "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4", "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", @@ -348,7 +550,9 @@ "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", + "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54", "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", + "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b", "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", @@ -370,16 +574,20 @@ "editable": true, "path": "." }, - "sanitized-package": { - "editable": true, - "path": "." + "requests": { + "hashes": [ + "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", + "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + ], + "markers": "python_version >= '3.7'", + "version": "==2.31.0" }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "sqlparse": { @@ -392,10 +600,10 @@ }, "stack-data": { "hashes": [ - "sha256:32d2dd0376772d01b6cb9fc996f3c8b57a357089dec328ed4b6553d037eaf815", - "sha256:cbb2a53eb64e5785878201a97ed7c7b94883f48b87bfb0bbe8b623c74679e4a8" + "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", + "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695" ], - "version": "==0.6.2" + "version": "==0.6.3" }, "tablib": { "extras": [ @@ -414,26 +622,42 @@ }, "traitlets": { "hashes": [ - "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8", - "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9" + "sha256:9b232b9430c8f57288c1024b34a8f0251ddcc47268927367a0dd3eeaca40deb5", + "sha256:baf991e61542da48fe8aef8b779a9ea0aa38d8a54166ee250d5af5ecf4486619" ], - "markers": "python_version >= '3.7'", - "version": "==5.9.0" + "markers": "python_version >= '3.8'", + "version": "==5.13.0" }, "typing-extensions": { "hashes": [ - "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36", - "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2" + "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0", + "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef" + ], + "markers": "python_version >= '3.8'", + "version": "==4.8.0" + }, + "tzdata": { + "hashes": [ + "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a", + "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda" + ], + "markers": "python_version >= '2'", + "version": "==2023.3" + }, + "urllib3": { + "hashes": [ + "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3", + "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54" ], - "markers": "python_version < '3.10'", - "version": "==4.7.1" + "markers": "python_version >= '3.8'", + "version": "==2.1.0" }, "wcwidth": { "hashes": [ - "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e", - "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0" + "sha256:25eb3ecbec328cdb945f56f2a7cfe784bdf7a73a8197398c7a7c65e7fe93e9ae", + "sha256:c4b153acf29f1f0d7fb1b00d097cce82b73de7a2016321c8d7ca71bd76dd848b" ], - "version": "==0.2.6" + "version": "==0.2.11" }, "xlrd": { "hashes": [ @@ -453,10 +677,10 @@ "develop": { "aimmo": { "hashes": [ - "sha256:42d01d0f5a0bfd9acf79242726e3e86d5643d6309188dd5951eabd79d5722401", - "sha256:c15924ca5719ae61f11ee8240eb40a63a1a18167f29bab45646f20f241fe7155" + "sha256:1c4e9ea558c083b8f59b365d1f1dfd6d94e8aee863ea96dcaeec488fd72541f8", + "sha256:4c8d20c738e4a4443ca98e03621b96c5c79309f4f817faf3aaf731380c621d8a" ], - "version": "==2.9.0" + "version": "==2.10.12" }, "asgiref": { "hashes": [ @@ -476,115 +700,130 @@ }, "cachetools": { "hashes": [ - "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590", - "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b" + "sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2", + "sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1" ], "markers": "python_version >= '3.7'", - "version": "==5.3.1" + "version": "==5.3.2" }, "certifi": { "hashes": [ - "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082", - "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9" + "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1", + "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474" ], - "index": "pypi", - "version": "==2023.7.22" + "markers": "python_version >= '3.6'", + "version": "==2023.11.17" }, "cfl-common": { "hashes": [ - "sha256:3c1fd2c8fc592422157c65ac8f841a62a3b0385cf0c3a0dd236d5510d1ac2ee4", - "sha256:fddf085f84f55cdba95997d8eae47d075d3bf08f54a286f19c43b0bb0b219f10" + "sha256:e11d1431329e91a1aeaec15c6df654a9fb8bf9c44a929ef394278515f9ff5936", + "sha256:f4ef1456a2a9507b0e93751596c05e8333a2feb3267d3b8cd8f88fceb88cc982" ], - "version": "==6.33.6" + "version": "==6.39.7" }, "charset-normalizer": { "hashes": [ - "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96", - "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c", - "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710", - "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706", - "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020", - "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252", - "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad", - "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329", - "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a", - "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f", - "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6", - "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4", - "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a", - "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46", - "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2", - "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23", - "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace", - "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd", - "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982", - "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10", - "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2", - "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea", - "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09", - "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5", - "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149", - "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489", - "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9", - "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80", - "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592", - "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3", - "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6", - "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed", - "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c", - "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200", - "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a", - "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e", - "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d", - "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6", - "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623", - "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669", - "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3", - "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa", - "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9", - "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2", - "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f", - "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1", - "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4", - "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a", - "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8", - "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3", - "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029", - "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f", - "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959", - "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22", - "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7", - "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952", - "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346", - "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e", - "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d", - "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299", - "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd", - "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a", - "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3", - "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037", - "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94", - "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c", - "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858", - "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a", - "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449", - "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c", - "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918", - "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1", - "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c", - "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac", - "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa" - ], - "markers": "python_version >= '3.7'", - "version": "==3.2.0" + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" }, "codeforlife-portal": { "hashes": [ - "sha256:573ecafed323ca66069414dd34bd7b3cd488dde45c1f61b48fca1e4f8f001d80", - "sha256:75b486c505e87bee8727c447a0c326000ba3e82f8c05eb2efb0087e44ae11398" + "sha256:5f7b96a80ef71353011a72e0e98a6a01e36e0efd1441d096faa9a545917e38b1", + "sha256:df7b8c297d694c7b414b4d65616f7f402032db621f43f6e5a5b217209bfd17c6" ], "index": "pypi", - "version": "==6.31.2" + "version": "==6.39.7" }, "defusedxml": { "hashes": [ @@ -604,11 +843,11 @@ }, "django": { "hashes": [ - "sha256:a477ab326ae7d8807dc25c186b951ab8c7648a3a23f9497763c37307a2b5ef87", - "sha256:dec2a116787b8e14962014bf78e120bba454135108e1af9e9b91ade7b2964c40" + "sha256:82968f3640e29ef4a773af2c28448f5f7a08d001c6ac05b32d02aeee6509508b", + "sha256:d48608d5f62f2c1e260986835db089fa3b79d6f58510881d316b8d88345ae6e1" ], "markers": "python_version >= '3.6'", - "version": "==3.2.20" + "version": "==3.2.23" }, "django-classy-tags": { "hashes": [ @@ -641,11 +880,11 @@ }, "django-import-export": { "hashes": [ - "sha256:1d3f2cb2ee3cca0386ed60651fa1623be989f130d9fbdf98a67f7dc3a94b8a37", - "sha256:38fd7b9439b9e3aa1a4747421c1087a5bc194e915a28d795fb8429a5f8028f2d" + "sha256:2c1b16e1cf2ea5f62a165d8867e7c6dcff25673ab7201fd18aaf67c9ee90367e", + "sha256:78973202e93897326ab0411d64eaf89b72779fcb21ee9e5f64f3fb96571a5978" ], "index": "pypi", - "version": "==3.2.0" + "version": "==3.3.3" }, "django-js-reverse": { "hashes": [ @@ -656,11 +895,11 @@ }, "django-otp": { "hashes": [ - "sha256:007a6354dabb3a1a54574bf73abf045ebbde0bb8734a38e2ed7845ba450f345e", - "sha256:90765d5dac238a719f9550ac05681dd6307f513a81a10b6adb879b4abc6bc1a3" + "sha256:5277731bc05b6cdbf96aa84ac46018e30ed5fb248086053b0146f925de059060", + "sha256:8f4156a3c14ce2aaa31379385eadf388925cd50fc4b5d20a3b944f454c98ff7c" ], "markers": "python_version >= '3.7'", - "version": "==1.2.2" + "version": "==1.3.0" }, "django-phonenumber-field": { "hashes": [ @@ -706,11 +945,11 @@ }, "django-selenium-clean": { "hashes": [ - "sha256:19c2ef55558e7d57dd7fda690f0e6830b461098c564d736f93be37dcbfb42560", - "sha256:98c20ee83c4554397ff3ef226bebd0d8962891303162b9f874687490474d88e9" + "sha256:35982f7af664f578b6db48053ade5e4260f96c13d778308b992007a548d1fc26", + "sha256:a31b71a92934399597c1fa84401892987524d95168f48ea4212812f6f05d1eaa" ], "index": "pypi", - "version": "==0.3.3" + "version": "==1.0.0" }, "django-test-migrations": { "hashes": [ @@ -766,11 +1005,11 @@ }, "exceptiongroup": { "hashes": [ - "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5", - "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f" + "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", + "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68" ], "markers": "python_version < '3.11'", - "version": "==1.1.2" + "version": "==1.2.0" }, "execnet": { "hashes": [ @@ -782,77 +1021,82 @@ }, "google-auth": { "hashes": [ - "sha256:164cba9af4e6e4e40c3a4f90a1a6c12ee56f14c0b4868d1ca91b32826ab334ce", - "sha256:d61d1b40897407b574da67da1a833bdc10d5a11642566e506565d1b1a46ba873" + "sha256:79905d6b1652187def79d491d6e23d0cbb3a21d3c7ba0dbaa9c8a01906b13ff3", + "sha256:d4bbc92fe4b8bfd2f3e8d88e5ba7085935da208ee38a134fc280e7ce682a05f2" ], - "markers": "python_version >= '3.6'", - "version": "==2.22.0" + "markers": "python_version >= '3.7'", + "version": "==2.23.4" }, "greenlet": { "hashes": [ - "sha256:03a8f4f3430c3b3ff8d10a2a86028c660355ab637cee9333d63d66b56f09d52a", - "sha256:0bf60faf0bc2468089bdc5edd10555bab6e85152191df713e2ab1fcc86382b5a", - "sha256:18a7f18b82b52ee85322d7a7874e676f34ab319b9f8cce5de06067384aa8ff43", - "sha256:18e98fb3de7dba1c0a852731c3070cf022d14f0d68b4c87a19cc1016f3bb8b33", - "sha256:1a819eef4b0e0b96bb0d98d797bef17dc1b4a10e8d7446be32d1da33e095dbb8", - "sha256:26fbfce90728d82bc9e6c38ea4d038cba20b7faf8a0ca53a9c07b67318d46088", - "sha256:2780572ec463d44c1d3ae850239508dbeb9fed38e294c68d19a24d925d9223ca", - "sha256:283737e0da3f08bd637b5ad058507e578dd462db259f7f6e4c5c365ba4ee9343", - "sha256:2d4686f195e32d36b4d7cf2d166857dbd0ee9f3d20ae349b6bf8afc8485b3645", - "sha256:2dd11f291565a81d71dab10b7033395b7a3a5456e637cf997a6f33ebdf06f8db", - "sha256:30bcf80dda7f15ac77ba5af2b961bdd9dbc77fd4ac6105cee85b0d0a5fcf74df", - "sha256:32e5b64b148966d9cccc2c8d35a671409e45f195864560829f395a54226408d3", - "sha256:36abbf031e1c0f79dd5d596bfaf8e921c41df2bdf54ee1eed921ce1f52999a86", - "sha256:3a06ad5312349fec0ab944664b01d26f8d1f05009566339ac6f63f56589bc1a2", - "sha256:3a51c9751078733d88e013587b108f1b7a1fb106d402fb390740f002b6f6551a", - "sha256:3c9b12575734155d0c09d6c3e10dbd81665d5c18e1a7c6597df72fd05990c8cf", - "sha256:3f6ea9bd35eb450837a3d80e77b517ea5bc56b4647f5502cd28de13675ee12f7", - "sha256:4b58adb399c4d61d912c4c331984d60eb66565175cdf4a34792cd9600f21b394", - "sha256:4d2e11331fc0c02b6e84b0d28ece3a36e0548ee1a1ce9ddde03752d9b79bba40", - "sha256:5454276c07d27a740c5892f4907c86327b632127dd9abec42ee62e12427ff7e3", - "sha256:561091a7be172ab497a3527602d467e2b3fbe75f9e783d8b8ce403fa414f71a6", - "sha256:6c3acb79b0bfd4fe733dff8bc62695283b57949ebcca05ae5c129eb606ff2d74", - "sha256:703f18f3fda276b9a916f0934d2fb6d989bf0b4fb5a64825260eb9bfd52d78f0", - "sha256:7492e2b7bd7c9b9916388d9df23fa49d9b88ac0640db0a5b4ecc2b653bf451e3", - "sha256:76ae285c8104046b3a7f06b42f29c7b73f77683df18c49ab5af7983994c2dd91", - "sha256:7cafd1208fdbe93b67c7086876f061f660cfddc44f404279c1585bbf3cdc64c5", - "sha256:7efde645ca1cc441d6dc4b48c0f7101e8d86b54c8530141b09fd31cef5149ec9", - "sha256:88d9ab96491d38a5ab7c56dd7a3cc37d83336ecc564e4e8816dbed12e5aaefc8", - "sha256:8eab883b3b2a38cc1e050819ef06a7e6344d4a990d24d45bc6f2cf959045a45b", - "sha256:910841381caba4f744a44bf81bfd573c94e10b3045ee00de0cbf436fe50673a6", - "sha256:9190f09060ea4debddd24665d6804b995a9c122ef5917ab26e1566dcc712ceeb", - "sha256:937e9020b514ceedb9c830c55d5c9872abc90f4b5862f89c0887033ae33c6f73", - "sha256:94c817e84245513926588caf1152e3b559ff794d505555211ca041f032abbb6b", - "sha256:971ce5e14dc5e73715755d0ca2975ac88cfdaefcaab078a284fea6cfabf866df", - "sha256:9d14b83fab60d5e8abe587d51c75b252bcc21683f24699ada8fb275d7712f5a9", - "sha256:9f35ec95538f50292f6d8f2c9c9f8a3c6540bbfec21c9e5b4b751e0a7c20864f", - "sha256:a1846f1b999e78e13837c93c778dcfc3365902cfb8d1bdb7dd73ead37059f0d0", - "sha256:acd2162a36d3de67ee896c43effcd5ee3de247eb00354db411feb025aa319857", - "sha256:b0ef99cdbe2b682b9ccbb964743a6aca37905fda5e0452e5ee239b1654d37f2a", - "sha256:b80f600eddddce72320dbbc8e3784d16bd3fb7b517e82476d8da921f27d4b249", - "sha256:b864ba53912b6c3ab6bcb2beb19f19edd01a6bfcbdfe1f37ddd1778abfe75a30", - "sha256:b9ec052b06a0524f0e35bd8790686a1da006bd911dd1ef7d50b77bfbad74e292", - "sha256:ba2956617f1c42598a308a84c6cf021a90ff3862eddafd20c3333d50f0edb45b", - "sha256:bdfea8c661e80d3c1c99ad7c3ff74e6e87184895bbaca6ee8cc61209f8b9b85d", - "sha256:be4ed120b52ae4d974aa40215fcdfde9194d63541c7ded40ee12eb4dda57b76b", - "sha256:c4302695ad8027363e96311df24ee28978162cdcdd2006476c43970b384a244c", - "sha256:c48f54ef8e05f04d6eff74b8233f6063cb1ed960243eacc474ee73a2ea8573ca", - "sha256:c9c59a2120b55788e800d82dfa99b9e156ff8f2227f07c5e3012a45a399620b7", - "sha256:cd021c754b162c0fb55ad5d6b9d960db667faad0fa2ff25bb6e1301b0b6e6a75", - "sha256:d27ec7509b9c18b6d73f2f5ede2622441de812e7b1a80bbd446cb0633bd3d5ae", - "sha256:d5508f0b173e6aa47273bdc0a0b5ba055b59662ba7c7ee5119528f466585526b", - "sha256:d75209eed723105f9596807495d58d10b3470fa6732dd6756595e89925ce2470", - "sha256:db1a39669102a1d8d12b57de2bb7e2ec9066a6f2b3da35ae511ff93b01b5d564", - "sha256:dbfcfc0218093a19c252ca8eb9aee3d29cfdcb586df21049b9d777fd32c14fd9", - "sha256:e0f72c9ddb8cd28532185f54cc1453f2c16fb417a08b53a855c4e6a418edd099", - "sha256:e7c8dc13af7db097bed64a051d2dd49e9f0af495c26995c00a9ee842690d34c0", - "sha256:ea9872c80c132f4663822dd2a08d404073a5a9b5ba6155bea72fb2a79d1093b5", - "sha256:eff4eb9b7eb3e4d0cae3d28c283dc16d9bed6b193c2e1ace3ed86ce48ea8df19", - "sha256:f82d4d717d8ef19188687aa32b8363e96062911e63ba22a0cff7802a8e58e5f1", - "sha256:fc3a569657468b6f3fb60587e48356fe512c1754ca05a564f11366ac9e306526" + "sha256:0a02d259510b3630f330c86557331a3b0e0c79dac3d166e449a39363beaae174", + "sha256:0b6f9f8ca7093fd4433472fd99b5650f8a26dcd8ba410e14094c1e44cd3ceddd", + "sha256:100f78a29707ca1525ea47388cec8a049405147719f47ebf3895e7509c6446aa", + "sha256:1757936efea16e3f03db20efd0cd50a1c86b06734f9f7338a90c4ba85ec2ad5a", + "sha256:19075157a10055759066854a973b3d1325d964d498a805bb68a1f9af4aaef8ec", + "sha256:19bbdf1cce0346ef7341705d71e2ecf6f41a35c311137f29b8a2dc2341374565", + "sha256:20107edf7c2c3644c67c12205dc60b1bb11d26b2610b276f97d666110d1b511d", + "sha256:22f79120a24aeeae2b4471c711dcf4f8c736a2bb2fabad2a67ac9a55ea72523c", + "sha256:2847e5d7beedb8d614186962c3d774d40d3374d580d2cbdab7f184580a39d234", + "sha256:28e89e232c7593d33cac35425b58950789962011cc274aa43ef8865f2e11f46d", + "sha256:329c5a2e5a0ee942f2992c5e3ff40be03e75f745f48847f118a3cfece7a28546", + "sha256:337322096d92808f76ad26061a8f5fccb22b0809bea39212cd6c406f6a7060d2", + "sha256:3fcc780ae8edbb1d050d920ab44790201f027d59fdbd21362340a85c79066a74", + "sha256:41bdeeb552d814bcd7fb52172b304898a35818107cc8778b5101423c9017b3de", + "sha256:4eddd98afc726f8aee1948858aed9e6feeb1758889dfd869072d4465973f6bfd", + "sha256:52e93b28db27ae7d208748f45d2db8a7b6a380e0d703f099c949d0f0d80b70e9", + "sha256:55d62807f1c5a1682075c62436702aaba941daa316e9161e4b6ccebbbf38bda3", + "sha256:5805e71e5b570d490938d55552f5a9e10f477c19400c38bf1d5190d760691846", + "sha256:599daf06ea59bfedbec564b1692b0166a0045f32b6f0933b0dd4df59a854caf2", + "sha256:60d5772e8195f4e9ebf74046a9121bbb90090f6550f81d8956a05387ba139353", + "sha256:696d8e7d82398e810f2b3622b24e87906763b6ebfd90e361e88eb85b0e554dc8", + "sha256:6e6061bf1e9565c29002e3c601cf68569c450be7fc3f7336671af7ddb4657166", + "sha256:80ac992f25d10aaebe1ee15df45ca0d7571d0f70b645c08ec68733fb7a020206", + "sha256:816bd9488a94cba78d93e1abb58000e8266fa9cc2aa9ccdd6eb0696acb24005b", + "sha256:85d2b77e7c9382f004b41d9c72c85537fac834fb141b0296942d52bf03fe4a3d", + "sha256:87c8ceb0cf8a5a51b8008b643844b7f4a8264a2c13fcbcd8a8316161725383fe", + "sha256:89ee2e967bd7ff85d84a2de09df10e021c9b38c7d91dead95b406ed6350c6997", + "sha256:8bef097455dea90ffe855286926ae02d8faa335ed8e4067326257cb571fc1445", + "sha256:8d11ebbd679e927593978aa44c10fc2092bc454b7d13fdc958d3e9d508aba7d0", + "sha256:91e6c7db42638dc45cf2e13c73be16bf83179f7859b07cfc139518941320be96", + "sha256:97e7ac860d64e2dcba5c5944cfc8fa9ea185cd84061c623536154d5a89237884", + "sha256:990066bff27c4fcf3b69382b86f4c99b3652bab2a7e685d968cd4d0cfc6f67c6", + "sha256:9fbc5b8f3dfe24784cee8ce0be3da2d8a79e46a276593db6868382d9c50d97b1", + "sha256:ac4a39d1abae48184d420aa8e5e63efd1b75c8444dd95daa3e03f6c6310e9619", + "sha256:b2c02d2ad98116e914d4f3155ffc905fd0c025d901ead3f6ed07385e19122c94", + "sha256:b2d3337dcfaa99698aa2377c81c9ca72fcd89c07e7eb62ece3f23a3fe89b2ce4", + "sha256:b489c36d1327868d207002391f662a1d163bdc8daf10ab2e5f6e41b9b96de3b1", + "sha256:b641161c302efbb860ae6b081f406839a8b7d5573f20a455539823802c655f63", + "sha256:b8ba29306c5de7717b5761b9ea74f9c72b9e2b834e24aa984da99cbfc70157fd", + "sha256:b9934adbd0f6e476f0ecff3c94626529f344f57b38c9a541f87098710b18af0a", + "sha256:ce85c43ae54845272f6f9cd8320d034d7a946e9773c693b27d620edec825e376", + "sha256:cf868e08690cb89360eebc73ba4be7fb461cfbc6168dd88e2fbbe6f31812cd57", + "sha256:d2905ce1df400360463c772b55d8e2518d0e488a87cdea13dd2c71dcb2a1fa16", + "sha256:d57e20ba591727da0c230ab2c3f200ac9d6d333860d85348816e1dca4cc4792e", + "sha256:d6a8c9d4f8692917a3dc7eb25a6fb337bff86909febe2f793ec1928cd97bedfc", + "sha256:d923ff276f1c1f9680d32832f8d6c040fe9306cbfb5d161b0911e9634be9ef0a", + "sha256:daa7197b43c707462f06d2c693ffdbb5991cbb8b80b5b984007de431493a319c", + "sha256:dbd4c177afb8a8d9ba348d925b0b67246147af806f0b104af4d24f144d461cd5", + "sha256:dc4d815b794fd8868c4d67602692c21bf5293a75e4b607bb92a11e821e2b859a", + "sha256:e9d21aaa84557d64209af04ff48e0ad5e28c5cca67ce43444e939579d085da72", + "sha256:ea6b8aa9e08eea388c5f7a276fabb1d4b6b9d6e4ceb12cc477c3d352001768a9", + "sha256:eabe7090db68c981fca689299c2d116400b553f4b713266b130cfc9e2aa9c5a9", + "sha256:f2f6d303f3dee132b322a14cd8765287b8f86cdc10d2cb6a6fae234ea488888e", + "sha256:f33f3258aae89da191c6ebaa3bc517c6c4cbc9b9f689e5d8452f7aedbb913fa8", + "sha256:f7bfb769f7efa0eefcd039dd19d843a4fbfbac52f1878b1da2ed5793ec9b1a65", + "sha256:f89e21afe925fcfa655965ca8ea10f24773a1791400989ff32f467badfe4a064", + "sha256:fa24255ae3c0ab67e613556375a4341af04a084bd58764731972bcbc8baeba36" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==2.0.2" + "markers": "python_version >= '3.7'", + "version": "==3.0.1" + }, + "h11": { + "hashes": [ + "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d", + "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761" + ], + "markers": "python_version >= '3.7'", + "version": "==0.14.0" }, "hypothesis": { "hashes": [ @@ -919,6 +1163,40 @@ "markers": "python_version >= '3.5'", "version": "==8.7.0" }, + "numpy": { + "hashes": [ + "sha256:04640dab83f7c6c85abf9cd729c5b65f1ebd0ccf9de90b270cd61935eef0197f", + "sha256:1452241c290f3e2a312c137a9999cdbf63f78864d63c79039bda65ee86943f61", + "sha256:222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7", + "sha256:2541312fbf09977f3b3ad449c4e5f4bb55d0dbf79226d7724211acc905049400", + "sha256:31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef", + "sha256:4602244f345453db537be5314d3983dbf5834a9701b7723ec28923e2889e0bb2", + "sha256:4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d", + "sha256:4c21decb6ea94057331e111a5bed9a79d335658c27ce2adb580fb4d54f2ad9bc", + "sha256:6620c0acd41dbcb368610bb2f4d83145674040025e5536954782467100aa8835", + "sha256:692f2e0f55794943c5bfff12b3f56f99af76f902fc47487bdfe97856de51a706", + "sha256:7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5", + "sha256:79fc682a374c4a8ed08b331bef9c5f582585d1048fa6d80bc6c35bc384eee9b4", + "sha256:7ffe43c74893dbf38c2b0a1f5428760a1a9c98285553c89e12d70a96a7f3a4d6", + "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463", + "sha256:95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a", + "sha256:9667575fb6d13c95f1b36aca12c5ee3356bf001b714fc354eb5465ce1609e62f", + "sha256:a5425b114831d1e77e4b5d812b69d11d962e104095a5b9c3b641a218abcc050e", + "sha256:b4bea75e47d9586d31e892a7401f76e909712a0fd510f58f5337bea9572c571e", + "sha256:b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694", + "sha256:befe2bf740fd8373cf56149a5c23a0f601e82869598d41f8e188a0e9869926f8", + "sha256:c0bfb52d2169d58c1cdb8cc1f16989101639b34c7d3ce60ed70b19c63eba0b64", + "sha256:d11efb4dbecbdf22508d55e48d9c8384db795e1b7b51ea735289ff96613ff74d", + "sha256:dd80e219fd4c71fc3699fc1dadac5dcf4fd882bfc6f7ec53d30fa197b8ee22dc", + "sha256:e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254", + "sha256:e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2", + "sha256:ed094d4f0c177b1b8e7aa9cba7d6ceed51c0e569a5318ac0ca9a090680a6a1b1", + "sha256:f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810", + "sha256:f3a86ed21e4f87050382c7bc96571755193c4c1392490744ac73d660e8f564a9" + ], + "markers": "python_version >= '3.8'", + "version": "==1.24.4" + }, "oauthlib": { "hashes": [ "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca", @@ -941,13 +1219,60 @@ ], "version": "==3.1.2" }, + "outcome": { + "hashes": [ + "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8", + "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.0.post0" + }, "packaging": { "hashes": [ - "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61", - "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f" + "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5", + "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7" ], "markers": "python_version >= '3.7'", - "version": "==23.1" + "version": "==23.2" + }, + "pandas": { + "hashes": [ + "sha256:04dbdbaf2e4d46ca8da896e1805bc04eb85caa9a82e259e8eed00254d5e0c682", + "sha256:1168574b036cd8b93abc746171c9b4f1b83467438a5e45909fed645cf8692dbc", + "sha256:1994c789bf12a7c5098277fb43836ce090f1073858c10f9220998ac74f37c69b", + "sha256:258d3624b3ae734490e4d63c430256e716f488c4fcb7c8e9bde2d3aa46c29089", + "sha256:32fca2ee1b0d93dd71d979726b12b61faa06aeb93cf77468776287f41ff8fdc5", + "sha256:37673e3bdf1551b95bf5d4ce372b37770f9529743d2498032439371fc7b7eb26", + "sha256:3ef285093b4fe5058eefd756100a367f27029913760773c8bf1d2d8bebe5d210", + "sha256:5247fb1ba347c1261cbbf0fcfba4a3121fbb4029d95d9ef4dc45406620b25c8b", + "sha256:5ec591c48e29226bcbb316e0c1e9423622bc7a4eaf1ef7c3c9fa1a3981f89641", + "sha256:694888a81198786f0e164ee3a581df7d505024fbb1f15202fc7db88a71d84ebd", + "sha256:69d7f3884c95da3a31ef82b7618af5710dba95bb885ffab339aad925c3e8ce78", + "sha256:6a21ab5c89dcbd57f78d0ae16630b090eec626360085a4148693def5452d8a6b", + "sha256:81af086f4543c9d8bb128328b5d32e9986e0c84d3ee673a2ac6fb57fd14f755e", + "sha256:9e4da0d45e7f34c069fe4d522359df7d23badf83abc1d1cef398895822d11061", + "sha256:9eae3dc34fa1aa7772dd3fc60270d13ced7346fcbcfee017d3132ec625e23bb0", + "sha256:9ee1a69328d5c36c98d8e74db06f4ad518a1840e8ccb94a4ba86920986bb617e", + "sha256:b084b91d8d66ab19f5bb3256cbd5ea661848338301940e17f4492b2ce0801fe8", + "sha256:b9cb1e14fdb546396b7e1b923ffaeeac24e4cedd14266c3497216dd4448e4f2d", + "sha256:ba619e410a21d8c387a1ea6e8a0e49bb42216474436245718d7f2e88a2f8d7c0", + "sha256:c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c", + "sha256:ce0c6f76a0f1ba361551f3e6dceaff06bde7514a374aa43e33b588ec10420183", + "sha256:d9cd88488cceb7635aebb84809d087468eb33551097d600c6dad13602029c2df", + "sha256:e4c7c9f27a4185304c7caf96dc7d91bc60bc162221152de697c98eb0b2648dd8", + "sha256:f167beed68918d62bffb6ec64f2e1d8a7d297a038f86d4aed056b9493fca407f", + "sha256:f3421a7afb1a43f7e38e82e844e2bca9a6d793d66c1a7f9f0ff39a795bbc5e02" + ], + "markers": "python_version >= '3.8'", + "version": "==2.0.3" + }, + "pgeocode": { + "hashes": [ + "sha256:07995d4cd2d7fec1f82afb14d6025e83bbc156b6f225fa3e0b3417da2ec020c8", + "sha256:60fc2bad60aa161c3cf46ace4fde607b77e016b1e2a25470534163305499e55e" + ], + "markers": "python_version >= '3.8'", + "version": "==0.4.0" }, "phonenumbers": { "hashes": [ @@ -958,81 +1283,79 @@ }, "pillow": { "hashes": [ - "sha256:00e65f5e822decd501e374b0650146063fbb30a7264b4d2744bdd7b913e0cab5", - "sha256:040586f7d37b34547153fa383f7f9aed68b738992380ac911447bb78f2abe530", - "sha256:0b6eb5502f45a60a3f411c63187db83a3d3107887ad0d036c13ce836f8a36f1d", - "sha256:1ce91b6ec08d866b14413d3f0bbdea7e24dfdc8e59f562bb77bc3fe60b6144ca", - "sha256:1f62406a884ae75fb2f818694469519fb685cc7eaff05d3451a9ebe55c646891", - "sha256:22c10cc517668d44b211717fd9775799ccec4124b9a7f7b3635fc5386e584992", - "sha256:3400aae60685b06bb96f99a21e1ada7bc7a413d5f49bce739828ecd9391bb8f7", - "sha256:349930d6e9c685c089284b013478d6f76e3a534e36ddfa912cde493f235372f3", - "sha256:368ab3dfb5f49e312231b6f27b8820c823652b7cd29cfbd34090565a015e99ba", - "sha256:38250a349b6b390ee6047a62c086d3817ac69022c127f8a5dc058c31ccef17f3", - "sha256:3a684105f7c32488f7153905a4e3015a3b6c7182e106fe3c37fbb5ef3e6994c3", - "sha256:3a82c40d706d9aa9734289740ce26460a11aeec2d9c79b7af87bb35f0073c12f", - "sha256:3b08d4cc24f471b2c8ca24ec060abf4bebc6b144cb89cba638c720546b1cf538", - "sha256:3ed64f9ca2f0a95411e88a4efbd7a29e5ce2cea36072c53dd9d26d9c76f753b3", - "sha256:3f07ea8d2f827d7d2a49ecf1639ec02d75ffd1b88dcc5b3a61bbb37a8759ad8d", - "sha256:520f2a520dc040512699f20fa1c363eed506e94248d71f85412b625026f6142c", - "sha256:5c6e3df6bdd396749bafd45314871b3d0af81ff935b2d188385e970052091017", - "sha256:608bfdee0d57cf297d32bcbb3c728dc1da0907519d1784962c5f0c68bb93e5a3", - "sha256:685ac03cc4ed5ebc15ad5c23bc555d68a87777586d970c2c3e216619a5476223", - "sha256:76de421f9c326da8f43d690110f0e79fe3ad1e54be811545d7d91898b4c8493e", - "sha256:76edb0a1fa2b4745fb0c99fb9fb98f8b180a1bbceb8be49b087e0b21867e77d3", - "sha256:7be600823e4c8631b74e4a0d38384c73f680e6105a7d3c6824fcf226c178c7e6", - "sha256:81ff539a12457809666fef6624684c008e00ff6bf455b4b89fd00a140eecd640", - "sha256:88af2003543cc40c80f6fca01411892ec52b11021b3dc22ec3bc9d5afd1c5334", - "sha256:8c11160913e3dd06c8ffdb5f233a4f254cb449f4dfc0f8f4549eda9e542c93d1", - "sha256:8f8182b523b2289f7c415f589118228d30ac8c355baa2f3194ced084dac2dbba", - "sha256:9211e7ad69d7c9401cfc0e23d49b69ca65ddd898976d660a2fa5904e3d7a9baa", - "sha256:92be919bbc9f7d09f7ae343c38f5bb21c973d2576c1d45600fce4b74bafa7ac0", - "sha256:9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396", - "sha256:9f7c16705f44e0504a3a2a14197c1f0b32a95731d251777dcb060aa83022cb2d", - "sha256:9fb218c8a12e51d7ead2a7c9e101a04982237d4855716af2e9499306728fb485", - "sha256:a74ba0c356aaa3bb8e3eb79606a87669e7ec6444be352870623025d75a14a2bf", - "sha256:b4f69b3700201b80bb82c3a97d5e9254084f6dd5fb5b16fc1a7b974260f89f43", - "sha256:bc2ec7c7b5d66b8ec9ce9f720dbb5fa4bace0f545acd34870eff4a369b44bf37", - "sha256:c189af0545965fa8d3b9613cfdb0cd37f9d71349e0f7750e1fd704648d475ed2", - "sha256:c1fbe7621c167ecaa38ad29643d77a9ce7311583761abf7836e1510c580bf3dd", - "sha256:c7cf14a27b0d6adfaebb3ae4153f1e516df54e47e42dcc073d7b3d76111a8d86", - "sha256:c9f72a021fbb792ce98306ffb0c348b3c9cb967dce0f12a49aa4c3d3fdefa967", - "sha256:cd25d2a9d2b36fcb318882481367956d2cf91329f6892fe5d385c346c0649629", - "sha256:ce543ed15570eedbb85df19b0a1a7314a9c8141a36ce089c0a894adbfccb4568", - "sha256:ce7b031a6fc11365970e6a5686d7ba8c63e4c1cf1ea143811acbb524295eabed", - "sha256:d35e3c8d9b1268cbf5d3670285feb3528f6680420eafe35cccc686b73c1e330f", - "sha256:d50b6aec14bc737742ca96e85d6d0a5f9bfbded018264b3b70ff9d8c33485551", - "sha256:d5d0dae4cfd56969d23d94dc8e89fb6a217be461c69090768227beb8ed28c0a3", - "sha256:d5db32e2a6ccbb3d34d87c87b432959e0db29755727afb37290e10f6e8e62614", - "sha256:d72e2ecc68a942e8cf9739619b7f408cc7b272b279b56b2c83c6123fcfa5cdff", - "sha256:d737a602fbd82afd892ca746392401b634e278cb65d55c4b7a8f48e9ef8d008d", - "sha256:d80cf684b541685fccdd84c485b31ce73fc5c9b5d7523bf1394ce134a60c6883", - "sha256:db24668940f82321e746773a4bc617bfac06ec831e5c88b643f91f122a785684", - "sha256:dbc02381779d412145331789b40cc7b11fdf449e5d94f6bc0b080db0a56ea3f0", - "sha256:dffe31a7f47b603318c609f378ebcd57f1554a3a6a8effbc59c3c69f804296de", - "sha256:edf4392b77bdc81f36e92d3a07a5cd072f90253197f4a52a55a8cec48a12483b", - "sha256:efe8c0681042536e0d06c11f48cebe759707c9e9abf880ee213541c5b46c5bf3", - "sha256:f31f9fdbfecb042d046f9d91270a0ba28368a723302786c0009ee9b9f1f60199", - "sha256:f88a0b92277de8e3ca715a0d79d68dc82807457dae3ab8699c758f07c20b3c51", - "sha256:faaf07ea35355b01a35cb442dd950d8f1bb5b040a7787791a535de13db15ed90" + "sha256:00f438bb841382b15d7deb9a05cc946ee0f2c352653c7aa659e75e592f6fa17d", + "sha256:0248f86b3ea061e67817c47ecbe82c23f9dd5d5226200eb9090b3873d3ca32de", + "sha256:04f6f6149f266a100374ca3cc368b67fb27c4af9f1cc8cb6306d849dcdf12616", + "sha256:062a1610e3bc258bff2328ec43f34244fcec972ee0717200cb1425214fe5b839", + "sha256:0a026c188be3b443916179f5d04548092e253beb0c3e2ee0a4e2cdad72f66099", + "sha256:0f7c276c05a9767e877a0b4c5050c8bee6a6d960d7f0c11ebda6b99746068c2a", + "sha256:1a8413794b4ad9719346cd9306118450b7b00d9a15846451549314a58ac42219", + "sha256:1ab05f3db77e98f93964697c8efc49c7954b08dd61cff526b7f2531a22410106", + "sha256:1c3ac5423c8c1da5928aa12c6e258921956757d976405e9467c5f39d1d577a4b", + "sha256:1c41d960babf951e01a49c9746f92c5a7e0d939d1652d7ba30f6b3090f27e412", + "sha256:1fafabe50a6977ac70dfe829b2d5735fd54e190ab55259ec8aea4aaea412fa0b", + "sha256:1fb29c07478e6c06a46b867e43b0bcdb241b44cc52be9bc25ce5944eed4648e7", + "sha256:24fadc71218ad2b8ffe437b54876c9382b4a29e030a05a9879f615091f42ffc2", + "sha256:2cdc65a46e74514ce742c2013cd4a2d12e8553e3a2563c64879f7c7e4d28bce7", + "sha256:2ef6721c97894a7aa77723740a09547197533146fba8355e86d6d9a4a1056b14", + "sha256:3b834f4b16173e5b92ab6566f0473bfb09f939ba14b23b8da1f54fa63e4b623f", + "sha256:3d929a19f5469b3f4df33a3df2983db070ebb2088a1e145e18facbc28cae5b27", + "sha256:41f67248d92a5e0a2076d3517d8d4b1e41a97e2df10eb8f93106c89107f38b57", + "sha256:47e5bf85b80abc03be7455c95b6d6e4896a62f6541c1f2ce77a7d2bb832af262", + "sha256:4d0152565c6aa6ebbfb1e5d8624140a440f2b99bf7afaafbdbf6430426497f28", + "sha256:50d08cd0a2ecd2a8657bd3d82c71efd5a58edb04d9308185d66c3a5a5bed9610", + "sha256:61f1a9d247317fa08a308daaa8ee7b3f760ab1809ca2da14ecc88ae4257d6172", + "sha256:6932a7652464746fcb484f7fc3618e6503d2066d853f68a4bd97193a3996e273", + "sha256:7a7e3daa202beb61821c06d2517428e8e7c1aab08943e92ec9e5755c2fc9ba5e", + "sha256:7dbaa3c7de82ef37e7708521be41db5565004258ca76945ad74a8e998c30af8d", + "sha256:7df5608bc38bd37ef585ae9c38c9cd46d7c81498f086915b0f97255ea60c2818", + "sha256:806abdd8249ba3953c33742506fe414880bad78ac25cc9a9b1c6ae97bedd573f", + "sha256:883f216eac8712b83a63f41b76ddfb7b2afab1b74abbb413c5df6680f071a6b9", + "sha256:912e3812a1dbbc834da2b32299b124b5ddcb664ed354916fd1ed6f193f0e2d01", + "sha256:937bdc5a7f5343d1c97dc98149a0be7eb9704e937fe3dc7140e229ae4fc572a7", + "sha256:9882a7451c680c12f232a422730f986a1fcd808da0fd428f08b671237237d651", + "sha256:9a92109192b360634a4489c0c756364c0c3a2992906752165ecb50544c251312", + "sha256:9d7bc666bd8c5a4225e7ac71f2f9d12466ec555e89092728ea0f5c0c2422ea80", + "sha256:a5f63b5a68daedc54c7c3464508d8c12075e56dcfbd42f8c1bf40169061ae666", + "sha256:a646e48de237d860c36e0db37ecaecaa3619e6f3e9d5319e527ccbc8151df061", + "sha256:a89b8312d51715b510a4fe9fc13686283f376cfd5abca8cd1c65e4c76e21081b", + "sha256:a92386125e9ee90381c3369f57a2a50fa9e6aa8b1cf1d9c4b200d41a7dd8e992", + "sha256:ae88931f93214777c7a3aa0a8f92a683f83ecde27f65a45f95f22d289a69e593", + "sha256:afc8eef765d948543a4775f00b7b8c079b3321d6b675dde0d02afa2ee23000b4", + "sha256:b0eb01ca85b2361b09480784a7931fc648ed8b7836f01fb9241141b968feb1db", + "sha256:b1c25762197144e211efb5f4e8ad656f36c8d214d390585d1d21281f46d556ba", + "sha256:b4005fee46ed9be0b8fb42be0c20e79411533d1fd58edabebc0dd24626882cfd", + "sha256:b920e4d028f6442bea9a75b7491c063f0b9a3972520731ed26c83e254302eb1e", + "sha256:baada14941c83079bf84c037e2d8b7506ce201e92e3d2fa0d1303507a8538212", + "sha256:bb40c011447712d2e19cc261c82655f75f32cb724788df315ed992a4d65696bb", + "sha256:c0949b55eb607898e28eaccb525ab104b2d86542a85c74baf3a6dc24002edec2", + "sha256:c9aeea7b63edb7884b031a35305629a7593272b54f429a9869a4f63a1bf04c34", + "sha256:cfe96560c6ce2f4c07d6647af2d0f3c54cc33289894ebd88cfbb3bcd5391e256", + "sha256:d27b5997bdd2eb9fb199982bb7eb6164db0426904020dc38c10203187ae2ff2f", + "sha256:d921bc90b1defa55c9917ca6b6b71430e4286fc9e44c55ead78ca1a9f9eba5f2", + "sha256:e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38", + "sha256:eaed6977fa73408b7b8a24e8b14e59e1668cfc0f4c40193ea7ced8e210adf996", + "sha256:fa1d323703cfdac2036af05191b969b910d8f115cf53093125e4058f62012c9a", + "sha256:fe1e26e1ffc38be097f0ba1d0d07fcade2bcfd1d023cda5b29935ae8052bd793" ], "markers": "python_version >= '3.8'", - "version": "==10.0.0" + "version": "==10.1.0" }, "pluggy": { "hashes": [ - "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849", - "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3" + "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12", + "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7" ], - "markers": "python_version >= '3.7'", - "version": "==1.2.0" + "markers": "python_version >= '3.8'", + "version": "==1.3.0" }, "pyasn1": { "hashes": [ - "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57", - "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde" + "sha256:4439847c58d40b1d0a573d07e3856e95333f1976294494c325775aeca506eb58", + "sha256:6d391a96e59b23130a5cfa74d6fd7f388dbbe26cc8f1edf39fdddf08d9d6676c" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==0.5.0" + "version": "==0.5.1" }, "pyasn1-modules": { "hashes": [ @@ -1065,13 +1388,21 @@ ], "version": "==0.20220715.0" }, + "pysocks": { + "hashes": [ + "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299", + "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5", + "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" + ], + "version": "==1.7.1" + }, "pytest": { "hashes": [ - "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295", - "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b" + "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac", + "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5" ], "index": "pypi", - "version": "==7.3.2" + "version": "==7.4.3" }, "pytest-django": { "hashes": [ @@ -1083,38 +1414,40 @@ }, "pytest-order": { "hashes": [ - "sha256:139d25b30826b78eebb42722f747eab14c44b88059d7a71d4f79d14a057269a5", - "sha256:3b3730969c97900fa5cd31ecff80847680ed56b2490954565c14949ba60d9371" + "sha256:944f86b6d441aa7b1da80f801c6ab65b84bbeba472d0a7a12eb43ba26650101a", + "sha256:9d65c3b6dc6d6ee984d6ae2c6c4aa4f1331e5b915116219075c888c8bcbb93b8" ], "index": "pypi", - "version": "==1.1.0" + "version": "==1.2.0" }, "pytest-xdist": { "hashes": [ - "sha256:d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93", - "sha256:ff9daa7793569e6a68544850fd3927cd257cc03a7ef76c95e86915355e82b5f2" + "sha256:cbb36f3d67e0c478baa57fa4edc8843887e0f6cfc42d677530a36d7472b32d8a", + "sha256:d075629c7e00b611df89f490a5063944bee7a4362a5ff11c7cc7824a03dfce24" ], "index": "pypi", - "version": "==3.3.1" + "version": "==3.5.0" }, "python-dateutil": { "hashes": [ "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.8.2" }, "pytz": { "hashes": [ - "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588", - "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb" + "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b", + "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7" ], - "version": "==2023.3" + "version": "==2023.3.post1" }, "pyyaml": { "hashes": [ + "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5", "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", + "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df", "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", @@ -1122,7 +1455,10 @@ "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", + "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290", + "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9", "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", + "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6", "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", @@ -1130,9 +1466,12 @@ "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", + "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0", "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", + "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28", + "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4", "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", @@ -1147,7 +1486,9 @@ "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", + "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54", "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", + "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b", "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", @@ -1217,7 +1558,7 @@ "sha256:faeebde62f0f6ad86985bec5685411260393d2eb7ba907972da56af586b644e8", "sha256:ff09a0a1e5cef05309ac09dfc5185e8151d927bcf45470d2f540c96260f8a355" ], - "markers": "python_version >= '3.7' and python_version < '4.0'", + "markers": "python_version >= '3.7' and python_version < '4'", "version": "==3.6.13" }, "requests": { @@ -1241,16 +1582,16 @@ "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7", "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" ], - "markers": "python_version >= '3.6' and python_version < '4.0'", + "markers": "python_version >= '3.6' and python_version < '4'", "version": "==4.9" }, "selenium": { "hashes": [ - "sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c", - "sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d" + "sha256:478fae77cdfaec32adb1e68d59632c8c191f920535282abcaa2d1a3d98655624", + "sha256:4c19e6aac202719373108d53a5a8e9336ba8d2b25822ca32ae6ff37acbabbdbe" ], "index": "pypi", - "version": "==3.141.0" + "version": "==4.9.0" }, "setuptools": { "hashes": [ @@ -1265,9 +1606,17 @@ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, + "sniffio": { + "hashes": [ + "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101", + "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.0" + }, "sortedcontainers": { "hashes": [ "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88", @@ -1306,29 +1655,61 @@ "markers": "python_version < '3.11'", "version": "==2.0.1" }, + "trio": { + "hashes": [ + "sha256:16f89f7dcc8f7b9dcdec1fcd863e0c039af6d0f9a22f8dfd56f75d75ec73fd48", + "sha256:bb4abb3f4af23f96679e7c8cdabb8b234520f2498550d2cf63ebfd95f2ce27fe" + ], + "markers": "python_version >= '3.8'", + "version": "==0.23.1" + }, + "trio-websocket": { + "hashes": [ + "sha256:18c11793647703c158b1f6e62de638acada927344d534e3c7628eedcb746839f", + "sha256:520d046b0d030cf970b8b2b2e00c4c2245b3807853ecd44214acd33d74581638" + ], + "markers": "python_version >= '3.7'", + "version": "==0.11.1" + }, "typing-extensions": { "hashes": [ - "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36", - "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2" + "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0", + "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef" + ], + "markers": "python_version >= '3.8'", + "version": "==4.8.0" + }, + "tzdata": { + "hashes": [ + "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a", + "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda" ], - "markers": "python_version < '3.10'", - "version": "==4.7.1" + "markers": "python_version >= '2'", + "version": "==2023.3" }, "urllib3": { "hashes": [ - "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f", - "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14" + "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3", + "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==1.26.16" + "markers": "python_version >= '3.8'", + "version": "==2.1.0" }, "websocket-client": { "hashes": [ - "sha256:c951af98631d24f8df89ab1019fc365f2227c0892f12fd150e935607c79dd0dd", - "sha256:f1f9f2ad5291f0225a49efad77abf9e700b6fef553900623060dad6e26503b9d" + "sha256:084072e0a7f5f347ef2ac3d8698a5e0b4ffbfcab607628cadabc650fc9a83a24", + "sha256:b3324019b3c28572086c4a319f91d1dcd44e6e11cd340232978c684a7650d0df" ], - "markers": "python_version >= '3.7'", - "version": "==1.6.1" + "markers": "python_version >= '3.8'", + "version": "==1.6.4" + }, + "wsproto": { + "hashes": [ + "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065", + "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==1.2.0" }, "xlrd": { "hashes": [ @@ -1346,11 +1727,11 @@ }, "zipp": { "hashes": [ - "sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0", - "sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147" + "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31", + "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0" ], "markers": "python_version >= '3.8'", - "version": "==3.16.2" + "version": "==3.17.0" } } } diff --git a/game/__init__.py b/game/__init__.py index 86d9cbd9c..386f407fb 100644 --- a/game/__init__.py +++ b/game/__init__.py @@ -1 +1 @@ -__version__ = "5.11.1" +__version__ = "5.15.13" diff --git a/game/admin.py b/game/admin.py index bf3a00d85..0d46a5253 100644 --- a/game/admin.py +++ b/game/admin.py @@ -1,10 +1,10 @@ from django.contrib import admin -from game.models import Level, Block, Episode, Workspace +from game.models import Level, Block, Episode, Workspace, LevelDecor class LevelAdmin(admin.ModelAdmin): - search_fields = ["name"] + search_fields = ["name", "id", "owner__user__username", "owner__user__first_name"] raw_id_fields = ["next_level", "locked_for_class"] readonly_fields = ["owner"] list_display = ["name", "id", "episode", "owner"] @@ -14,7 +14,13 @@ class WorkspaceAdmin(admin.ModelAdmin): raw_id_fields = ["owner"] +class LevelDecorAdmin(admin.ModelAdmin): + search_fields = ["level__name"] + list_display = ["id", "level", "x", "y", "decorName"] + + admin.site.register(Level, LevelAdmin) admin.site.register(Workspace, WorkspaceAdmin) admin.site.register(Episode) admin.site.register(Block) +admin.site.register(LevelDecor, LevelDecorAdmin) diff --git a/game/end_to_end_tests/base_game_test.py b/game/end_to_end_tests/base_game_test.py index df9264d32..e03398826 100644 --- a/game/end_to_end_tests/base_game_test.py +++ b/game/end_to_end_tests/base_game_test.py @@ -8,10 +8,9 @@ from common.tests.utils.organisation import create_organisation_directly from common.tests.utils.student import create_school_student_directly from common.tests.utils.teacher import signup_teacher_directly -from django.test import TestCase from django.urls import reverse -from portal.tests.pageObjects.portal.home_page import HomePage from portal.tests.pageObjects.portal.base_page import BasePage +from portal.tests.pageObjects.portal.home_page import HomePage from game.models import Workspace from . import custom_handler diff --git a/game/end_to_end_tests/editor_page.py b/game/end_to_end_tests/editor_page.py index 44024ad10..5aa15ca63 100644 --- a/game/end_to_end_tests/editor_page.py +++ b/game/end_to_end_tests/editor_page.py @@ -16,8 +16,8 @@ def _dismiss_initial_dialog(self): def dismiss_dialog(self, button_id): self.wait_for_element_to_be_clickable((By.ID, button_id), wait_seconds=15) - self.browser.find_element_by_id(button_id).click() + self.browser.find_element(By.ID, button_id).click() self.wait_for_element_to_be_invisible((By.ID, button_id), wait_seconds=15) def go_to_code_tab(self): - self.browser.find_element_by_id("blocks_tab").click() + self.browser.find_element(By.ID, "blocks_tab").click() diff --git a/game/end_to_end_tests/game_page.py b/game/end_to_end_tests/game_page.py index 64205b60c..87fe53934 100644 --- a/game/end_to_end_tests/game_page.py +++ b/game/end_to_end_tests/game_page.py @@ -1,7 +1,8 @@ from __future__ import print_function -from builtins import str + import os import time +from builtins import str from django.urls import reverse from hamcrest import assert_that, equal_to, contains_string, ends_with @@ -28,20 +29,20 @@ def _dismiss_initial_dialog(self): def dismiss_dialog(self, button_id): self.wait_for_element_to_be_clickable((By.ID, button_id), wait_seconds=15) - self.browser.find_element_by_id(button_id).click() + self.browser.find_element(By.ID, button_id).click() self.wait_for_element_to_be_invisible((By.ID, button_id), wait_seconds=15) def load_solution(self, workspace_id): - self.browser.find_element_by_id("load_tab").click() + self.browser.find_element(By.ID, "load_tab").click() selector = "#loadWorkspaceTable tr[value='" + str(workspace_id) + "']" self.wait_for_element_to_be_clickable((By.CSS_SELECTOR, selector)) - self.browser.find_element_by_css_selector(selector).click() - self.browser.find_element_by_id("loadWorkspace").click() + self.browser.find_element(By.CSS_SELECTOR, selector).click() + self.browser.find_element(By.ID, "loadWorkspace").click() time.sleep(1) return self def clear(self): - self.browser.find_element_by_id("clear_tab").click() + self.browser.find_element(By.ID, "clear_tab").click() return self def try_again(self): @@ -49,11 +50,11 @@ def try_again(self): return self def step(self): - self.browser.find_element_by_id("step_tab").click() + self.browser.find_element(By.ID, "step_tab").click() return self def solution_button(self): - self.browser.find_element_by_id("solution_tab").click() + self.browser.find_element(By.ID, "solution_tab").click() solution_loaded = self.browser.execute_script("return ocargo.solutionLoaded;") timeout = time.time() + 30 @@ -66,11 +67,11 @@ def solution_button(self): return self def python_commands_button(self): - self.browser.find_element_by_id("van_commands_help").click() + self.browser.find_element(By.ID, "van_commands_help").click() return self def clear_console_button(self): - self.browser.find_element_by_id("clear_console").click() + self.browser.find_element(By.ID, "clear_console").click() return self def assert_level_number(self, level_number): @@ -88,20 +89,18 @@ def assert_is_red_light(self, traffic_light_index): self._assert_light_is_on(traffic_light_index, "red") def _assert_light_is_on(self, traffic_light_index, colour): - image = self.browser.find_element_by_id( + image = self.browser.find_element(By.ID, "trafficLight_%s_%s" % (traffic_light_index, colour) ) assert_that(image.get_attribute("opacity"), equal_to("1")) def run_program(self, wait_for_element_id="modal-content"): - self.browser.find_element_by_id("fast_tab").click() + self.browser.find_element(By.ID, "fast_tab").click() try: self.wait_for_element_to_be_clickable((By.ID, wait_for_element_id), 45) except TimeoutException as e: - import time - millis = int(round(time.time() * 1000)) screenshot_filename = "/tmp/game_tests_%s-%s.png" % ( os.getenv("BUILD_NUMBER", "nonumber"), @@ -115,9 +114,9 @@ def run_program(self, wait_for_element_id="modal-content"): def run_retry_program(self): self.run_program("try_again_button") - modal_content = self.browser.find_element_by_id("modal-content").text + modal_content = self.browser.find_element(By.ID, "modal-content").text assert_that(modal_content, contains_string("Try creating a simpler program.")) - self.browser.find_element_by_id("try_again_button").click() + self.browser.find_element(By.ID, "try_again_button").click() time.sleep(1) return self @@ -173,7 +172,7 @@ def run_invalid_import_program(self): def check_python_commands(self): self.python_commands_button() time.sleep(1) - python_commands = self.browser.find_element_by_id("myModal-lead").text + python_commands = self.browser.find_element(By.ID, "myModal-lead").text assert_that( python_commands, contains_string("Run the following commands on the van object v"), @@ -182,16 +181,16 @@ def check_python_commands(self): def write_to_then_clear_console(self): self._write_code("my_van.") - self.browser.find_element_by_id("fast_tab").click() + self.browser.find_element(By.ID, "fast_tab").click() time.sleep(1) - console = self.browser.find_element_by_id("consoleOutput") + console = self.browser.find_element(By.ID, "consoleOutput") self.clear_console_button() assert_that(console.text == "") return self def next_episode(self): self.assert_success() - self.browser.find_element_by_id("next_episode_button").click() + self.browser.find_element(By.ID, "next_episode_button").click() WebDriverWait(self.browser, 10).until( presence_of_all_elements_located((By.ID, "blockly_tab")) ) @@ -199,7 +198,7 @@ def next_episode(self): def next_level(self): self.assert_success() - self.browser.find_element_by_id("next_level_button").click() + self.browser.find_element(By.ID, "next_level_button").click() WebDriverWait(self.browser, 10).until( presence_of_all_elements_located((By.ID, "blockly_tab")) ) @@ -207,23 +206,23 @@ def next_level(self): def _run_failing_program(self, text): self.run_program("try_again_button") - error_message = self.browser.find_element_by_id("myModal-lead").text + error_message = self.browser.find_element(By.ID, "myModal-lead").text assert_that(error_message, contains_string(text)) return self def _run_failing_python_program_console(self, code, console_message): self._write_code(code) - self.browser.find_element_by_id("fast_tab").click() + self.browser.find_element(By.ID, "fast_tab").click() time.sleep(1) - console = self.browser.find_element_by_id("consoleOutput") + console = self.browser.find_element(By.ID, "consoleOutput") assert_that(console.text, contains_string(console_message)) return self def _run_failing_python_program_popup(self, code, text): self._write_code(code) - self.browser.find_element_by_id("fast_tab").click() + self.browser.find_element(By.ID, "fast_tab").click() time.sleep(1) - error_message = self.browser.find_element_by_id("myModal-lead").text + error_message = self.browser.find_element(By.ID, "myModal-lead").text assert_that(error_message, contains_string(text)) return self @@ -235,17 +234,17 @@ def _write_code(self, code): def _run_procedure_error_program(self, text): self.run_program("close_button") - error_message = self.browser.find_element_by_id("myModal-mainText").text + error_message = self.browser.find_element(By.ID, "myModal-mainText").text assert_that(error_message, contains_string(text)) def _assert_score(self, element_id, score): - score_text = self.browser.find_element_by_id(element_id).text + score_text = self.browser.find_element(By.ID, element_id).text score_number = score_text.split("/")[0] assert_that(score_number, equal_to(str(score))) return self def assert_success(self): - modal_content = self.browser.find_element_by_id("modal-content").text + modal_content = self.browser.find_element(By.ID, "modal-content").text assert_that(modal_content, contains_string("Congratulations")) return self diff --git a/game/end_to_end_tests/test_level_selection.py b/game/end_to_end_tests/test_level_selection.py index 9954ef366..59534b42b 100644 --- a/game/end_to_end_tests/test_level_selection.py +++ b/game/end_to_end_tests/test_level_selection.py @@ -2,10 +2,9 @@ from common.tests.utils.organisation import create_organisation_directly from common.tests.utils.student import create_school_student_directly from common.tests.utils.teacher import signup_teacher_directly - from hamcrest import assert_that, ends_with, equal_to - from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By from game.end_to_end_tests.base_game_test import BaseGameTest from game.models import Attempt, Episode @@ -35,9 +34,7 @@ def test_coins(self): page = self.go_to_reverse("levels") # The coin images for the levels - level_coin_images = page.browser.find_elements_by_css_selector( - "#collapse-4 div img" - ) + level_coin_images = page.browser.find_elements(By.CSS_SELECTOR, ("#collapse-4 div img")) # There are 4 levels in this episode, each with gold coin assert_that(len(level_coin_images), equal_to(4)) @@ -48,17 +45,13 @@ def test_coins(self): ) # So the episode has a gold coin too - episode_coin_image = page.browser.find_element_by_css_selector( - "#episode-4 > p > img" - ) + episode_coin_image = page.browser.find_element(By.CSS_SELECTOR, "#episode-4 > p > img") assert_that( episode_coin_image.get_attribute("src"), ends_with("/static/game/image/coins/coin_gold.svg"), ) try: - image_for_uncomplete_episode = page.browser.find_element_by_css_selector( - "#episode-3 > p > img" - ) + image_for_uncomplete_episode = page.browser.find_element(By.CSS_SELECTOR, "#episode-3 > p > img") except NoSuchElementException as this_should_happen: - pass \ No newline at end of file + pass diff --git a/game/end_to_end_tests/test_play_through.py b/game/end_to_end_tests/test_play_through.py index a3a3dbbd4..326dbecbb 100644 --- a/game/end_to_end_tests/test_play_through.py +++ b/game/end_to_end_tests/test_play_through.py @@ -143,7 +143,7 @@ def test_level_038(self): self._complete_level(38) def test_level_039(self): - self._complete_level(39) + self._complete_level(39, check_route_score=False) def test_level_040(self): self._complete_level(40) @@ -371,4 +371,47 @@ def test_level_108(self): self._complete_level(108, check_algorithm_score=False) def test_level_109(self): - self._complete_level(109, check_algorithm_score=False, final_level=True) + self._complete_level(109, check_algorithm_score=False) + + def test_episode_12(self): + self._complete_episode(12, 110, check_algorithm_score=False) + + def test_level_110(self): + self._complete_level(110, check_algorithm_score=False) + + def test_level_111(self): + self._complete_level(111, check_algorithm_score=False) + + def test_level_112(self): + self._complete_level(112) + + def test_level_113(self): + self._complete_level(113, check_algorithm_score=False) + + def test_level_114(self): + self._complete_level(114, check_algorithm_score=False) + + def test_level_115(self): + self._complete_level(115, check_algorithm_score=False) + + def test_level_116(self): + self._complete_level(116) + + def test_level_117(self): + self._complete_level(117) + + def test_level_118(self): + self._complete_level(118) + + def test_level_119(self): + self._complete_level(119, check_algorithm_score=False) + + def test_level_120(self): + self._complete_level(120, check_algorithm_score=False) + + def test_level_121(self): + self._complete_level(121, check_algorithm_score=False) + + def test_level_122(self): + self._complete_level(122, check_algorithm_score=False, final_level=True) + diff --git a/game/end_to_end_tests/test_python_levels.py b/game/end_to_end_tests/test_python_levels.py index 8df09f897..176b446cc 100644 --- a/game/end_to_end_tests/test_python_levels.py +++ b/game/end_to_end_tests/test_python_levels.py @@ -1,11 +1,8 @@ -from time import sleep -from game.end_to_end_tests.base_game_test import BaseGameTest -from portal.tests.pageObjects.portal.base_page import BasePage - from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait -from selenium.common.exceptions import TimeoutException + +from game.end_to_end_tests.base_game_test import BaseGameTest DELAY_TIME = 10 @@ -31,7 +28,7 @@ def test_invalid_import(self): def test_run_code(self): self.go_to_level(92) - run_code = self.selenium.find_element_by_id("run-code-button") + run_code = self.selenium.find_element(By.ID, "run-code-button") run_code.click() assert WebDriverWait(self.selenium, DELAY_TIME).until( EC.presence_of_all_elements_located((By.ID, "myModal-lead")) diff --git a/game/messages.py b/game/messages.py index ee79dcd8d..1b8675109 100644 --- a/game/messages.py +++ b/game/messages.py @@ -862,15 +862,22 @@ def description_level36(): message = youtube_link("https://www.youtube-nocookie.com/embed/GUUJSRuAyU0", 0) message += ( "" ) return build_description( @@ -905,22 +912,29 @@ def hint_level37(): def title_level38(): - return "Third time lucky!" + return "Where did the cows come from?" def description_level38(): message = ( - "Well done! You've got so far.
Can you apply the knowledge you " - "gained going through this part of the game to this level?" + "Well done! You've got so far." + "
" + "Can you apply the knowledge you gained going through this part of the " + "game to this level? This time there are some hidden cows that you " + "need to get out of the road! Can you work out what to do?" + "

" + "Hint: Cows don't like noise" ) return build_description(title_level38(), message) def hint_level38(): return ( - "This is a really long route. With a counted loop, your program would be quite " - "long but is this program going to be any longer than your solution to the " - "last level?" + "This is a really long route. With a counted loop, your program would " + "be quite long but is this program going to be any longer than your " + "solution to the last level?" + "

" + "Hint: Cows don't like noise" ) @@ -930,19 +944,20 @@ def title_level39(): def description_level39(): message = ( - "Can you use the 'general algorithm' here so that the van takes a " - "shorter route? Or maybe there's a more efficient way?

Keep " - "an eye on the fuel level - try to use as little as possible." + "It looks like the cows have escaped when you get to the side roads, " + "so be careful not to hit them!" + "

" + "Hint: Cows don't like noise" ) return build_description(title_level39(), message) -# TODO: Update when we update this level def hint_level39(): return ( - "Uh oh, moving around the blocks in your 'general algorithm' might not " - "be the most efficient solution. How about creating a simple solution " - "without 'if statements' that will help the van reach the house?" + "You'll need to modify your general algorithm here so you can get back " + "on track if you hit a dead end." + "

" + "Hint: Cows don't like noise" ) @@ -1098,16 +1113,18 @@ def title_level47(): def description_level47(): message = ( "Put your knowledge to test. Create an algorithm to lead the van to the " - "house.
Don't forget to add a turn and to make the van wait at a " - "traffic light." + "house.
Don't forget to add a turn block and this time, you " + "need to avoid cows instead of waiting at traffic lights." ) return build_description(title_level47(), message) def hint_level47(): return ( - "This route is similar to the last one but the turn is in the other direction. " - "Can you adapt your program?" + "This route is similar to the last one but the turn is in a different " + "direction, and there are now cows instead of traffic lights!!" + "

" + "Do you remember what to do?" ) @@ -1718,7 +1735,7 @@ def title_level80(): def description_level80(): message = youtube_link("https://www.youtube-nocookie.com/embed/5atj2caRjyA", 0) message += ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Can you tell which Python statement matches which block?" ) return build_description( @@ -1739,7 +1756,7 @@ def title_level81(): def description_level81(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Can you tell which Python statement matches which block?" ) return build_description(title_level81(), message) @@ -1756,7 +1773,7 @@ def title_level82(): def description_level82(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Can you tell which Python statement matches which block?" ) return build_description(title_level82(), message) @@ -1777,7 +1794,7 @@ def title_level83(): def description_level83(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding a repeat block and watch what happens in Python." ) return build_description(title_level83(), message) @@ -1794,7 +1811,7 @@ def title_level84(): def description_level84(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding a repeat block and watch what happens in Python." ) return build_description(title_level84(), message) @@ -1811,7 +1828,7 @@ def title_level85(): def description_level85(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding a repeat until block and watch what " "happens in Python." ) @@ -1829,7 +1846,7 @@ def title_level86(): def description_level86(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding an if block and watch what happens in Python." ) return build_description(title_level86(), message) @@ -1845,7 +1862,7 @@ def title_level87(): def description_level87(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding an if block and watch what happens in " "Python particularly with else if and else statements." ) @@ -1862,7 +1879,7 @@ def title_level88(): def description_level88(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding an if block and watch what happens in " "Python particularly with else if and else statements." ) @@ -1879,7 +1896,7 @@ def title_level89(): def description_level89(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "programming language. Try adding an if block and watch what happens in " "Python particularly with else if and else statements." ) @@ -1896,7 +1913,7 @@ def title_level90(): def description_level90(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "language. Try adding a procedure and watch what happens in Python." ) return build_description(title_level90(), message) @@ -1915,7 +1932,7 @@ def title_level91(): def description_level91(): message = ( - "As you create your program using Blockly see what it looks like in the Python " + "As you create your program using Blockly, see what it looks like in the Python " "language. Try adding a procedure and watch what happens in Python." ) return build_description(title_level91(), message) @@ -2329,12 +2346,12 @@ def hint_level108(): def title_level109(): - return "Final challenge!" + return "Spiral challenge!" def description_level109(): message = ( - "For the last challenge, the road straight line sections of road start off increasing " + "For this challenge, the straight line sections of road start off increasing " "by 1 after each turn and then switch to dividing by 2 with a twist!" ) return build_description(title_level109(), message) @@ -2347,6 +2364,506 @@ def hint_level109(): ) +# Episode 12, Levels 110 - 122 +( + title_level110, + description_level110, + hint_level110, +) = ( + lambda: "Here's Python", + lambda: build_description( + title_level110(), + "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?", + ), + lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.", +) + +( + title_level111, + description_level111, + hint_level111, +) = ( + lambda: "Matching Blockly", + lambda: build_description( + title_level111(), + "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?", + ), + lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.", +) + +( + title_level112, + description_level112, + hint_level112, +) = ( + lambda: "Don't forget to find the shortest route", + lambda: build_description( + title_level112(), + "As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?" + "

" + "Don't forget to find the shortest route!", + ), + lambda: "Pay close attention to the spelling of the Python commands, the use of the dot and the round brackets.", +) + +( + title_level113, + description_level113, + hint_level113, +) = ( + lambda: "Where did the blocks go?", + lambda: build_description( + title_level113(), + "Can you remember how the Python was formed under the blocks in the previous levels? Take a look in the Py Commands for a quick reminder.", + ), + lambda: "Now it is your turn, you can click on the Py commands button for a reminder of the Python commands that you can use.", +) + +( + title_level114, + description_level114, + hint_level114, +) = ( + lambda: "Tree snake", + lambda: build_description( + title_level114(), + "This route is just a bit longer. Make sure you type the Python code accurately!", + ), + lambda: "The most common errors here are missing the round brackets at the end of the commands or mistyping the commands, e.g. use my_van.move_fowards() and not my_van.move_foward()", +) + +( + title_level115, + description_level115, + hint_level115, +) = ( + lambda: "Which way to turn? This way or that way?", + lambda: build_description( + title_level115(), + "Try to find the shortest route using Python code only. You are getting really good at this!", + ), + lambda: "If you are stuck on this one, check that you are using the Python commands accurately. Click the Py Commands button to help you.", +) + +( + title_level116, + description_level116, + hint_level116, +) = ( + lambda: "In a while, crocodile!", + lambda: build_description( + title_level116(), + "This level may look easy, but this time you need to use a While Loop to deliver to the house." + "
" + "Can you do it? Name your variables wisely.", + ), + lambda: "Make sure that you are using the right blocks here. You must use the pink block for variables and the dark blue number block for values. Watch the video if you are unsure.", +) + +( + title_level117, + description_level117, + hint_level117, +) = ( + lambda: "Wiggle while you work", + lambda: build_description( + title_level117(), + "This time it's a little harder. We've added the directions back in." + "
" + "Can you put them in the right place?" + "

" + "Notice how the Python looks in the console.", + ), + lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...", +) + +( + title_level118, + description_level118, + hint_level118, +) = ( + lambda: "This way, that way, forwards...", + lambda: build_description( + title_level118(), + "Now all three directions are back!" + "
" + "Use what you have learned so far to get your delivery completed.", + ), + lambda: "You can solve this in stages. Try moving to the start of the repeated section, then adding the loop and then finishing it off.", +) + +( + title_level119, + description_level119, + hint_level119, +) = ( + lambda: "Four leaf clover", + lambda: build_description( + title_level119(), + "Now let's try what you've learned without blocks." + "
" + "Click on the Py Commands button to remind yourself of the syntax you need.", + ), + lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...", +) + +( + title_level120, + description_level120, + hint_level120, +) = ( + lambda: "Pond life", + lambda: build_description( + title_level120(), + "So many routes but only one that is efficient. Can you work out which one it is?", + ), + lambda: "What if you go down the middle section?", +) + +( + title_level121, + description_level121, + hint_level121, +) = ( + lambda: "Farmyard overdrive", + lambda: build_description( + title_level121(), + "Maybe including a loop is the answer here?", + ), + lambda: "Try that middle route...", +) + +( + title_level122, + description_level122, + hint_level122, +) = ( + lambda: "Snnnaaaake reflection", + lambda: build_description( + title_level122(), + "Can you see some patterns? Looks like those loops will come in handy again for this tricky route.", + ), + lambda: "Don't try to solve this in one go. Work out the pattern for the top route and check that works. Then move on to the next part...", +) + + +# Episode 13, Levels 123 - 140 +( + title_level123, + description_level123, + hint_level123, +) = ( + lambda: "TODO", + lambda: build_description(title_level123(), "TODO"), + lambda: "TODO", +) + +( + title_level124, + description_level124, + hint_level124, +) = ( + lambda: "TODO", + lambda: build_description(title_level124(), "TODO"), + lambda: "TODO", +) + +( + title_level125, + description_level125, + hint_level125, +) = ( + lambda: "TODO", + lambda: build_description(title_level125(), "TODO"), + lambda: "TODO", +) + +( + title_level126, + description_level126, + hint_level126, +) = ( + lambda: "TODO", + lambda: build_description(title_level126(), "TODO"), + lambda: "TODO", +) + +( + title_level127, + description_level127, + hint_level127, +) = ( + lambda: "TODO", + lambda: build_description(title_level127(), "TODO"), + lambda: "TODO", +) + +( + title_level128, + description_level128, + hint_level128, +) = ( + lambda: "TODO", + lambda: build_description(title_level128(), "TODO"), + lambda: "TODO", +) + +( + title_level129, + description_level129, + hint_level129, +) = ( + lambda: "TODO", + lambda: build_description(title_level129(), "TODO"), + lambda: "TODO", +) + +( + title_level130, + description_level130, + hint_level130, +) = ( + lambda: "TODO", + lambda: build_description(title_level130(), "TODO"), + lambda: "TODO", +) + +( + title_level131, + description_level131, + hint_level131, +) = ( + lambda: "TODO", + lambda: build_description(title_level131(), "TODO"), + lambda: "TODO", +) + +( + title_level132, + description_level132, + hint_level132, +) = ( + lambda: "TODO", + lambda: build_description(title_level132(), "TODO"), + lambda: "TODO", +) + +( + title_level133, + description_level133, + hint_level133, +) = ( + lambda: "TODO", + lambda: build_description(title_level133(), "TODO"), + lambda: "TODO", +) + +( + title_level134, + description_level134, + hint_level134, +) = ( + lambda: "TODO", + lambda: build_description(title_level134(), "TODO"), + lambda: "TODO", +) + +( + title_level135, + description_level135, + hint_level135, +) = ( + lambda: "TODO", + lambda: build_description(title_level135(), "TODO"), + lambda: "TODO", +) + +( + title_level136, + description_level136, + hint_level136, +) = ( + lambda: "TODO", + lambda: build_description(title_level136(), "TODO"), + lambda: "TODO", +) + +( + title_level137, + description_level137, + hint_level137, +) = ( + lambda: "TODO", + lambda: build_description(title_level137(), "TODO"), + lambda: "TODO", +) + +( + title_level138, + description_level138, + hint_level138, +) = ( + lambda: "TODO", + lambda: build_description(title_level138(), "TODO"), + lambda: "TODO", +) + +( + title_level139, + description_level139, + hint_level139, +) = ( + lambda: "TODO", + lambda: build_description(title_level139(), "TODO"), + lambda: "TODO", +) + +( + title_level140, + description_level140, + hint_level140, +) = ( + lambda: "TODO", + lambda: build_description(title_level140(), "TODO"), + lambda: "TODO", +) + + +# Episode 14, Levels 141 - 148 +( + title_level141, + description_level141, + hint_level141, +) = ( + lambda: "TODO", + lambda: build_description(title_level141(), "TODO"), + lambda: "TODO", +) + +( + title_level142, + description_level142, + hint_level142, +) = ( + lambda: "TODO", + lambda: build_description(title_level142(), "TODO"), + lambda: "TODO", +) + +( + title_level143, + description_level143, + hint_level143, +) = ( + lambda: "TODO", + lambda: build_description(title_level143(), "TODO"), + lambda: "TODO", +) + +( + title_level144, + description_level144, + hint_level144, +) = ( + lambda: "TODO", + lambda: build_description(title_level144(), "TODO"), + lambda: "TODO", +) + +( + title_level145, + description_level145, + hint_level145, +) = ( + lambda: "TODO", + lambda: build_description(title_level145(), "TODO"), + lambda: "TODO", +) + +( + title_level146, + description_level146, + hint_level146, +) = ( + lambda: "TODO", + lambda: build_description(title_level146(), "TODO"), + lambda: "TODO", +) + +( + title_level147, + description_level147, + hint_level147, +) = ( + lambda: "TODO", + lambda: build_description(title_level147(), "TODO"), + lambda: "TODO", +) + +( + title_level148, + description_level148, + hint_level148, +) = ( + lambda: "TODO", + lambda: build_description(title_level148(), "TODO"), + lambda: "TODO", +) + + +# Episode 15, Levels 149 - 153 +( + title_level149, + description_level149, + hint_level149, +) = ( + lambda: "TODO", + lambda: build_description(title_level149(), "TODO"), + lambda: "TODO", +) + +( + title_level150, + description_level150, + hint_level150, +) = ( + lambda: "TODO", + lambda: build_description(title_level150(), "TODO"), + lambda: "TODO", +) + +( + title_level151, + description_level151, + hint_level151, +) = ( + lambda: "TODO", + lambda: build_description(title_level151(), "TODO"), + lambda: "TODO", +) + +( + title_level152, + description_level152, + hint_level152, +) = ( + lambda: "TODO", + lambda: build_description(title_level152(), "TODO"), + lambda: "TODO", +) + +( + title_level153, + description_level153, + hint_level153, +) = ( + lambda: "TODO", + lambda: build_description(title_level153(), "TODO"), + lambda: "TODO", +) + + +# Episode titles def get_episode_title(episode_id): episode_titles = { 1: "Getting Started", @@ -2360,6 +2877,10 @@ def get_episode_title(episode_id): 9: "Blockly Brain Teasers", 10: "Introduction to Python", 11: "Python", + 12: "Sequencing and Counted Loops", + 13: "Indeterminate WHILE Loops - coming soon", + 14: "Selection in a Loop - coming soon", + 15: "For Loops - coming soon", } return episode_titles[episode_id] diff --git a/game/migrations/0079_populate_block_type_add_cow_blocks.py b/game/migrations/0079_populate_block_type_add_cow_blocks.py index 25fba41bd..b3e1a7379 100644 --- a/game/migrations/0079_populate_block_type_add_cow_blocks.py +++ b/game/migrations/0079_populate_block_type_add_cow_blocks.py @@ -41,10 +41,20 @@ def block_types(apps, schema_editor): block.save() Block.objects.create(type="cow_crossing", block_type=CONDITION) + def remove_block_types(apps, schema_editor): + ACTION = 1 + + Block = apps.get_model("game", "Block") + + Block.objects.get(type="cow_crossing").delete() + + Block.objects.create(type="puff_up", block_type=ACTION) + Block.objects.create(type="declare_event", block_type=ACTION) + dependencies = [ ("game", "0078_add_block_types"), ] operations = [ - migrations.RunPython(block_types), + migrations.RunPython(block_types, reverse_code=remove_block_types), ] diff --git a/game/migrations/0083_add_cows_to_existing_levels.py b/game/migrations/0083_add_cows_to_existing_levels.py new file mode 100644 index 000000000..c21d0ec3e --- /dev/null +++ b/game/migrations/0083_add_cows_to_existing_levels.py @@ -0,0 +1,195 @@ +from django.apps.registry import Apps +from django.db import migrations + + +def add_cows_to_existing_levels(apps: Apps, *args): + Level = apps.get_model("game", "Level") + Block = apps.get_model("game", "Block") + LevelBlock = apps.get_model("game", "LevelBlock") + LevelDecor = apps.get_model("game", "LevelDecor") + + level_38 = Level.objects.get(name="38", default=1) + level_38.cows = '[{"minCows":1,"maxCows":1,"potentialCoordinates":[{"x":2,"y":6},{"x":3,"y":4},{"x":3,"y":1}],"type":"WHITE"}]' + level_38.theme_name = "farm" + level_38.model_solution = "[10]" + level_38.save() + + level_39 = Level.objects.get(name="39", default=1) + level_39.cows = '[{"minCows":1,"maxCows":1,"potentialCoordinates":[{"x":4,"y":4},{"x":8,"y":4},{"x":8,"y":6}],"type":"WHITE"}]' + level_39.theme_name = "farm" + level_39.model_solution = "[10]" + level_39.disable_route_score = True + level_39.save() + + level_47 = Level.objects.get(name="47", default=1) + level_47.traffic_lights = "[]" + level_47.cows = '[{"minCows":1,"maxCows":1,"potentialCoordinates":[{"x":6,"y":4},{"x":4,"y":6},{"x":2,"y":4}],"type":"WHITE"}]' + level_47.theme_name = "farm" + level_47.model_solution = "[8]" + level_47.save() + + block_sound_horn = Block.objects.get(type="sound_horn") + block_cow_crossing = Block.objects.get(type="cow_crossing") + + LevelBlock.objects.filter( + level=level_47, + type__type__in=["traffic_light", "wait"], + ).delete() + + LevelBlock.objects.bulk_create( + [ + LevelBlock(level=level_38, type=block_sound_horn), + LevelBlock(level=level_38, type=block_cow_crossing), + LevelBlock(level=level_39, type=block_sound_horn), + LevelBlock(level=level_39, type=block_cow_crossing), + LevelBlock(level=level_47, type=block_sound_horn), + LevelBlock(level=level_47, type=block_cow_crossing), + ] + ) + + LevelDecor.objects.filter( + level_id__in=[ + level_47.id, + ] + ).delete() + + LevelDecor.objects.bulk_create( + [ + LevelDecor( + x=570, + y=296, + decorName="pond", + level=level_39, + ), + LevelDecor( + x=570, + y=408, + decorName="pond", + level=level_39, + ), + LevelDecor( + x=570, + y=514, + decorName="pond", + level=level_39, + ), + LevelDecor( + x=293, + y=300, + decorName="tree1", + level=level_39, + ), + LevelDecor( + x=711, + y=101, + decorName="tree1", + level=level_39, + ), + LevelDecor( + x=897, + y=604, + decorName="tree1", + level=level_39, + ), + LevelDecor( + x=114, + y=315, + decorName="tree1", + level=level_39, + ), + LevelDecor( + x=37, + y=502, + decorName="pond", + level=level_47, + ), + LevelDecor( + x=39, + y=400, + decorName="pond", + level=level_47, + ), + LevelDecor( + x=39, + y=296, + decorName="pond", + level=level_47, + ), + LevelDecor( + x=720, + y=657, + decorName="bush", + level=level_47, + ), + LevelDecor( + x=720, + y=556, + decorName="bush", + level=level_47, + ), + LevelDecor( + x=720, + y=455, + decorName="bush", + level=level_47, + ), + LevelDecor( + x=720, + y=343, + decorName="bush", + level=level_47, + ), + LevelDecor( + x=720, + y=220, + decorName="bush", + level=level_47, + ), + LevelDecor( + x=403, + y=378, + decorName="tree1", + level=level_47, + ), + LevelDecor( + x=440, + y=471, + decorName="tree1", + level=level_47, + ), + LevelDecor( + x=132, + y=649, + decorName="tree1", + level=level_47, + ), + LevelDecor( + x=620, + y=689, + decorName="tree1", + level=level_47, + ), + LevelDecor( + x=500, + y=149, + decorName="tree1", + level=level_47, + ), + LevelDecor( + x=550, + y=483, + decorName="tree2", + level=level_47, + ), + ] + ) + + +class Migration(migrations.Migration): + dependencies = [("game", "0082_level_43_solution")] + operations = [ + migrations.RunPython( + add_cows_to_existing_levels, + reverse_code=migrations.RunPython.noop, + ) + ] diff --git a/game/migrations/0084_alter_block_block_type.py b/game/migrations/0084_alter_block_block_type.py new file mode 100644 index 000000000..eccf958a7 --- /dev/null +++ b/game/migrations/0084_alter_block_block_type.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.18 on 2023-02-28 14:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('game', '0083_add_cows_to_existing_levels'), + ] + + operations = [ + migrations.AlterField( + model_name='block', + name='block_type', + field=models.IntegerField(choices=[(0, 'Start'), (1, 'Action'), (2, 'Condition'), (3, 'Procedure'), (4, 'ControlFlow'), (5, 'Variable'), (6, 'Math')]), + ), + ] diff --git a/game/migrations/0085_add_new_blocks.py b/game/migrations/0085_add_new_blocks.py new file mode 100644 index 000000000..b857ff459 --- /dev/null +++ b/game/migrations/0085_add_new_blocks.py @@ -0,0 +1,53 @@ +from django.db import migrations + + +def add_new_blocks(apps, schema_editor): + Block = apps.get_model("game", "Block") + + VARIABLE = 5 + MATH = 6 + + block1 = Block(type="variables_set", block_type=VARIABLE) + block2 = Block(type="variables_numeric_set", block_type=VARIABLE) + block3 = Block(type="variables_increment", block_type=VARIABLE) + block4 = Block(type="variables_get", block_type=VARIABLE) + block5 = Block(type="math_number", block_type=MATH) + block6 = Block(type="math_arithmetic", block_type=MATH) + block7 = Block(type="logic_compare", block_type=MATH) + + block1.save() + block2.save() + block3.save() + block4.save() + block5.save() + block6.save() + block7.save() + + +def remove_new_blocks(apps, schema_editor): + Block = apps.get_model("game", "Block") + + block1 = Block.objects.get(type="variables_set") + block2 = Block.objects.get(type="variables_numeric_set") + block3 = Block.objects.get(type="variables_increment") + block4 = Block.objects.get(type="variables_get") + block5 = Block.objects.get(type="math_number") + block6 = Block.objects.get(type="math_arithmetic") + block7 = Block.objects.get(type="logic_compare") + + block1.delete() + block2.delete() + block3.delete() + block4.delete() + block5.delete() + block6.delete() + block7.delete() + + +class Migration(migrations.Migration): + + dependencies = [ + ("game", "0084_alter_block_block_type"), + ] + + operations = [migrations.RunPython(add_new_blocks, reverse_code=remove_new_blocks)] diff --git a/game/migrations/0086_loop_levels.py b/game/migrations/0086_loop_levels.py new file mode 100644 index 000000000..84f6d546f --- /dev/null +++ b/game/migrations/0086_loop_levels.py @@ -0,0 +1,471 @@ +import json + +from django.apps.registry import Apps +from django.db import migrations + +from game.level_management import set_decor_inner, set_blocks_inner + + +def add_loop_levels(apps: Apps, *args): + Level = apps.get_model("game", "Level") + LevelBlock = apps.get_model("game", "LevelBlock") + Block = apps.get_model("game", "Block") + LevelDecor = apps.get_model("game", "LevelDecor") + Episode = apps.get_model("game", "Episode") + + episode_15 = Episode.objects.create( + pk=15, + name="For Loops - coming soon", + ) + episode_14 = Episode.objects.create( + pk=14, + next_episode=episode_15, + name="Selection in a Loop - coming soon", + ) + episode_13 = Episode.objects.create( + pk=13, + next_episode=episode_14, + name="Indeterminate WHILE Loops - coming soon", + ) + episode_12 = Episode.objects.create( + pk=12, + next_episode=episode_13, + name="Sequencing and Counted Loops", + ) + + episode_11 = Episode.objects.get(pk=11) + episode_11.next_episode = episode_12 + episode_11.save() + + # Episode 15, Levels 149 - 153 + level_153 = Level.objects.create( + name="153", + episode=episode_15, + ) + level_152 = Level.objects.create( + name="152", + episode=episode_15, + next_level=level_153, + ) + level_151 = Level.objects.create( + name="151", + episode=episode_15, + next_level=level_152, + ) + level_150 = Level.objects.create( + name="150", + episode=episode_15, + next_level=level_151, + ) + level_149 = Level.objects.create( + name="149", + episode=episode_15, + next_level=level_150, + ) + + # Episode 14, Levels 141 - 148 + level_148 = Level.objects.create( + name="148", + episode=episode_14, + next_level=level_149, + ) + level_147 = Level.objects.create( + name="147", + episode=episode_14, + next_level=level_148, + ) + level_146 = Level.objects.create( + name="146", + episode=episode_14, + next_level=level_147, + ) + level_145 = Level.objects.create( + name="145", + episode=episode_14, + next_level=level_146, + ) + level_144 = Level.objects.create( + name="144", + episode=episode_14, + next_level=level_145, + ) + level_143 = Level.objects.create( + name="143", + episode=episode_14, + next_level=level_144, + ) + level_142 = Level.objects.create( + name="142", + episode=episode_14, + next_level=level_143, + ) + level_141 = Level.objects.create( + name="141", + episode=episode_14, + next_level=level_142, + ) + + # Episode 13, Levels 123 - 140 + level_140 = Level.objects.create( + name="140", + episode=episode_13, + next_level=level_141, + ) + level_139 = Level.objects.create( + name="139", + episode=episode_13, + next_level=level_140, + ) + level_138 = Level.objects.create( + name="138", + episode=episode_13, + next_level=level_139, + ) + level_137 = Level.objects.create( + name="137", + episode=episode_13, + next_level=level_138, + ) + level_136 = Level.objects.create( + name="136", + episode=episode_13, + next_level=level_137, + ) + level_135 = Level.objects.create( + name="135", + episode=episode_13, + next_level=level_136, + ) + level_134 = Level.objects.create( + name="134", + episode=episode_13, + next_level=level_135, + ) + level_133 = Level.objects.create( + name="133", + episode=episode_13, + next_level=level_134, + ) + level_132 = Level.objects.create( + name="132", + episode=episode_13, + next_level=level_133, + ) + level_131 = Level.objects.create( + name="131", + episode=episode_13, + next_level=level_132, + ) + level_130 = Level.objects.create( + name="130", + episode=episode_13, + next_level=level_131, + ) + level_129 = Level.objects.create( + name="129", + episode=episode_13, + next_level=level_130, + ) + level_128 = Level.objects.create( + name="128", + episode=episode_13, + next_level=level_129, + ) + level_127 = Level.objects.create( + name="127", + episode=episode_13, + next_level=level_128, + ) + level_126 = Level.objects.create( + name="126", + episode=episode_13, + next_level=level_127, + ) + level_125 = Level.objects.create( + name="125", + episode=episode_13, + next_level=level_126, + ) + level_124 = Level.objects.create( + name="124", + episode=episode_13, + next_level=level_125, + ) + level_123 = Level.objects.create( + name="123", + episode=episode_13, + next_level=level_124, + ) + + # Episode 12, Levels 110 - 122 + level_122 = Level.objects.create( + name="122", + episode=episode_12, + # next_level=level_123, TODO: connect them when the next levels are enabled. + path='[{"coordinate":[1,5],"connectedNodes":[1]},{"coordinate":[1,4],"connectedNodes":[0,2]},{"coordinate":[2,4],"connectedNodes":[1,3]},{"coordinate":[2,5],"connectedNodes":[4,2]},{"coordinate":[3,5],"connectedNodes":[3,5]},{"coordinate":[3,4],"connectedNodes":[4,6]},{"coordinate":[4,4],"connectedNodes":[5,7]},{"coordinate":[4,5],"connectedNodes":[8,6]},{"coordinate":[5,5],"connectedNodes":[7,9]},{"coordinate":[5,4],"connectedNodes":[8,10]},{"coordinate":[6,4],"connectedNodes":[9,11]},{"coordinate":[6,5],"connectedNodes":[12,10]},{"coordinate":[7,5],"connectedNodes":[11,13]},{"coordinate":[7,4],"connectedNodes":[12,14]},{"coordinate":[7,3],"connectedNodes":[13,15]},{"coordinate":[7,2],"connectedNodes":[14,16]},{"coordinate":[7,1],"connectedNodes":[17,15]},{"coordinate":[6,1],"connectedNodes":[18,16]},{"coordinate":[6,2],"connectedNodes":[19,17]},{"coordinate":[5,2],"connectedNodes":[18,20]},{"coordinate":[5,1],"connectedNodes":[21,19]},{"coordinate":[4,1],"connectedNodes":[22,20]},{"coordinate":[4,2],"connectedNodes":[23,21]},{"coordinate":[3,2],"connectedNodes":[22,24]},{"coordinate":[3,1],"connectedNodes":[25,23]},{"coordinate":[2,1],"connectedNodes":[26,24]},{"coordinate":[2,2],"connectedNodes":[27,25]},{"coordinate":[1,2],"connectedNodes":[26,28]},{"coordinate":[1,1],"connectedNodes":[27]}]', + origin='{"coordinate":[1,5],"direction":"S"}', + destinations="[[1,1]]", + default=True, + blocklyEnabled=False, + theme_name="grass", + character_name="Van", + ) + level_121 = Level.objects.create( + name="121", + episode=episode_12, + next_level=level_122, + path='[{"coordinate":[1,7],"connectedNodes":[1]},{"coordinate":[1,6],"connectedNodes":[0,2,13]},{"coordinate":[2,6],"connectedNodes":[1,25,3]},{"coordinate":[2,5],"connectedNodes":[2,4]},{"coordinate":[3,5],"connectedNodes":[3,5]},{"coordinate":[3,4],"connectedNodes":[4,6]},{"coordinate":[4,4],"connectedNodes":[5,7]},{"coordinate":[4,3],"connectedNodes":[23,6,8]},{"coordinate":[5,3],"connectedNodes":[7,9]},{"coordinate":[5,2],"connectedNodes":[8,10]},{"coordinate":[6,2],"connectedNodes":[9,31,11]},{"coordinate":[6,1],"connectedNodes":[21,10,12]},{"coordinate":[7,1],"connectedNodes":[11,32]},{"coordinate":[1,5],"connectedNodes":[1,14]},{"coordinate":[1,4],"connectedNodes":[13,15]},{"coordinate":[1,3],"connectedNodes":[14,22,16]},{"coordinate":[1,2],"connectedNodes":[15,17]},{"coordinate":[1,1],"connectedNodes":[16,18]},{"coordinate":[2,1],"connectedNodes":[17,19]},{"coordinate":[3,1],"connectedNodes":[18,24,20]},{"coordinate":[4,1],"connectedNodes":[19,21]},{"coordinate":[5,1],"connectedNodes":[20,11]},{"coordinate":[2,3],"connectedNodes":[15,23]},{"coordinate":[3,3],"connectedNodes":[22,7,24]},{"coordinate":[3,2],"connectedNodes":[23,19]},{"coordinate":[3,6],"connectedNodes":[2,26]},{"coordinate":[4,6],"connectedNodes":[25,27]},{"coordinate":[5,6],"connectedNodes":[26,28]},{"coordinate":[6,6],"connectedNodes":[27,29]},{"coordinate":[6,5],"connectedNodes":[28,30]},{"coordinate":[6,4],"connectedNodes":[29,31]},{"coordinate":[6,3],"connectedNodes":[30,10]},{"coordinate":[7,0],"connectedNodes":[12]}]', + origin='{"coordinate":[1,7],"direction":"S"}', + destinations="[[7,0]]", + default=True, + blocklyEnabled=False, + theme_name="farm", + character_name="Van", + ) + level_120 = Level.objects.create( + name="120", + episode=episode_12, + next_level=level_121, + path='[{"coordinate":[9,5],"connectedNodes":[1]},{"coordinate":[8,5],"connectedNodes":[2,0]},{"coordinate":[7,5],"connectedNodes":[1,3]},{"coordinate":[7,4],"connectedNodes":[4,2,20]},{"coordinate":[6,4],"connectedNodes":[5,3]},{"coordinate":[5,4],"connectedNodes":[13,4,6]},{"coordinate":[5,3],"connectedNodes":[7,5]},{"coordinate":[4,3],"connectedNodes":[8,6]},{"coordinate":[3,3],"connectedNodes":[7,9]},{"coordinate":[3,2],"connectedNodes":[10,8,24]},{"coordinate":[2,2],"connectedNodes":[11,9]},{"coordinate":[1,2],"connectedNodes":[19,10,12]},{"coordinate":[1,1],"connectedNodes":[25,11]},{"coordinate":[5,5],"connectedNodes":[14,5]},{"coordinate":[4,5],"connectedNodes":[15,13]},{"coordinate":[3,5],"connectedNodes":[16,14]},{"coordinate":[2,5],"connectedNodes":[17,15]},{"coordinate":[1,5],"connectedNodes":[16,18]},{"coordinate":[1,4],"connectedNodes":[17,19]},{"coordinate":[1,3],"connectedNodes":[18,11]},{"coordinate":[7,3],"connectedNodes":[3,21]},{"coordinate":[7,2],"connectedNodes":[22,20]},{"coordinate":[6,2],"connectedNodes":[23,21]},{"coordinate":[5,2],"connectedNodes":[24,22]},{"coordinate":[4,2],"connectedNodes":[9,23]},{"coordinate":[0,1],"connectedNodes":[12]}]', + origin='{"coordinate":[9,5],"direction":"W"}', + destinations="[[0,1]]", + default=True, + blocklyEnabled=False, + theme_name="grass", + character_name="Van", + ) + level_119 = Level.objects.create( + name="119", + episode=episode_12, + next_level=level_120, + path='[{"coordinate":[2,3],"connectedNodes":[1]},{"coordinate":[2,2],"connectedNodes":[0,2]},{"coordinate":[3,2],"connectedNodes":[1,3]},{"coordinate":[3,1],"connectedNodes":[2,4]},{"coordinate":[4,1],"connectedNodes":[3,5]},{"coordinate":[5,1],"connectedNodes":[4,6]},{"coordinate":[5,2],"connectedNodes":[7,5]},{"coordinate":[6,2],"connectedNodes":[6,8]},{"coordinate":[6,3],"connectedNodes":[9,7]},{"coordinate":[6,4],"connectedNodes":[10,8]},{"coordinate":[5,4],"connectedNodes":[11,9]},{"coordinate":[5,5],"connectedNodes":[12,10]},{"coordinate":[4,5],"connectedNodes":[13,11]},{"coordinate":[3,5],"connectedNodes":[12]}]', + origin='{"coordinate":[2,3],"direction":"S"}', + destinations="[[3,5]]", + default=True, + blocklyEnabled=False, + theme_name="grass", + character_name="Van", + ) + level_118 = Level.objects.create( + name="118", + episode=episode_12, + next_level=level_119, + path='[{"coordinate":[1,3],"connectedNodes":[1]},{"coordinate":[2,3],"connectedNodes":[0,2]},{"coordinate":[3,3],"connectedNodes":[1,3]},{"coordinate":[3,4],"connectedNodes":[4,2]},{"coordinate":[4,4],"connectedNodes":[3,5]},{"coordinate":[4,5],"connectedNodes":[6,4]},{"coordinate":[5,5],"connectedNodes":[5,7]},{"coordinate":[5,6],"connectedNodes":[8,6]},{"coordinate":[6,6],"connectedNodes":[7,9]},{"coordinate":[7,6],"connectedNodes":[8,10]},{"coordinate":[8,6],"connectedNodes":[9]}]', + origin='{"coordinate":[1,3],"direction":"E"}', + destinations="[[8,6]]", + default=True, + pythonEnabled=False, + pythonViewEnabled=True, + theme_name="snow", + character_name="Van", + model_solution="[11]", + ) + level_117 = Level.objects.create( + name="117", + episode=episode_12, + next_level=level_118, + path='[{"coordinate":[2,2],"connectedNodes":[1]},{"coordinate":[3,2],"connectedNodes":[0,2]},{"coordinate":[3,3],"connectedNodes":[3,1]},{"coordinate":[4,3],"connectedNodes":[2,4]},{"coordinate":[4,4],"connectedNodes":[5,3]},{"coordinate":[5,4],"connectedNodes":[4,6]},{"coordinate":[5,5],"connectedNodes":[7,5]},{"coordinate":[6,5],"connectedNodes":[6,8]},{"coordinate":[6,6],"connectedNodes":[9,7]},{"coordinate":[7,6],"connectedNodes":[8]}]', + origin='{"coordinate":[2,2],"direction":"E"}', + destinations="[[7,6]]", + default=True, + pythonEnabled=False, + pythonViewEnabled=True, + theme_name="snow", + character_name="Van", + model_solution="[8]", + ) + level_116 = Level.objects.create( + name="116", + episode=episode_12, + next_level=level_117, + path='[{"coordinate":[1,4],"connectedNodes":[1]},{"coordinate":[2,4],"connectedNodes":[0,2]},{"coordinate":[3,4],"connectedNodes":[1,3]},{"coordinate":[4,4],"connectedNodes":[2,4]},{"coordinate":[5,4],"connectedNodes":[3,5]},{"coordinate":[6,4],"connectedNodes":[4]}]', + origin='{"coordinate":[1,4],"direction":"E"}', + destinations="[[6,4]]", + default=True, + pythonEnabled=False, + theme_name="grass", + character_name="Van", + model_solution="[7]", + ) + level_115 = Level.objects.create( + name="115", + episode=episode_12, + next_level=level_116, + path='[{"coordinate":[9,2],"connectedNodes":[1]},{"coordinate":[8,2],"connectedNodes":[26,0,2]},{"coordinate":[8,1],"connectedNodes":[3,1]},{"coordinate":[7,1],"connectedNodes":[4,2]},{"coordinate":[6,1],"connectedNodes":[5,20,3]},{"coordinate":[5,1],"connectedNodes":[6,4]},{"coordinate":[4,1],"connectedNodes":[7,5]},{"coordinate":[3,1],"connectedNodes":[8,6]},{"coordinate":[3,2],"connectedNodes":[9,7]},{"coordinate":[4,2],"connectedNodes":[8,10]},{"coordinate":[4,3],"connectedNodes":[11,9]},{"coordinate":[3,3],"connectedNodes":[12,10]},{"coordinate":[3,4],"connectedNodes":[13,11]},{"coordinate":[3,5],"connectedNodes":[14,12]},{"coordinate":[4,5],"connectedNodes":[13,15]},{"coordinate":[5,5],"connectedNodes":[14,16,17]},{"coordinate":[5,6],"connectedNodes":[21,15]},{"coordinate":[5,4],"connectedNodes":[15,18]},{"coordinate":[6,4],"connectedNodes":[17,19]},{"coordinate":[6,3],"connectedNodes":[18,27,20]},{"coordinate":[6,2],"connectedNodes":[19,4]},{"coordinate":[6,6],"connectedNodes":[16,22]},{"coordinate":[7,6],"connectedNodes":[21,23]},{"coordinate":[8,6],"connectedNodes":[22,24]},{"coordinate":[8,5],"connectedNodes":[23,25]},{"coordinate":[8,4],"connectedNodes":[24,26]},{"coordinate":[8,3],"connectedNodes":[27,25,1]},{"coordinate":[7,3],"connectedNodes":[19,26]}]', + origin='{"coordinate":[9,2],"direction":"W"}', + destinations="[[4,5]]", + default=True, + blocklyEnabled=False, + theme_name="grass", + character_name="Van", + ) + level_114 = Level.objects.create( + name="114", + episode=episode_12, + next_level=level_115, + path='[{"coordinate":[0,2],"connectedNodes":[1]},{"coordinate":[1,2],"connectedNodes":[0,2]},{"coordinate":[1,3],"connectedNodes":[3,1]},{"coordinate":[1,4],"connectedNodes":[4,2]},{"coordinate":[1,5],"connectedNodes":[5,3]},{"coordinate":[2,5],"connectedNodes":[4,6]},{"coordinate":[2,4],"connectedNodes":[5,7]},{"coordinate":[3,4],"connectedNodes":[6,8]},{"coordinate":[3,3],"connectedNodes":[7,9]},{"coordinate":[3,2],"connectedNodes":[8,10]},{"coordinate":[3,1],"connectedNodes":[9,11]},{"coordinate":[4,1],"connectedNodes":[10,12]},{"coordinate":[4,2],"connectedNodes":[13,11]},{"coordinate":[5,2],"connectedNodes":[12]}]', + origin='{"coordinate":[0,2],"direction":"E"}', + destinations="[[5,2]]", + default=True, + blocklyEnabled=False, + theme_name="grass", + character_name="Van", + ) + level_113 = Level.objects.create( + name="113", + episode=episode_12, + next_level=level_114, + path='[{"coordinate":[4,7],"connectedNodes":[1]},{"coordinate":[4,6],"connectedNodes":[0,2]},{"coordinate":[4,5],"connectedNodes":[3,1]},{"coordinate":[3,5],"connectedNodes":[2,4]},{"coordinate":[3,4],"connectedNodes":[3,5]},{"coordinate":[3,3],"connectedNodes":[4]}]', + origin='{"coordinate":[4,7],"direction":"S"}', + destinations="[[3,3]]", + default=True, + blocklyEnabled=False, + theme_name="farm", + character_name="Van", + ) + level_112 = Level.objects.create( + name="112", + episode=episode_12, + next_level=level_113, + path='[{"coordinate":[2,7],"connectedNodes":[1]},{"coordinate":[2,6],"connectedNodes":[0,2]},{"coordinate":[3,6],"connectedNodes":[1,3,17]},{"coordinate":[4,6],"connectedNodes":[2,4]},{"coordinate":[5,6],"connectedNodes":[3,5]},{"coordinate":[6,6],"connectedNodes":[4,6]},{"coordinate":[6,5],"connectedNodes":[5,7]},{"coordinate":[6,4],"connectedNodes":[20,6,8]},{"coordinate":[6,3],"connectedNodes":[7,9]},{"coordinate":[6,2],"connectedNodes":[8,10]},{"coordinate":[6,1],"connectedNodes":[11,9]},{"coordinate":[5,1],"connectedNodes":[12,10]},{"coordinate":[4,1],"connectedNodes":[13,22,11]},{"coordinate":[3,1],"connectedNodes":[14,12]},{"coordinate":[2,1],"connectedNodes":[15,13]},{"coordinate":[1,1],"connectedNodes":[16,14]},{"coordinate":[0,1],"connectedNodes":[15]},{"coordinate":[3,5],"connectedNodes":[2,18]},{"coordinate":[3,4],"connectedNodes":[17,19]},{"coordinate":[4,4],"connectedNodes":[18,20,21]},{"coordinate":[5,4],"connectedNodes":[19,7]},{"coordinate":[4,3],"connectedNodes":[19,22]},{"coordinate":[4,2],"connectedNodes":[21,12]}]', + origin='{"coordinate":[2,7],"direction":"S"}', + destinations="[[0,1]]", + default=True, + pythonEnabled=False, + pythonViewEnabled=True, + theme_name="grass", + character_name="Van", + model_solution="[11]", + ) + level_111 = Level.objects.create( + name="111", + episode=episode_12, + next_level=level_112, + path='[{"coordinate":[0,5],"connectedNodes":[1]},{"coordinate":[1,5],"connectedNodes":[0,2]},{"coordinate":[2,5],"connectedNodes":[1,3]},{"coordinate":[3,5],"connectedNodes":[2,4]},{"coordinate":[3,6],"connectedNodes":[5,3]},{"coordinate":[4,6],"connectedNodes":[4,6]},{"coordinate":[5,6],"connectedNodes":[5,7]},{"coordinate":[5,5],"connectedNodes":[6,8]},{"coordinate":[5,4],"connectedNodes":[7,9]},{"coordinate":[5,3],"connectedNodes":[8,10]},{"coordinate":[5,2],"connectedNodes":[9,11]},{"coordinate":[6,2],"connectedNodes":[10]}]', + origin='{"coordinate":[0,5],"direction":"E"}', + destinations="[[6,2]]", + default=True, + pythonEnabled=False, + pythonViewEnabled=True, + theme_name="grass", + character_name="Van", + ) + level_110 = Level.objects.create( + name="110", + episode=episode_12, + next_level=level_111, + path='[{"coordinate":[0,2],"connectedNodes":[2]},{"coordinate":[2,2],"connectedNodes":[2,3]},{"coordinate":[1,2],"connectedNodes":[0,1]},{"coordinate":[2,3],"connectedNodes":[4,1]},{"coordinate":[2,4],"connectedNodes":[5,3]},{"coordinate":[3,4],"connectedNodes":[4,6]},{"coordinate":[4,4],"connectedNodes":[5]}]', + origin='{"coordinate":[0,2],"direction":"E"}', + destinations="[[4,4]]", + default=True, + pythonEnabled=False, + pythonViewEnabled=True, + theme_name="farm", + character_name="Van", + ) + + def set_decor(level, decor): + set_decor_inner(level, decor, LevelDecor) + + set_decor( + level_110, + json.loads('[{"x":503,"y":409,"decorName":"tree2"},{"x":384,"y":503,"decorName":"bush"},{"x":355,"y":549,"decorName":"bush"},{"x":320,"y":503,"decorName":"bush"},{"x":399,"y":200,"decorName":"pond"},{"x":400,"y":299,"decorName":"pond"}]') + ) + set_decor( + level_111, + json.loads('[{"x":611,"y":568,"decorName":"tree2"},{"x":595,"y":648,"decorName":"tree1"},{"x":714,"y":454,"decorName":"tree2"},{"x":652,"y":328,"decorName":"tree2"},{"x":600,"y":447,"decorName":"tree2"},{"x":651,"y":498,"decorName":"tree1"},{"x":366,"y":286,"decorName":"tree2"},{"x":285,"y":257,"decorName":"tree2"},{"x":206,"y":283,"decorName":"tree1"},{"x":82,"y":385,"decorName":"tree1"},{"x":46,"y":324,"decorName":"tree1"},{"x":233,"y":355,"decorName":"tree1"},{"x":637,"y":400,"decorName":"tree1"},{"x":87,"y":258,"decorName":"tree2"},{"x":291,"y":321,"decorName":"tree1"},{"x":164,"y":388,"decorName":"tree2"},{"x":129,"y":334,"decorName":"tree1"},{"x":128,"y":593,"decorName":"tree2"},{"x":235,"y":685,"decorName":"tree2"},{"x":103,"y":688,"decorName":"tree2"},{"x":181,"y":635,"decorName":"tree1"},{"x":70,"y":625,"decorName":"tree1"}]') + ) + set_decor( + level_112, + json.loads('[{"x":50,"y":625,"decorName":"tree1"},{"x":50,"y":207,"decorName":"tree1"},{"x":50,"y":321,"decorName":"tree1"},{"x":50,"y":426,"decorName":"tree1"},{"x":50,"y":529,"decorName":"tree1"},{"x":398,"y":485,"decorName":"tree2"},{"x":500,"y":513,"decorName":"tree2"},{"x":500,"y":198,"decorName":"bush"},{"x":500,"y":274,"decorName":"bush"},{"x":500,"y":352,"decorName":"bush"}]') + ) + set_decor( + level_113, + json.loads('[{"x":404,"y":415,"decorName":"tree2"},{"x":251,"y":420,"decorName":"bush"},{"x":187,"y":420,"decorName":"bush"},{"x":128,"y":420,"decorName":"bush"},{"x":221,"y":460,"decorName":"bush"},{"x":153,"y":460,"decorName":"bush"},{"x":183,"y":500,"decorName":"bush"},{"x":203,"y":596,"decorName":"pond"},{"x":203,"y":696,"decorName":"pond"}]') + ) + set_decor( + level_114, + json.loads('[{"x":2,"y":438,"decorName":"tree1"},{"x":2,"y":543,"decorName":"tree1"},{"x":2,"y":329,"decorName":"tree1"},{"x":548,"y":556,"decorName":"tree1"},{"x":563,"y":469,"decorName":"tree1"},{"x":475,"y":549,"decorName":"tree2"},{"x":419,"y":514,"decorName":"tree1"},{"x":488,"y":434,"decorName":"tree2"}]') + ) + set_decor( + level_115, + json.loads('[{"x":885,"y":343,"decorName":"tree1"},{"x":885,"y":440,"decorName":"tree1"},{"x":406,"y":383,"decorName":"tree2"},{"x":498,"y":306,"decorName":"tree2"},{"x":484,"y":190,"decorName":"tree2"}]') + ) + set_decor( + level_116, + json.loads('[{"x":220,"y":305,"decorName":"pond"},{"x":539,"y":569,"decorName":"tree2"},{"x":569,"y":516,"decorName":"tree1"},{"x":498,"y":497,"decorName":"tree2"},{"x":182,"y":165,"decorName":"tree2"},{"x":225,"y":228,"decorName":"tree1"},{"x":159,"y":245,"decorName":"tree1"},{"x":312,"y":254,"decorName":"tree2"}]') + ) + set_decor( + level_117, + json.loads('[{"x":443,"y":578,"decorName":"pond"},{"x":412,"y":648,"decorName":"tree1"},{"x":516,"y":651,"decorName":"tree2"},{"x":694,"y":341,"decorName":"tree1"},{"x":647,"y":292,"decorName":"tree2"},{"x":623,"y":362,"decorName":"tree1"},{"x":640,"y":434,"decorName":"tree2"}]') + ) + set_decor( + level_118, + json.loads('[{"x":711,"y":507,"decorName":"tree2"},{"x":605,"y":508,"decorName":"tree2"},{"x":193,"y":396,"decorName":"bush"},{"x":250,"y":398,"decorName":"bush"}]') + ) + set_decor( + level_119, + json.loads('[{"x":250,"y":391,"decorName":"tree2"},{"x":367,"y":237,"decorName":"tree1"},{"x":463,"y":317,"decorName":"tree2"},{"x":364,"y":395,"decorName":"tree1"}]') + ) + set_decor( + level_120, + json.loads('[{"x":189,"y":337,"decorName":"pond"},{"x":793,"y":368,"decorName":"tree1"},{"x":814,"y":285,"decorName":"tree2"},{"x":869,"y":389,"decorName":"tree2"},{"x":334,"y":413,"decorName":"tree1"},{"x":403,"y":402,"decorName":"tree2"},{"x":192,"y":410,"decorName":"tree1"}]') + ) + set_decor( + level_121, + json.loads('[{"x":383,"y":500,"decorName":"pond"},{"x":700,"y":500,"decorName":"pond"},{"x":700,"y":400,"decorName":"pond"},{"x":700,"y":300,"decorName":"pond"},{"x":550,"y":433,"decorName":"bush"},{"x":549,"y":467,"decorName":"bush"},{"x":550,"y":395,"decorName":"bush"},{"x":186,"y":431,"decorName":"tree1"},{"x":196,"y":387,"decorName":"tree1"},{"x":541,"y":501,"decorName":"tree2"}]') + ) + set_decor( + level_122, + json.loads('[{"x":150,"y":320,"decorName":"bush"},{"x":350,"y":320,"decorName":"bush"},{"x":550,"y":320,"decorName":"bush"}]') + ) + + def set_blocks(level, blocks): + set_blocks_inner(level, blocks, LevelBlock, Block) + + set_blocks( + level_110, + json.loads('[{"type":"move_forwards"},{"type":"turn_left"},{"type":"turn_right"}]'), + ) + set_blocks( + level_111, + json.loads('[{"type":"move_forwards"},{"type":"turn_left"},{"type":"turn_right"}]'), + ) + set_blocks( + level_112, + json.loads('[{"type":"move_forwards"},{"type":"turn_left"},{"type":"turn_right"}]'), + ) + set_blocks( + level_116, + json.loads('[{"type":"move_forwards"},{"type":"controls_repeat_while"},{"type":"variables_numeric_set"},{"type":"variables_increment"},{"type":"variables_get"},{"type":"math_number"},{"type":"logic_compare"}]'), + ) + set_blocks( + level_117, + json.loads('[{"type":"turn_left"},{"type":"turn_right"},{"type":"controls_repeat_while"},{"type":"variables_numeric_set"},{"type":"variables_increment"},{"type":"variables_get"},{"type":"math_number"},{"type":"logic_compare"}]'), + ) + set_blocks( + level_118, + json.loads('[{"type":"move_forwards"},{"type":"turn_left"},{"type":"turn_right"},{"type":"controls_repeat_while"},{"type":"variables_numeric_set"},{"type":"variables_increment"},{"type":"variables_get"},{"type":"math_number"},{"type":"logic_compare"}]'), + ) + + level_109 = Level.objects.get(name="109") + level_109.next_level = level_110 + level_109.save() + + +def delete_loop_levels(apps: Apps, *args): + Level = apps.get_model("game", "Level") + Episode = apps.get_model("game", "Episode") + + Level.objects.filter(episode__pk__in=range(12, 16)).delete() + Episode.objects.filter(pk__in=range(12, 16)).delete() + + +class Migration(migrations.Migration): + dependencies = [("game", "0085_add_new_blocks")] + operations = [ + migrations.RunPython( + add_loop_levels, + reverse_code=delete_loop_levels, + ) + ] diff --git a/game/models.py b/game/models.py index 0e1fdaade..ffe474158 100644 --- a/game/models.py +++ b/game/models.py @@ -1,6 +1,6 @@ from builtins import str -from common.models import UserProfile, Student, Class +from common.models import Class, Student, UserProfile from django.contrib.auth.models import User from django.db import models @@ -26,6 +26,8 @@ class Block(models.Model): (2, "Condition"), (3, "Procedure"), (4, "ControlFlow"), + (5, "Variable"), + (6, "Math"), ] ) @@ -35,6 +37,7 @@ def __str__(self): class Meta: ordering = ["block_type", "pk"] + class Episode(models.Model): """Variables prefixed with r_ signify they are parameters for random level generation""" @@ -83,6 +86,10 @@ def difficulty(self): 9: "brainteasers", 10: "hard", 11: "advanced", + 12: "loops", + 13: "loops", + 14: "loops", + 15: "loops", } return difficulty_map.get(self.id, "easy") @@ -96,7 +103,11 @@ def sorted_levels(self): # Sorts all the levels by integer conversion of "name" which should equate to the correct play order # Custom levels do not have an episode - return sort_levels(self.model.objects.filter(episode__isnull=False)) + return sort_levels( + self.model.objects.filter(episode__isnull=False).exclude( + episode__name__icontains="coming soon" + ) + ) def sort_levels(levels): diff --git a/game/static/game/css/backgrounds.css b/game/static/game/css/backgrounds.css index 4d6b004e4..b661f5e86 100644 --- a/game/static/game/css/backgrounds.css +++ b/game/static/game/css/backgrounds.css @@ -27,3 +27,11 @@ .bg--shared-levels { background: #f6be00; } + +.bg--loops { + background: #3F3F3F; +} + +.bg--loops-coming-soon { + background: #CBCBCB; +} diff --git a/game/static/game/css/dataTables.custom.css b/game/static/game/css/dataTables.custom.css index 6fe65582e..474658536 100644 --- a/game/static/game/css/dataTables.custom.css +++ b/game/static/game/css/dataTables.custom.css @@ -30,6 +30,7 @@ div.DTFC_RightBodyLiner { table.dataTable { border-collapse: collapse; + margin: 0; } table.dataTable thead th, diff --git a/game/static/game/css/dataTables.jqueryui.css b/game/static/game/css/dataTables.jqueryui.css index ab31a2789..368dce3f0 100644 --- a/game/static/game/css/dataTables.jqueryui.css +++ b/game/static/game/css/dataTables.jqueryui.css @@ -1,220 +1,208 @@ -/* - * Table styles - */ -table.dataTable { - width: 100%; - margin: 0 auto; - clear: both; - border-collapse: separate; - border-spacing: 0; - /* - * Header and footer styles - */ - /* - * Body styles - */ +@charset "UTF-8"; +:root { + --dt-row-selected: 13, 110, 253; + --dt-row-selected-text: 255, 255, 255; + --dt-row-selected-link: 9, 10, 11; + --dt-row-stripe: 0, 0, 0; + --dt-row-hover: 0, 0, 0; + --dt-column-ordering: 0, 0, 0; + --dt-html-background: white; +} +:root.dark { + --dt-html-background: rgb(33, 37, 41); } -table.dataTable thead th, -table.dataTable thead td, -table.dataTable tfoot th, -table.dataTable tfoot td { - padding: 4px 10px; + +table.dataTable td.dt-control { + text-align: center; + cursor: pointer; } -table.dataTable thead th, -table.dataTable tfoot th { - font-weight: bold; +table.dataTable td.dt-control:before { + display: inline-block; + color: rgba(0, 0, 0, 0.5); + content: "►"; } -table.dataTable thead th:active, -table.dataTable thead td:active { - outline: none; +table.dataTable tr.dt-hasChild td.dt-control:before { + content: "▼"; } -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting { - cursor: pointer; - *cursor: hand; + +html.dark table.dataTable td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable thead th div.DataTables_sort_wrapper { - position: relative; - padding-right: 10px; +html.dark table.dataTable tr.dt-hasChild td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable thead th div.DataTables_sort_wrapper span { - position: absolute; - top: 50%; - margin-top: -8px; - right: -5px; + +:root { + --dt-row-selected: 13, 110, 253; + --dt-row-selected-text: 255, 255, 255; + --dt-row-selected-link: 9, 10, 11; + --dt-row-stripe: 0, 0, 0; + --dt-row-hover: 0, 0, 0; + --dt-column-ordering: 0, 0, 0; + --dt-html-background: white; +} +:root.dark { + --dt-html-background: rgb(33, 37, 41); } -table.dataTable thead th.ui-state-default { - border-right-width: 0; + +table.dataTable td.dt-control { + text-align: center; + cursor: pointer; } -table.dataTable thead th.ui-state-default:last-child { - border-right-width: 1px; +table.dataTable td.dt-control:before { + display: inline-block; + color: rgba(0, 0, 0, 0.5); + content: "►"; } -table.dataTable tbody tr { - background-color: #ffffff; +table.dataTable tr.dt-hasChild td.dt-control:before { + content: "▼"; } -table.dataTable tbody tr.selected { - background-color: #B0BED9; + +html.dark table.dataTable td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable tbody th, -table.dataTable tbody td { - padding: 8px 10px; +html.dark table.dataTable tr.dt-hasChild td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable th.center, -table.dataTable td.center, -table.dataTable td.dataTables_empty { - text-align: center; + +table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting_asc_disabled, table.dataTable thead > tr > th.sorting_desc_disabled, +table.dataTable thead > tr > td.sorting, +table.dataTable thead > tr > td.sorting_asc, +table.dataTable thead > tr > td.sorting_desc, +table.dataTable thead > tr > td.sorting_asc_disabled, +table.dataTable thead > tr > td.sorting_desc_disabled { + cursor: pointer; + position: relative; + padding-right: 26px; +} +table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting:before, +table.dataTable thead > tr > td.sorting:after, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_asc:after, +table.dataTable thead > tr > td.sorting_desc:before, +table.dataTable thead > tr > td.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_asc_disabled:after, +table.dataTable thead > tr > td.sorting_desc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:after { + position: absolute; + display: block; + opacity: 0.125; + right: 10px; + line-height: 9px; + font-size: 0.8em; +} +table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before, +table.dataTable thead > tr > td.sorting:before, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_desc:before, +table.dataTable thead > tr > td.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:before { + bottom: 50%; + content: "▲"; + content: "▲"/""; +} +table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting:after, +table.dataTable thead > tr > td.sorting_asc:after, +table.dataTable thead > tr > td.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc_disabled:after, +table.dataTable thead > tr > td.sorting_desc_disabled:after { + top: 50%; + content: "▼"; + content: "▼"/""; } -table.dataTable th.right, -table.dataTable td.right { - text-align: right; +table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_desc:after { + opacity: 0.6; } -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { - border-top: 1px solid #ddd; +table.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting_asc_disabled:before { + display: none; } -table.dataTable.row-border tbody tr:first-child th, -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, -table.dataTable.display tbody tr:first-child td { - border-top: none; +table.dataTable thead > tr > th:active, +table.dataTable thead > tr > td:active { + outline: none; } -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; + +div.dataTables_scrollBody > table.dataTable > thead > tr > th:before, div.dataTables_scrollBody > table.dataTable > thead > tr > th:after, +div.dataTables_scrollBody > table.dataTable > thead > tr > td:before, +div.dataTables_scrollBody > table.dataTable > thead > tr > td:after { + display: none; } -table.dataTable.cell-border tbody tr th:first-child, -table.dataTable.cell-border tbody tr td:first-child { - border-left: 1px solid #ddd; + +div.dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 200px; + margin-left: -100px; + margin-top: -26px; + text-align: center; + padding: 2px; } -table.dataTable.cell-border tbody tr:first-child th, -table.dataTable.cell-border tbody tr:first-child td { - border-top: none; +div.dataTables_processing > div:last-child { + position: relative; + width: 80px; + height: 15px; + margin: 1em auto; } -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { - background-color: #f9f9f9; -} -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { - background-color: #abb9d3; -} -table.dataTable.hover tbody tr:hover, -table.dataTable.hover tbody tr.odd:hover, -table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, -table.dataTable.display tbody tr.odd:hover, -table.dataTable.display tbody tr.even:hover { - background-color: whitesmoke; -} -table.dataTable.hover tbody tr:hover.selected, -table.dataTable.hover tbody tr.odd:hover.selected, -table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, -table.dataTable.display tbody tr.odd:hover.selected, -table.dataTable.display tbody tr.even:hover.selected { - background-color: #a9b7d1; -} -table.dataTable.order-column tbody tr > .sorting_1, -table.dataTable.order-column tbody tr > .sorting_2, -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, -table.dataTable.display tbody tr > .sorting_2, -table.dataTable.display tbody tr > .sorting_3 { - background-color: #f9f9f9; -} -table.dataTable.order-column tbody tr.selected > .sorting_1, -table.dataTable.order-column tbody tr.selected > .sorting_2, -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, -table.dataTable.display tbody tr.selected > .sorting_2, -table.dataTable.display tbody tr.selected > .sorting_3 { - background-color: #acbad4; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #f1f1f1; -} -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { - background-color: #f3f3f3; -} -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { - background-color: whitesmoke; -} -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { - background-color: #a6b3cd; -} -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { - background-color: #a7b5ce; -} -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { - background-color: #a9b6d0; -} -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #f9f9f9; -} -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { - background-color: #fbfbfb; -} -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { - background-color: #fdfdfd; -} -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { - background-color: #acbad4; -} -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { - background-color: #adbbd6; -} -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { - background-color: #afbdd8; -} -table.dataTable.display tbody tr:hover > .sorting_1, -table.dataTable.display tbody tr.odd:hover > .sorting_1, -table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { - background-color: #eaeaea; -} -table.dataTable.display tbody tr:hover > .sorting_2, -table.dataTable.display tbody tr.odd:hover > .sorting_2, -table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { - background-color: #ebebeb; -} -table.dataTable.display tbody tr:hover > .sorting_3, -table.dataTable.display tbody tr.odd:hover > .sorting_3, -table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, -table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, -table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { - background-color: #eeeeee; -} -table.dataTable.display tbody tr:hover.selected > .sorting_1, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, -table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { - background-color: #a1aec7; -} -table.dataTable.display tbody tr:hover.selected > .sorting_2, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, -table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { - background-color: #a2afc8; -} -table.dataTable.display tbody tr:hover.selected > .sorting_3, -table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, -table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, -table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, -table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { - background-color: #a4b2cb; +div.dataTables_processing > div:last-child > div { + position: absolute; + top: 0; + width: 13px; + height: 13px; + border-radius: 50%; + background: rgb(13, 110, 253); + background: rgb(var(--dt-row-selected)); + animation-timing-function: cubic-bezier(0, 1, 1, 0); +} +div.dataTables_processing > div:last-child > div:nth-child(1) { + left: 8px; + animation: datatables-loader-1 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(2) { + left: 8px; + animation: datatables-loader-2 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(3) { + left: 32px; + animation: datatables-loader-2 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(4) { + left: 56px; + animation: datatables-loader-3 0.6s infinite; } -table.dataTable.nowrap th, table.dataTable.nowrap td { - white-space: nowrap; + +@keyframes datatables-loader-1 { + 0% { + transform: scale(0); + } + 100% { + transform: scale(1); + } } -table.dataTable.compact thead th, -table.dataTable.compact thead td { - padding: 5px 9px; +@keyframes datatables-loader-3 { + 0% { + transform: scale(1); + } + 100% { + transform: scale(0); + } } -table.dataTable.compact tfoot th, -table.dataTable.compact tfoot td { - padding: 5px 9px 3px 9px; +@keyframes datatables-loader-2 { + 0% { + transform: translate(0, 0); + } + 100% { + transform: translate(24px, 0); + } } -table.dataTable.compact tbody th, -table.dataTable.compact tbody td { - padding: 4px 5px; +table.dataTable.nowrap th, table.dataTable.nowrap td { + white-space: nowrap; } table.dataTable th.dt-left, table.dataTable td.dt-left { @@ -237,6 +225,12 @@ table.dataTable th.dt-nowrap, table.dataTable td.dt-nowrap { white-space: nowrap; } +table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { + text-align: left; +} table.dataTable thead th.dt-head-left, table.dataTable thead td.dt-head-left, table.dataTable tfoot th.dt-head-left, @@ -288,11 +282,199 @@ table.dataTable tbody td.dt-body-nowrap { white-space: nowrap; } -table.dataTable, +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable > thead > tr > th, +table.dataTable > thead > tr > td { + padding: 10px; +} +table.dataTable > thead > tr > th:active, +table.dataTable > thead > tr > td:active { + outline: none; +} +table.dataTable > tfoot > tr > th, +table.dataTable > tfoot > tr > td { + padding: 10px 10px 6px 10px; +} +table.dataTable tbody tr { + background-color: transparent; +} +table.dataTable tbody tr.selected > * { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.9); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.9); + color: rgb(255, 255, 255); + color: rgb(var(--dt-row-selected-text)); +} +table.dataTable tbody tr.selected a { + color: rgb(9, 10, 11); + color: rgb(var(--dt-row-selected-link)); +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable.row-border > tbody > tr > th, +table.dataTable.row-border > tbody > tr > td, table.dataTable.display > tbody > tr > th, +table.dataTable.display > tbody > tr > td { + border-top: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.row-border > tbody > tr:first-child > th, +table.dataTable.row-border > tbody > tr:first-child > td, table.dataTable.display > tbody > tr:first-child > th, +table.dataTable.display > tbody > tr:first-child > td { + border-top: none; +} +table.dataTable.row-border > tbody > tr.selected + tr.selected > td, table.dataTable.display > tbody > tr.selected + tr.selected > td { + border-top-color: #0262ef; +} +table.dataTable.cell-border > tbody > tr > th, +table.dataTable.cell-border > tbody > tr > td { + border-top: 1px solid rgba(0, 0, 0, 0.15); + border-right: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.cell-border > tbody > tr > th:first-child, +table.dataTable.cell-border > tbody > tr > td:first-child { + border-left: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.cell-border > tbody > tr:first-child > th, +table.dataTable.cell-border > tbody > tr:first-child > td { + border-top: none; +} +table.dataTable.stripe > tbody > tr.odd > *, table.dataTable.display > tbody > tr.odd > * { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.023); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.023); +} +table.dataTable.stripe > tbody > tr.odd.selected > *, table.dataTable.display > tbody > tr.odd.selected > * { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.923); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.923); +} +table.dataTable.hover > tbody > tr:hover > *, table.dataTable.display > tbody > tr:hover > * { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.035); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.035); +} +table.dataTable.hover > tbody > tr.selected:hover > *, table.dataTable.display > tbody > tr.selected:hover > * { + box-shadow: inset 0 0 0 9999px #0d6efd !important; + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 1) !important; +} +table.dataTable.order-column > tbody tr > .sorting_1, +table.dataTable.order-column > tbody tr > .sorting_2, +table.dataTable.order-column > tbody tr > .sorting_3, table.dataTable.display > tbody tr > .sorting_1, +table.dataTable.display > tbody tr > .sorting_2, +table.dataTable.display > tbody tr > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.019); +} +table.dataTable.order-column > tbody tr.selected > .sorting_1, +table.dataTable.order-column > tbody tr.selected > .sorting_2, +table.dataTable.order-column > tbody tr.selected > .sorting_3, table.dataTable.display > tbody tr.selected > .sorting_1, +table.dataTable.display > tbody tr.selected > .sorting_2, +table.dataTable.display > tbody tr.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919); +} +table.dataTable.display > tbody > tr.odd > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.054); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.054); +} +table.dataTable.display > tbody > tr.odd > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.047); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.047); +} +table.dataTable.display > tbody > tr.odd > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.039); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.039); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.954); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.954); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.947); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.947); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.939); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.939); +} +table.dataTable.display > tbody > tr.even > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.019); +} +table.dataTable.display > tbody > tr.even > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.011); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.011); +} +table.dataTable.display > tbody > tr.even > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.003); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.003); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.911); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.911); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.903); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.903); +} +table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.082); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.082); +} +table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.074); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.074); +} +table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.062); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.062); +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.982); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.982); +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.974); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.974); +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.962); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.962); +} +table.dataTable.no-footer { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} +table.dataTable.compact thead th, +table.dataTable.compact thead td, +table.dataTable.compact tfoot th, +table.dataTable.compact tfoot td, +table.dataTable.compact tbody th, +table.dataTable.compact tbody td { + padding: 4px; +} + table.dataTable th, table.dataTable td { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; box-sizing: content-box; } @@ -302,96 +484,127 @@ table.dataTable td { .dataTables_wrapper { position: relative; clear: both; - *zoom: 1; - zoom: 1; } .dataTables_wrapper .dataTables_length { float: left; } +.dataTables_wrapper .dataTables_length select { + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + color: inherit; + padding: 4px; +} .dataTables_wrapper .dataTables_filter { float: right; text-align: right; } .dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + color: inherit; + margin-left: 3px; } .dataTables_wrapper .dataTables_info { clear: both; float: left; - padding-top: 0.55em; + padding-top: 0.755em; } .dataTables_wrapper .dataTables_paginate { float: right; text-align: right; + padding-top: 0.25em; } -.dataTables_wrapper .dataTables_paginate .fg-button { +.dataTables_wrapper .dataTables_paginate .paginate_button { box-sizing: border-box; display: inline-block; min-width: 1.5em; - padding: 0.5em; + padding: 0.5em 1em; margin-left: 2px; text-align: center; text-decoration: none !important; cursor: pointer; - *cursor: hand; - color: #333 !important; + color: inherit !important; border: 1px solid transparent; -} -.dataTables_wrapper .dataTables_paginate .fg-button:active { + border-radius: 2px; + background: transparent; +} +.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: inherit !important; + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(0, 0, 0, 0.05); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(230, 230, 230, 0.05)), color-stop(100%, rgba(0, 0, 0, 0.05))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* IE10+ */ + background: -o-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + cursor: default; + color: #666 !important; + border: 1px solid transparent; + background: transparent; + box-shadow: none; +} +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + color: white !important; + border: 1px solid #111; + background-color: #111; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #585858 0%, #111 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #585858 0%, #111 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #585858 0%, #111 100%); /* IE10+ */ + background: -o-linear-gradient(top, #585858 0%, #111 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, #585858 0%, #111 100%); /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button:active { outline: none; -} -.dataTables_wrapper .dataTables_paginate .fg-button:first-child { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.dataTables_wrapper .dataTables_paginate .fg-button:last-child { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.dataTables_wrapper .dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 40px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* IE10+ */ - background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Opera 11.10+ */ - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* W3C */ + background-color: #0c0c0c; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* IE10+ */ + background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); /* W3C */ + box-shadow: inset 0 0 3px #111; +} +.dataTables_wrapper .dataTables_paginate .ellipsis { + padding: 0 1em; } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { - color: #333; + color: inherit; } .dataTables_wrapper .dataTables_scroll { clear: both; } -.dataTables_wrapper .dataTables_scrollBody { - *margin-top: -1px; +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { -webkit-overflow-scrolling: touch; } -.dataTables_wrapper .ui-widget-header { - font-weight: normal; +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { + vertical-align: middle; } -.dataTables_wrapper .ui-toolbar { - padding: 8px; +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { + height: 0; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} +.dataTables_wrapper.no-footer .dataTables_scrollBody { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable, +.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { + border-bottom: none; } .dataTables_wrapper:after { visibility: hidden; @@ -402,99 +615,127 @@ table.dataTable td { } @media screen and (max-width: 767px) { - .dataTables_wrapper .dataTables_length, - .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { float: none; text-align: center; } - .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_paginate { margin-top: 0.5em; } } -/* - * TableTools styling for jQuery UI - */ -div.DTTT_container { - position: relative; - float: left; +@media screen and (max-width: 640px) { + .dataTables_wrapper .dataTables_length, + .dataTables_wrapper .dataTables_filter { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_filter { + margin-top: 0.5em; + } } - -.DTTT_button { - position: relative; - float: left; - margin-right: 3px; - padding: 3px 10px; - border: 1px solid #d0d0d0; - background-color: #fff; - color: #333; - cursor: pointer; +html.dark { + --dt-row-hover: 255, 255, 255; + --dt-row-stripe: 255, 255, 255; + --dt-column-ordering: 255, 255, 255; } - -.DTTT_button::-moz-focus-inner { - border: none !important; - padding: 0; +html.dark table.dataTable > thead > tr > th:active, +html.dark table.dataTable > thead > tr > td:active { + outline: none; } - -.DTTT_disabled { - color: #999; +html.dark table.dataTable.row-border > tbody > tr > th, +html.dark table.dataTable.row-border > tbody > tr > td, html.dark table.dataTable.display > tbody > tr > th, +html.dark table.dataTable.display > tbody > tr > td { + border-top: 1px solid rgb(64, 67, 70); } - -table.DTTT_selectable tbody tr { - cursor: pointer; +html.dark table.dataTable.row-border > tbody > tr.selected + tr.selected > td, html.dark table.dataTable.display > tbody > tr.selected + tr.selected > td { + border-top-color: #0257d5; } - -div.DTTT_collection { - width: 150px; - background-color: #f3f3f3; - overflow: hidden; - z-index: 2002; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); -} -div.DTTT_collection button.DTTT_button, -div.DTTT_collection div.DTTT_button, -div.DTTT_collection a.DTTT_button { - float: none; - width: 100%; - margin-bottom: -0.1em; +html.dark table.dataTable.cell-border > tbody > tr > th, +html.dark table.dataTable.cell-border > tbody > tr > td { + border-top: 1px solid rgb(64, 67, 70); + border-right: 1px solid rgb(64, 67, 70); } - -div.DTTT_collection_background { - background: black; - z-index: 2001; +html.dark table.dataTable.cell-border > tbody > tr > th:first-child, +html.dark table.dataTable.cell-border > tbody > tr > td:first-child { + border-left: 1px solid rgb(64, 67, 70); +} +html.dark .dataTables_wrapper .dataTables_filter input, +html.dark .dataTables_wrapper .dataTables_length select { + border: 1px solid rgba(255, 255, 255, 0.2); + background-color: var(--dt-html-background); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + border: 1px solid rgb(89, 91, 94); + background: rgba(255, 255, 255, 0.15); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: #666 !important; +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover { + border: 1px solid rgb(53, 53, 53); + background: rgb(53, 53, 53); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:active { + background: #3a3a3a; } -.DTTT_print_info { +table.dataTable thead th div.DataTables_sort_wrapper { + position: relative; +} +table.dataTable thead th div.DataTables_sort_wrapper span { position: absolute; top: 50%; - left: 50%; - width: 400px; - height: 150px; - margin-left: -200px; - margin-top: -75px; + margin-top: -8px; + right: -18px; +} +table.dataTable thead th.ui-state-default, +table.dataTable tfoot th.ui-state-default { + border-left-width: 0; +} +table.dataTable thead th.ui-state-default:first-child, +table.dataTable tfoot th.ui-state-default:first-child { + border-left-width: 1px; +} + +/* + * Control feature layout + */ +.dataTables_wrapper .dataTables_paginate .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; text-align: center; - background-color: #3f3f3f; - color: white; - padding: 10px 30px; - opacity: 0.9; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); -} -.DTTT_print_info .DTTT_print_info h6 { + text-decoration: none !important; + cursor: pointer; + border: 1px solid transparent; +} +.dataTables_wrapper .dataTables_paginate .fg-button:active { + outline: none; +} +.dataTables_wrapper .dataTables_paginate .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.dataTables_wrapper .dataTables_paginate .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.dataTables_wrapper .ui-widget-header { font-weight: normal; - font-size: 28px; - line-height: 28px; - margin: 1em; } -.DTTT_print_info .DTTT_print_info p { - font-size: 14px; - line-height: 20px; +.dataTables_wrapper .ui-toolbar { + padding: 8px; +} +.dataTables_wrapper.no-footer .dataTables_scrollBody { + border-bottom: none; +} +.dataTables_wrapper .dataTables_length, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: inherit; } diff --git a/game/static/game/css/game_screen.css b/game/static/game/css/game_screen.css index fbd61fa5c..549667581 100644 --- a/game/static/game/css/game_screen.css +++ b/game/static/game/css/game_screen.css @@ -349,6 +349,12 @@ button > svg { padding-right: 10px; } +.navigation_button_portal_secondary.long_button span { + text-align: left; + margin: 0; + width: 100%; +} + .long_button img + span { line-height: 30px; margin-left: 2px; diff --git a/game/static/game/css/jquery.dataTables.css b/game/static/game/css/jquery.dataTables.css index 58753a2bc..cc3dd8fd5 100644 --- a/game/static/game/css/jquery.dataTables.css +++ b/game/static/game/css/jquery.dataTables.css @@ -1,193 +1,176 @@ -/* - * Table styles - */ -table.dataTable { - width: 100%; - margin: 0 auto; - clear: both; - border-collapse: separate; - border-spacing: 0; - /* - * Header and footer styles - */ - /* - * Body styles - */ -} -table.dataTable thead th, -table.dataTable tfoot th { - font-weight: bold; -} -table.dataTable thead th, -table.dataTable thead td { - padding: 10px 18px; -} -table.dataTable thead th:active, -table.dataTable thead td:active { - outline: none; -} -table.dataTable tfoot th, -table.dataTable tfoot td { - padding: 10px 18px 6px 18px; - border-top: 1px solid #111; +@charset "UTF-8"; +:root { + --dt-row-selected: 13, 110, 253; + --dt-row-selected-text: 255, 255, 255; + --dt-row-selected-link: 9, 10, 11; + --dt-row-stripe: 0, 0, 0; + --dt-row-hover: 0, 0, 0; + --dt-column-ordering: 0, 0, 0; + --dt-html-background: white; +} +:root.dark { + --dt-html-background: rgb(33, 37, 41); } -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc { + +table.dataTable td.dt-control { + text-align: center; cursor: pointer; - *cursor: hand; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { - background-repeat: no-repeat; - background-position: center right; -} -table.dataTable thead .sorting { - background-image: url("../image/dataTables/sort_both.png"); -} -table.dataTable thead .sorting_asc { - background-image: url("../image/dataTables/sort_asc.png"); -} -table.dataTable thead .sorting_desc { - background-image: url("../image/dataTables/sort_desc.png"); -} -table.dataTable thead .sorting_asc_disabled { - background-image: url("../image/dataTables/sort_asc_disabled.png"); -} -table.dataTable thead .sorting_desc_disabled { - background-image: url("../image/dataTables/sort_desc_disabled.png"); -} -table.dataTable tbody tr { - background-color: #ffffff; -} -table.dataTable tbody tr.selected { - background-color: #B0BED9; -} -table.dataTable tbody th, -table.dataTable tbody td { - padding: 8px 10px; -} -table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { - border-top: 1px solid #ddd; -} -table.dataTable.row-border tbody tr:first-child th, -table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, -table.dataTable.display tbody tr:first-child td { - border-top: none; -} -table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr th:first-child, -table.dataTable.cell-border tbody tr td:first-child { - border-left: 1px solid #ddd; -} -table.dataTable.cell-border tbody tr:first-child th, -table.dataTable.cell-border tbody tr:first-child td { - border-top: none; } -table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { - background-color: #f9f9f9; -} -table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { - background-color: #abb9d3; -} -table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { - background-color: whitesmoke; -} -table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected { - background-color: #a9b7d1; -} -table.dataTable.order-column tbody tr > .sorting_1, -table.dataTable.order-column tbody tr > .sorting_2, -table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, -table.dataTable.display tbody tr > .sorting_2, -table.dataTable.display tbody tr > .sorting_3 { - background-color: #f9f9f9; -} -table.dataTable.order-column tbody tr.selected > .sorting_1, -table.dataTable.order-column tbody tr.selected > .sorting_2, -table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, -table.dataTable.display tbody tr.selected > .sorting_2, -table.dataTable.display tbody tr.selected > .sorting_3 { - background-color: #acbad4; -} -table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { - background-color: #f1f1f1; -} -table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { - background-color: #f3f3f3; -} -table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { - background-color: whitesmoke; -} -table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { - background-color: #a6b3cd; -} -table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { - background-color: #a7b5ce; +table.dataTable td.dt-control:before { + display: inline-block; + color: rgba(0, 0, 0, 0.5); + content: "►"; } -table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { - background-color: #a9b6d0; +table.dataTable tr.dt-hasChild td.dt-control:before { + content: "▼"; } -table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { - background-color: #f9f9f9; + +html.dark table.dataTable td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { - background-color: #fbfbfb; +html.dark table.dataTable tr.dt-hasChild td.dt-control:before { + color: rgba(255, 255, 255, 0.5); } -table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { - background-color: #fdfdfd; + +table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting_asc_disabled, table.dataTable thead > tr > th.sorting_desc_disabled, +table.dataTable thead > tr > td.sorting, +table.dataTable thead > tr > td.sorting_asc, +table.dataTable thead > tr > td.sorting_desc, +table.dataTable thead > tr > td.sorting_asc_disabled, +table.dataTable thead > tr > td.sorting_desc_disabled { + cursor: pointer; + position: relative; + padding-right: 26px; +} +table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting:before, +table.dataTable thead > tr > td.sorting:after, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_asc:after, +table.dataTable thead > tr > td.sorting_desc:before, +table.dataTable thead > tr > td.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_asc_disabled:after, +table.dataTable thead > tr > td.sorting_desc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:after { + position: absolute; + display: block; + opacity: 0.125; + right: 10px; + line-height: 9px; + font-size: 0.8em; +} +table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before, +table.dataTable thead > tr > td.sorting:before, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_desc:before, +table.dataTable thead > tr > td.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:before { + bottom: 50%; + content: "▲"; + content: "▲"/""; +} +table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting:after, +table.dataTable thead > tr > td.sorting_asc:after, +table.dataTable thead > tr > td.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc_disabled:after, +table.dataTable thead > tr > td.sorting_desc_disabled:after { + top: 50%; + content: "▼"; + content: "▼"/""; } -table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { - background-color: #acbad4; +table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after, +table.dataTable thead > tr > td.sorting_asc:before, +table.dataTable thead > tr > td.sorting_desc:after { + opacity: 0.6; } -table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { - background-color: #adbbd6; +table.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, +table.dataTable thead > tr > td.sorting_desc_disabled:after, +table.dataTable thead > tr > td.sorting_asc_disabled:before { + display: none; } -table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { - background-color: #afbdd8; +table.dataTable thead > tr > th:active, +table.dataTable thead > tr > td:active { + outline: none; } -table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { - background-color: #eaeaea; + +div.dataTables_scrollBody > table.dataTable > thead > tr > th:before, div.dataTables_scrollBody > table.dataTable > thead > tr > th:after, +div.dataTables_scrollBody > table.dataTable > thead > tr > td:before, +div.dataTables_scrollBody > table.dataTable > thead > tr > td:after { + display: none; } -table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { - background-color: #ebebeb; + +div.dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 200px; + margin-left: -100px; + margin-top: -26px; + text-align: center; + padding: 2px; } -table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { - background-color: #eeeeee; +div.dataTables_processing > div:last-child { + position: relative; + width: 80px; + height: 15px; + margin: 1em auto; } -table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { - background-color: #a1aec7; +div.dataTables_processing > div:last-child > div { + position: absolute; + top: 0; + width: 13px; + height: 13px; + border-radius: 50%; + background: rgb(13, 110, 253); + background: rgb(var(--dt-row-selected)); + animation-timing-function: cubic-bezier(0, 1, 1, 0); +} +div.dataTables_processing > div:last-child > div:nth-child(1) { + left: 8px; + animation: datatables-loader-1 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(2) { + left: 8px; + animation: datatables-loader-2 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(3) { + left: 32px; + animation: datatables-loader-2 0.6s infinite; +} +div.dataTables_processing > div:last-child > div:nth-child(4) { + left: 56px; + animation: datatables-loader-3 0.6s infinite; } -table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { - background-color: #a2afc8; + +@keyframes datatables-loader-1 { + 0% { + transform: scale(0); + } + 100% { + transform: scale(1); + } } -table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { - background-color: #a4b2cb; +@keyframes datatables-loader-3 { + 0% { + transform: scale(1); + } + 100% { + transform: scale(0); + } } -table.dataTable.no-footer { - border-bottom: 1px solid #111; +@keyframes datatables-loader-2 { + 0% { + transform: translate(0, 0); + } + 100% { + transform: translate(24px, 0); + } } table.dataTable.nowrap th, table.dataTable.nowrap td { white-space: nowrap; } -table.dataTable.compact thead th, -table.dataTable.compact thead td { - padding: 4px 17px 4px 4px; -} -table.dataTable.compact tfoot th, -table.dataTable.compact tfoot td { - padding: 4px; -} -table.dataTable.compact tbody th, -table.dataTable.compact tbody td { - padding: 4px; -} table.dataTable th.dt-left, table.dataTable td.dt-left { text-align: left; @@ -209,6 +192,12 @@ table.dataTable th.dt-nowrap, table.dataTable td.dt-nowrap { white-space: nowrap; } +table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { + text-align: left; +} table.dataTable thead th.dt-head-left, table.dataTable thead td.dt-head-left, table.dataTable tfoot th.dt-head-left, @@ -260,11 +249,201 @@ table.dataTable tbody td.dt-body-nowrap { white-space: nowrap; } -table.dataTable, +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable > thead > tr > th, +table.dataTable > thead > tr > td { + padding: 10px; + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} +table.dataTable > thead > tr > th:active, +table.dataTable > thead > tr > td:active { + outline: none; +} +table.dataTable > tfoot > tr > th, +table.dataTable > tfoot > tr > td { + padding: 10px 10px 6px 10px; + border-top: 1px solid rgba(0, 0, 0, 0.3); +} +table.dataTable tbody tr { + background-color: transparent; +} +table.dataTable tbody tr.selected > * { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.9); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.9); + color: rgb(255, 255, 255); + color: rgb(var(--dt-row-selected-text)); +} +table.dataTable tbody tr.selected a { + color: rgb(9, 10, 11); + color: rgb(var(--dt-row-selected-link)); +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable.row-border > tbody > tr > th, +table.dataTable.row-border > tbody > tr > td, table.dataTable.display > tbody > tr > th, +table.dataTable.display > tbody > tr > td { + border-top: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.row-border > tbody > tr:first-child > th, +table.dataTable.row-border > tbody > tr:first-child > td, table.dataTable.display > tbody > tr:first-child > th, +table.dataTable.display > tbody > tr:first-child > td { + border-top: none; +} +table.dataTable.row-border > tbody > tr.selected + tr.selected > td, table.dataTable.display > tbody > tr.selected + tr.selected > td { + border-top-color: #0262ef; +} +table.dataTable.cell-border > tbody > tr > th, +table.dataTable.cell-border > tbody > tr > td { + border-top: 1px solid rgba(0, 0, 0, 0.15); + border-right: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.cell-border > tbody > tr > th:first-child, +table.dataTable.cell-border > tbody > tr > td:first-child { + border-left: 1px solid rgba(0, 0, 0, 0.15); +} +table.dataTable.cell-border > tbody > tr:first-child > th, +table.dataTable.cell-border > tbody > tr:first-child > td { + border-top: none; +} +table.dataTable.stripe > tbody > tr.odd > *, table.dataTable.display > tbody > tr.odd > * { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.023); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.023); +} +table.dataTable.stripe > tbody > tr.odd.selected > *, table.dataTable.display > tbody > tr.odd.selected > * { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.923); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.923); +} +table.dataTable.hover > tbody > tr:hover > *, table.dataTable.display > tbody > tr:hover > * { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.035); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.035); +} +table.dataTable.hover > tbody > tr.selected:hover > *, table.dataTable.display > tbody > tr.selected:hover > * { + box-shadow: inset 0 0 0 9999px #0d6efd !important; + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 1) !important; +} +table.dataTable.order-column > tbody tr > .sorting_1, +table.dataTable.order-column > tbody tr > .sorting_2, +table.dataTable.order-column > tbody tr > .sorting_3, table.dataTable.display > tbody tr > .sorting_1, +table.dataTable.display > tbody tr > .sorting_2, +table.dataTable.display > tbody tr > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.019); +} +table.dataTable.order-column > tbody tr.selected > .sorting_1, +table.dataTable.order-column > tbody tr.selected > .sorting_2, +table.dataTable.order-column > tbody tr.selected > .sorting_3, table.dataTable.display > tbody tr.selected > .sorting_1, +table.dataTable.display > tbody tr.selected > .sorting_2, +table.dataTable.display > tbody tr.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919); +} +table.dataTable.display > tbody > tr.odd > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.054); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.054); +} +table.dataTable.display > tbody > tr.odd > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.047); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.047); +} +table.dataTable.display > tbody > tr.odd > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.039); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-column-ordering), 0.039); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.954); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.954); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.947); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.947); +} +table.dataTable.display > tbody > tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.939); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.939); +} +table.dataTable.display > tbody > tr.even > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.019); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.019); +} +table.dataTable.display > tbody > tr.even > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.011); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.011); +} +table.dataTable.display > tbody > tr.even > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.003); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.003); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.919); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_2, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.911); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.911); +} +table.dataTable.display > tbody > tr.even.selected > .sorting_3, table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.903); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.903); +} +table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.082); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.082); +} +table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.074); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.074); +} +table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.062); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.062); +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.982); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.982); +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.974); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.974); +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { + box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.962); + box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.962); +} +table.dataTable.no-footer { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} +table.dataTable.compact thead th, +table.dataTable.compact thead td, +table.dataTable.compact tfoot th, +table.dataTable.compact tfoot td, +table.dataTable.compact tbody th, +table.dataTable.compact tbody td { + padding: 4px; +} + table.dataTable th, table.dataTable td { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; box-sizing: content-box; } @@ -274,18 +453,29 @@ table.dataTable td { .dataTables_wrapper { position: relative; clear: both; - *zoom: 1; - zoom: 1; } .dataTables_wrapper .dataTables_length { float: left; } +.dataTables_wrapper .dataTables_length select { + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + color: inherit; + padding: 4px; +} .dataTables_wrapper .dataTables_filter { float: right; text-align: right; } .dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + color: inherit; + margin-left: 3px; } .dataTables_wrapper .dataTables_info { clear: both; @@ -295,7 +485,7 @@ table.dataTable td { .dataTables_wrapper .dataTables_paginate { float: right; text-align: right; - padding-top: 0.55em; + padding-top: 0.25em; } .dataTables_wrapper .dataTables_paginate .paginate_button { box-sizing: border-box; @@ -306,26 +496,21 @@ table.dataTable td { text-align: center; text-decoration: none !important; cursor: pointer; - *cursor: hand; - color: #333 !important; + color: inherit !important; border: 1px solid transparent; + border-radius: 2px; + background: transparent; } .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { - color: #333 !important; - border: 1px solid #cacaca; - background-color: white; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%); - /* IE10+ */ - background: -o-linear-gradient(top, white 0%, #dcdcdc 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, white 0%, #dcdcdc 100%); - /* W3C */ + color: inherit !important; + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(0, 0, 0, 0.05); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(230, 230, 230, 0.05)), color-stop(100%, rgba(0, 0, 0, 0.05))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* IE10+ */ + background: -o-linear-gradient(top, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, rgba(230, 230, 230, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); /* W3C */ } .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { cursor: default; @@ -337,91 +522,57 @@ table.dataTable td { .dataTables_wrapper .dataTables_paginate .paginate_button:hover { color: white !important; border: 1px solid #111; - background-color: #585858; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #585858 0%, #111 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #585858 0%, #111 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #585858 0%, #111 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #585858 0%, #111 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #585858 0%, #111 100%); - /* W3C */ + background-color: #111; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #585858 0%, #111 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #585858 0%, #111 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #585858 0%, #111 100%); /* IE10+ */ + background: -o-linear-gradient(top, #585858 0%, #111 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, #585858 0%, #111 100%); /* W3C */ } .dataTables_wrapper .dataTables_paginate .paginate_button:active { outline: none; - background-color: #2b2b2b; - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* IE10+ */ - background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); - /* Opera 11.10+ */ - background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); - /* W3C */ + background-color: #0c0c0c; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* IE10+ */ + background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); /* W3C */ box-shadow: inset 0 0 3px #111; } .dataTables_wrapper .dataTables_paginate .ellipsis { padding: 0 1em; } -.dataTables_wrapper .dataTables_processing { - position: absolute; - top: 50%; - left: 50%; - width: 100%; - height: 40px; - margin-left: -50%; - margin-top: -25px; - padding-top: 20px; - text-align: center; - font-size: 1.2em; - background-color: white; - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Chrome10+,Safari5.1+ */ - background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* FF3.6+ */ - background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* IE10+ */ - background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* Opera 11.10+ */ - background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); - /* W3C */ -} .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { - color: #333; + color: inherit; } .dataTables_wrapper .dataTables_scroll { clear: both; } .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { - *margin-top: -1px; -webkit-overflow-scrolling: touch; } -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing { +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { + vertical-align: middle; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { height: 0; overflow: hidden; margin: 0 !important; padding: 0 !important; } .dataTables_wrapper.no-footer .dataTables_scrollBody { - border-bottom: 1px solid #111; + border-bottom: 1px solid rgba(0, 0, 0, 0.3); } -.dataTables_wrapper.no-footer div.dataTables_scrollHead table, -.dataTables_wrapper.no-footer div.dataTables_scrollBody table { +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable, +.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { border-bottom: none; } .dataTables_wrapper:after { @@ -452,3 +603,56 @@ table.dataTable td { margin-top: 0.5em; } } +html.dark { + --dt-row-hover: 255, 255, 255; + --dt-row-stripe: 255, 255, 255; + --dt-column-ordering: 255, 255, 255; +} +html.dark table.dataTable > thead > tr > th, +html.dark table.dataTable > thead > tr > td { + border-bottom: 1px solid rgb(89, 91, 94); +} +html.dark table.dataTable > thead > tr > th:active, +html.dark table.dataTable > thead > tr > td:active { + outline: none; +} +html.dark table.dataTable > tfoot > tr > th, +html.dark table.dataTable > tfoot > tr > td { + border-top: 1px solid rgb(89, 91, 94); +} +html.dark table.dataTable.row-border > tbody > tr > th, +html.dark table.dataTable.row-border > tbody > tr > td, html.dark table.dataTable.display > tbody > tr > th, +html.dark table.dataTable.display > tbody > tr > td { + border-top: 1px solid rgb(64, 67, 70); +} +html.dark table.dataTable.row-border > tbody > tr.selected + tr.selected > td, html.dark table.dataTable.display > tbody > tr.selected + tr.selected > td { + border-top-color: #0257d5; +} +html.dark table.dataTable.cell-border > tbody > tr > th, +html.dark table.dataTable.cell-border > tbody > tr > td { + border-top: 1px solid rgb(64, 67, 70); + border-right: 1px solid rgb(64, 67, 70); +} +html.dark table.dataTable.cell-border > tbody > tr > th:first-child, +html.dark table.dataTable.cell-border > tbody > tr > td:first-child { + border-left: 1px solid rgb(64, 67, 70); +} +html.dark .dataTables_wrapper .dataTables_filter input, +html.dark .dataTables_wrapper .dataTables_length select { + border: 1px solid rgba(255, 255, 255, 0.2); + background-color: var(--dt-html-background); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + border: 1px solid rgb(89, 91, 94); + background: rgba(255, 255, 255, 0.15); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: #666 !important; +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover { + border: 1px solid rgb(53, 53, 53); + background: rgb(53, 53, 53); +} +html.dark .dataTables_wrapper .dataTables_paginate .paginate_button:active { + background: #3a3a3a; +} diff --git a/game/static/game/css/level_editor.css b/game/static/game/css/level_editor.css index 90de22f7b..094652f2b 100644 --- a/game/static/game/css/level_editor.css +++ b/game/static/game/css/level_editor.css @@ -95,6 +95,10 @@ input { text-align: center; } +.mode_panel.unselected{ + border-width: 0; +} + .mode_panel img { width: 70px; margin-left: 11px; diff --git a/game/static/game/css/level_selection.css b/game/static/game/css/level_selection.css index 1762dfdae..a0aefee4a 100644 --- a/game/static/game/css/level_selection.css +++ b/game/static/game/css/level_selection.css @@ -2,6 +2,10 @@ margin: 30px 0 20px 0; } +#episodes .panel-subintro { + margin: 20px 0 20px 0; +} + #episodes .panel-header { color: #fff; margin-bottom: 0; @@ -69,13 +73,13 @@ margin-left: 15px; } -#episodes .collapsed.episode_range_text::after { +#episodes .panel-header:not(.bg--loops-coming-soon) .collapsed.episode_range_text::after { content: "\e250"; font-family: "Glyphicons Halflings"; margin-left: 10px; } -#episodes .episode_range_text::after { +#episodes .panel-header:not(.bg--loops-coming-soon) .episode_range_text::after { content: "\e252"; font-family: "Glyphicons Halflings"; margin-left: 10px; diff --git a/game/static/game/js/blocklyCompiler.js b/game/static/game/js/blocklyCompiler.js index 459086a6b..f97ba4770 100644 --- a/game/static/game/js/blocklyCompiler.js +++ b/game/static/game/js/blocklyCompiler.js @@ -1,45 +1,73 @@ -'use strict'; +"use strict"; var ocargo = ocargo || {}; -ocargo.BlocklyCompiler = function() {}; +ocargo.BlocklyCompiler = function () {}; ocargo.BlocklyCompiler.prototype.procedureBindings = null; ocargo.BlocklyCompiler.prototype.procedures = null; ocargo.BlocklyCompiler.prototype.events = null; ocargo.BlocklyCompiler.prototype.program = null; -ocargo.BlocklyCompiler.prototype.compile = function() { +ocargo.BlocklyCompiler.prototype.compile = function () { this.compileProcedures(); + this.compileEvents(); this.compileProgram(); this.bindProcedureCalls(); - return this.program; + return this.program; }; -ocargo.BlocklyCompiler.prototype.compileProcedures = function() { - this.procedures = {}; - this.procedureBindings = []; +ocargo.BlocklyCompiler.prototype.compileProcedures = function () { + this.procedures = {}; + this.procedureBindings = []; - var procBlocks = ocargo.blocklyControl.procedureBlocks(); - for (var i = 0; i < procBlocks.length; i++) { - var block = procBlocks[i]; - var name = block.inputList[0].fieldRow[1].text_; - if (name === "") { - throw gettext_noop('Perhaps try looking at your \'define\' blocks?'); - } + var procBlocks = ocargo.blocklyControl.procedureBlocks(); + for (var i = 0; i < procBlocks.length; i++) { + var block = procBlocks[i]; + var name = block.inputList[0].fieldRow[1].text_; + if (name === "") { + throw gettext_noop("Perhaps try looking at your 'define' blocks?"); + } + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'define' blocks?"); + } + + if (!(name in this.procedures)) { + this.procedures[name] = new Procedure( + name, + this.createSequence(bodyBlock), + block + ); + } else { + throw gettext_noop( + "Perhaps try checking the names of your 'define' blocks?" + ); + } + } +}; + +ocargo.BlocklyCompiler.prototype.compileEvents = function() { + var newEvents = []; + + var eventBlocks = ocargo.blocklyControl.onEventDoBlocks(); + for (var i = 0; i < eventBlocks.length; i++) { + var block = eventBlocks[i]; + var condition = this.getCondition(block); var bodyBlock = block.inputList[1].connection.targetBlock(); if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'define\' blocks?'); + throw gettext_noop('Perhaps try looking at your \'event\' blocks?'); } - if (!(name in this.procedures)) { - this.procedures[name] = new Procedure(name, this.createSequence(bodyBlock),block); - } else { - throw gettext_noop('Perhaps try checking the names of your \'define\' blocks?'); - } + var conditionType = block.type; + + newEvents.push(new Event(condition, this.createSequence(bodyBlock), block, conditionType)); } + + this.events = newEvents; }; ocargo.BlocklyCompiler.prototype.compileProgram = function() { @@ -51,448 +79,608 @@ ocargo.BlocklyCompiler.prototype.compileProgram = function() { this.program.thread = thread; }; -ocargo.BlocklyCompiler.prototype.bindProcedureCalls = function() { - this.program.procedures = this.procedures; - for (var i = 0; i < this.procedureBindings.length; i++) { - var name = this.procedureBindings[i].name; - var call = this.procedureBindings[i].call; - - if (name in this.procedures) { - call.bind(this.procedures[name]); - } else { - throw gettext_noop('Perhaps try checking the names in your \'call\' blocks?'); - } +ocargo.BlocklyCompiler.prototype.bindProcedureCalls = function () { + this.program.procedures = this.procedures; + for (var i = 0; i < this.procedureBindings.length; i++) { + var name = this.procedureBindings[i].name; + var call = this.procedureBindings[i].call; + + if (name in this.procedures) { + call.bind(this.procedures[name]); + } else { + throw gettext_noop( + "Perhaps try checking the names in your 'call' blocks?" + ); } + } }; /** Instructions **/ // New completely custom repeat until and repeat while blocks -ocargo.BlocklyCompiler.prototype.createRepeatUntil = function(block) { - var conditionBlock = block.inputList[0].connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - var condition = this.getCondition(conditionBlock); - // negate condition for repeat until - condition = this.negateCondition(condition); +ocargo.BlocklyCompiler.prototype.createRepeatUntil = function (block) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + var condition = this.getCondition(conditionBlock); + // negate condition for repeat until + condition = this.negateCondition(condition); + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); +}; - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - return new While(condition, this.createSequence(bodyBlock), block); +ocargo.BlocklyCompiler.prototype.createRepeatWhile = function (block) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + var condition = this.getCondition(conditionBlock); + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); }; -ocargo.BlocklyCompiler.prototype.createRepeatWhile = function(block) { - var conditionBlock = block.inputList[0].connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - var condition = this.getCondition(conditionBlock); +ocargo.BlocklyCompiler.prototype.createProcedureCall = function (block) { + var name = block.inputList[0].fieldRow[2].text_; + if (name === "") { + throw gettext_noop("Perhaps try checking the names in your 'call' blocks?"); + } - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - return new While(condition, this.createSequence(bodyBlock), block); + var procCall = new ProcedureCall(block); + this.procedureBindings.push({ call: procCall, name: name }); + return procCall; }; -ocargo.BlocklyCompiler.prototype.createProcedureCall = function(block) { - var name = block.inputList[0].fieldRow[2].text_; - if (name === "") { - throw gettext_noop('Perhaps try checking the names in your \'call\' blocks?'); - } +ocargo.BlocklyCompiler.prototype.createVariable = function (block) { + var variableName = block.inputList[0].fieldRow[1].text_; + if (variableName === "") { + throw gettext_noop( + "Perhaps try checking the names in your 'set variable' blocks?" + ); + } + + var self = this; + var variableValueFunction = function () { + return self.getValue(block.inputList[0].connection.targetBlock()); + }; - var procCall = new ProcedureCall(block); - this.procedureBindings.push({call:procCall,name:name}); - return procCall; + return new SetVariableCommand(block, variableName, variableValueFunction); }; -ocargo.BlocklyCompiler.prototype.createRepeat = function(block) { - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); +ocargo.BlocklyCompiler.prototype.createVariableNumeric = function (block) { + var variableName = block.inputList[0].fieldRow[1].text_; + if (variableName === "") { + throw gettext_noop( + "Perhaps try checking the names in your 'set variable' blocks?" + ); + } + + var variableValueFunction = function () { + var variableValue = parseInt(block.getFieldValue("VALUE")); + if (variableValue === "") { + throw gettext_noop( + "Perhaps try checking the values in your 'set variable' blocks?" + ); } - return new While( - this.counterCondition(block, parseInt(block.inputList[0].fieldRow[1].text_)), - this.createSequence(bodyBlock), - block); + return variableValue; + }; + + return new SetVariableCommand(block, variableName, variableValueFunction); +}; + +ocargo.BlocklyCompiler.prototype.incrementVariable = function (block) { + var variableName = block.inputList[0].fieldRow[1].text_; + if (variableName === "") { + throw gettext_noop( + "Perhaps try checking the names in your 'increment variable' blocks?" + ); + } + + var variableIncrValue = parseInt(block.getFieldValue("VALUE")); + if (variableIncrValue === "") { + throw gettext_noop( + "Perhaps try checking the values in your 'increment variable' blocks?" + ); + } + + return new IncrementVariableCommand(block, variableName, variableIncrValue); +}; + +ocargo.BlocklyCompiler.prototype.createRepeat = function (block) { + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While( + this.counterCondition( + block, + parseInt(block.inputList[0].fieldRow[1].text_) + ), + this.createSequence(bodyBlock), + block + ); +}; + +ocargo.BlocklyCompiler.prototype.createWhileUntil = function (block) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + var condition = this.getCondition(conditionBlock); + if (block.inputList[0].fieldRow[1].value_ == "UNTIL") { + condition = this.negateCondition(condition); + } + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); +}; + +ocargo.BlocklyCompiler.prototype.getCondition = function (conditionBlock) { + if (conditionBlock.type === "road_exists") { + var selection = conditionBlock.inputList[0].fieldRow[1].value_; + return this.roadCondition(conditionBlock, selection); + } else if (conditionBlock.type === "dead_end") { + return this.deadEndCondition(conditionBlock); + } else if (conditionBlock.type === "at_destination") { + return this.atDestinationCondition(conditionBlock); + } else if (conditionBlock.type === "logic_negate") { + return this.negateCondition( + this.getCondition(conditionBlock.inputList[0].connection.targetBlock()) + ); + } else if (conditionBlock.type === "traffic_light") { + return this.trafficLightCondition(conditionBlock); + } else if (conditionBlock.type === "cow_crossing") { + return this.cowCrossingCondition(conditionBlock); + } else if (conditionBlock.type === "logic_compare") { + return this.logicCompareCondition(conditionBlock); + } }; -ocargo.BlocklyCompiler.prototype.createWhileUntil = function(block) { - var conditionBlock = block.inputList[0].connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); +ocargo.BlocklyCompiler.prototype.getValue = function (block) { + if (block.type === "variables_get") { + var variableName = block.inputList[0].fieldRow[0].text_; + return parseInt(this.program.variables[variableName]); + } else if (block.type === "math_number") { + return parseInt(block.getFieldValue("NUM")); + } else if (block.type === "math_arithmetic") { + var leftBlock = block.inputList[0].connection.targetBlock(); + var rightBlock = block.inputList[1].connection.targetBlock(); + if (leftBlock === null || rightBlock === null) { + throw gettext_noop( + "Perhaps try looking at your 'math arithmetic' blocks?" + ); } - var condition = this.getCondition(conditionBlock); - if (block.inputList[0].fieldRow[1].value_ == 'UNTIL') { - condition = this.negateCondition(condition); - } - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); + var operator = block.getFieldValue("OP"); + var leftValue = this.getValue(leftBlock); + var rightValue = this.getValue(rightBlock); + + if (operator == "ADD") { + return leftValue + rightValue; + } else if (operator == "MINUS") { + return leftValue - rightValue; + } else if (operator == "MULTIPLY") { + return leftValue * rightValue; + } else if (operator == "DIVIDE") { + return leftValue / rightValue; + } else if (operator == "POWER") { + return leftValue ** rightValue; } - return new While(condition, this.createSequence(bodyBlock), block); -}; - -ocargo.BlocklyCompiler.prototype.getCondition = function(conditionBlock) { - if (conditionBlock.type === 'road_exists') { - var selection = conditionBlock.inputList[0].fieldRow[1].value_; - return this.roadCondition(conditionBlock, selection); - } else if (conditionBlock.type === 'dead_end') { - return this.deadEndCondition(conditionBlock); - } else if (conditionBlock.type === 'at_destination') { - return this.atDestinationCondition(conditionBlock); - } else if (conditionBlock.type === 'logic_negate') { - return this.negateCondition( - this.getCondition(conditionBlock.inputList[0].connection.targetBlock())); - } else if (conditionBlock.type === 'traffic_light') { - return this.trafficLightCondition(conditionBlock); - } else if (conditionBlock.type === 'cow_crossing') { - return this.cowCrossingCondition(conditionBlock); + } +}; + +ocargo.BlocklyCompiler.prototype.createIf = function (block) { + var conditionalCommandSets = []; + + var elseCount = block.elseCount_ || 0; + var i = 0; + while (i < block.inputList.length - elseCount) { + var input = block.inputList[i]; + var condition; + + if (input.name.indexOf("IF") === 0) { + var conditionBlock = input.connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'if' blocks?"); + } + condition = this.getCondition(conditionBlock); + } else if (input.name.indexOf("DO") === 0) { + var conditionalCommandSet = {}; + conditionalCommandSet.condition = condition; + conditionalCommandSet.commands = this.createSequence( + input.connection.targetBlock() + ); + conditionalCommandSets.push(conditionalCommandSet); } + + i++; + } + + if (elseCount === 1) { + var elseBody = this.createSequence( + block.inputList[block.inputList.length - 1].connection.targetBlock() + ); + } + + return new If(conditionalCommandSets, elseBody, block); }; -ocargo.BlocklyCompiler.prototype.createIf = function(block) { - var conditionalCommandSets = []; - - var elseCount = block.elseCount_ || 0; - var i = 0; - while (i < block.inputList.length - elseCount) { - var input = block.inputList[i]; - var condition; - - if (input.name.indexOf('IF') === 0) { - var conditionBlock = input.connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'if\' blocks?'); - } - condition = this.getCondition(conditionBlock); - } else if (input.name.indexOf('DO') === 0) { - var conditionalCommandSet = {}; - conditionalCommandSet.condition = condition; - conditionalCommandSet.commands = this.createSequence(input.connection.targetBlock()); - conditionalCommandSets.push(conditionalCommandSet); - } - - i++; - } - - if (elseCount === 1) { - var elseBody = this.createSequence( - block.inputList[block.inputList.length - 1].connection.targetBlock()); - } - - return new If(conditionalCommandSets, elseBody, block); -}; - -ocargo.BlocklyCompiler.prototype.createSequence = function(block) { - var commands = []; - - while (block) { - if (block.type === 'move_forwards') { - commands.push(new ForwardCommand(block)); - } else if (block.type === 'turn_left') { - commands.push(new TurnLeftCommand(block)); - } else if (block.type === 'turn_right') { - commands.push(new TurnRightCommand(block)); - } else if (block.type === 'turn_around') { - commands.push(new TurnAroundCommand(block)); - } else if (block.type === 'wait') { - commands.push(new WaitCommand(block)); - } else if (block.type === 'deliver') { - commands.push(new DeliverCommand(block)); - } else if (block.type === 'sound_horn') { - commands.push(new SoundHornCommand(block)); - } else if (block.type === 'controls_repeat_until') { - commands.push(this.createRepeatUntil(block)); - } else if (block.type === 'controls_repeat_while') { - commands.push(this.createRepeatWhile(block)); - } else if (block.type === 'controls_repeat') { - commands.push(this.createRepeat(block)); - } else if (block.type === 'controls_whileUntil') { - commands.push(this.createWhileUntil(block)); - } else if (block.type === 'controls_if') { - commands.push(this.createIf(block)); - } else if (block.type === 'call_proc') { - commands.push(this.createProcedureCall(block)); - } +ocargo.BlocklyCompiler.prototype.createSequence = function (block) { + var commands = []; + + while (block) { + if (block.type === "move_forwards") { + commands.push(new ForwardCommand(block)); + } else if (block.type === "turn_left") { + commands.push(new TurnLeftCommand(block)); + } else if (block.type === "turn_right") { + commands.push(new TurnRightCommand(block)); + } else if (block.type === "turn_around") { + commands.push(new TurnAroundCommand(block)); + } else if (block.type === "wait") { + commands.push(new WaitCommand(block)); + } else if (block.type === "deliver") { + commands.push(new DeliverCommand(block)); + } else if (block.type === "sound_horn") { + commands.push(new SoundHornCommand(block)); + } else if (block.type === "controls_repeat_until") { + commands.push(this.createRepeatUntil(block)); + } else if (block.type === "controls_repeat_while") { + commands.push(this.createRepeatWhile(block)); + } else if (block.type === "controls_repeat") { + commands.push(this.createRepeat(block)); + } else if (block.type === "controls_whileUntil") { + commands.push(this.createWhileUntil(block)); + } else if (block.type === "controls_if") { + commands.push(this.createIf(block)); + } else if (block.type === "call_proc") { + commands.push(this.createProcedureCall(block)); + } else if (block.type === "variables_set") { + commands.push(this.createVariable(block)); + } else if (block.type === "variables_numeric_set") { + commands.push(this.createVariableNumeric(block)); + } else if (block.type === "variables_increment") { + commands.push(this.incrementVariable(block)); + } - block = block.nextConnection ? block.nextConnection.targetBlock() : null; - } + block = block.nextConnection ? block.nextConnection.targetBlock() : null; + } - return commands; + return commands; }; -ocargo.BlocklyCompiler.prototype.simplifyBlock = function(block){ - return new Block(block.id, block.type); +ocargo.BlocklyCompiler.prototype.simplifyBlock = function (block) { + return new Block(block.id, block.type); }; /** Conditions **/ -ocargo.BlocklyCompiler.prototype.trafficLightCondition = function(block) { - var lightColour = block.getFieldValue('CHOICE'); - return function(model) { - queueHighlight(model, block); - if (lightColour === ocargo.TrafficLight.RED) { - return model.isTrafficLightRed(); - } - else if (lightColour === ocargo.TrafficLight.GREEN) { - return model.isTrafficLightGreen(); - } - }; -}; - -ocargo.BlocklyCompiler.prototype.roadCondition = function(block, selection) { - return function(model) { - queueHighlight(model, block); - if (selection === 'FORWARD') { - return model.isRoadForward(); - } else if (selection === 'LEFT') { - return model.isRoadLeft(); - } else if (selection === 'RIGHT') { - return model.isRoadRight(); - } - }; +ocargo.BlocklyCompiler.prototype.trafficLightCondition = function (block) { + var lightColour = block.getFieldValue("CHOICE"); + return function (model) { + queueHighlight(model, block); + if (lightColour === ocargo.TrafficLight.RED) { + return model.isTrafficLightRed(); + } else if (lightColour === ocargo.TrafficLight.GREEN) { + return model.isTrafficLightGreen(); + } + }; }; -ocargo.BlocklyCompiler.prototype.deadEndCondition = function(block) { - return function(model) { - queueHighlight(model, block); - return model.isDeadEnd(); - }; +ocargo.BlocklyCompiler.prototype.roadCondition = function (block, selection) { + return function (model) { + queueHighlight(model, block); + if (selection === "FORWARD") { + return model.isRoadForward(); + } else if (selection === "LEFT") { + return model.isRoadLeft(); + } else if (selection === "RIGHT") { + return model.isRoadRight(); + } + }; }; -ocargo.BlocklyCompiler.prototype.cowCrossingCondition = function(block) { - return function(model) { - queueHighlight(model, block); - return model.isCowCrossing(block.getFieldValue('TYPE')); - }; +ocargo.BlocklyCompiler.prototype.deadEndCondition = function (block) { + return function (model) { + queueHighlight(model, block); + return model.isDeadEnd(); + }; }; +ocargo.BlocklyCompiler.prototype.cowCrossingCondition = function (block) { + return function (model) { + queueHighlight(model, block); + return model.isCowCrossing(block.getFieldValue("TYPE")); + }; +}; -ocargo.BlocklyCompiler.prototype.negateCondition = function(otherCondition) { - return function(model) { - return !otherCondition(model); - }; +ocargo.BlocklyCompiler.prototype.negateCondition = function (otherCondition) { + return function (model) { + return !otherCondition(model); + }; }; -ocargo.BlocklyCompiler.prototype.atDestinationCondition = function(block) { - return function(model) { - queueHighlight(model, block); - return model.isAtADestination(); - }; +ocargo.BlocklyCompiler.prototype.atDestinationCondition = function (block) { + return function (model) { + queueHighlight(model, block); + return model.isAtADestination(); + }; }; -ocargo.BlocklyCompiler.prototype.counterCondition = function(block, count) { - var startCount = count; - return function(model) { - queueHighlight(model, block); - if (count > 0) { - count--; - return true; - } - // Resets the counter for nested loops - count = startCount; - return false; - }; +ocargo.BlocklyCompiler.prototype.counterCondition = function (block, count) { + var startCount = count; + return function (model) { + queueHighlight(model, block); + if (count > 0) { + count--; + return true; + } + // Resets the counter for nested loops + count = startCount; + return false; + }; +}; + +ocargo.BlocklyCompiler.prototype.logicCompareCondition = function (block) { + // check left and right blocks + var leftBlock = block.inputList[0].connection.targetBlock(); + var rightBlock = block.inputList[1].connection.targetBlock(); + if (leftBlock === null || rightBlock === null) { + throw gettext_noop("Perhaps try looking at your 'compare' blocks?"); + } + + var operator = block.getFieldValue("OP"); + var self = this; + + return function (model) { + queueHighlight(model, block); + + // get values of left and right blocks - must be evaluated on each step because of variables + var leftValue = self.getValue(leftBlock); + var rightValue = self.getValue(rightBlock); + + if (operator == "EQ") { + return leftValue === rightValue; + } else if (operator == "NEQ") { + return leftValue !== rightValue; + } else if (operator == "LT") { + return leftValue < rightValue; + } else if (operator == "LTE") { + return leftValue <= rightValue; + } else if (operator == "GT") { + return leftValue > rightValue; + } else if (operator == "GTE") { + return leftValue >= rightValue; + } + }; }; /** Mobile Code **/ /* Block types in the list passed in from mobile are converted to simplified Block objects id is assigned to each block in the order it appears in the array */ -ocargo.BlocklyCompiler.prototype.mobileCompile = function(types) { - var blocks = []; - for (var i = 0 ; i < types.length ; i++ ){ - blocks.push(new Block(i+1, types[i])); - } +ocargo.BlocklyCompiler.prototype.mobileCompile = function (types) { + var blocks = []; + for (var i = 0; i < types.length; i++) { + blocks.push(new Block(i + 1, types[i])); + } + + this.program = new ocargo.Program([]); + var thread = new ocargo.Thread(this.program); + thread.stack = this.mobileCreateSequence(blocks); + this.program.thread = thread; + return this.program; +}; - this.program = new ocargo.Program([]); - var thread = new ocargo.Thread(this.program); - thread.stack = this.mobileCreateSequence(blocks); - this.program.thread = thread; - return this.program; -}; - -ocargo.BlocklyCompiler.prototype.mobileCreateSequence = function(blocks) { - var commands = []; - - var block = blocks.shift(); - while (block) { - if (block.type === 'move_forwards') { - commands.push(new ForwardCommand(block)); - } else if (block.type === 'turn_left') { - commands.push(new TurnLeftCommand(block)); - } else if (block.type === 'turn_right') { - commands.push(new TurnRightCommand(block)); - } else if (block.type === 'turn_around') { - commands.push(new TurnAroundCommand(block)); - } else if (block.type === 'wait') { - commands.push(new WaitCommand(block)); - } else if (block.type === 'deliver') { - commands.push(new DeliverCommand(block)); - } - //} else if (block.type === 'controls_repeat_until') { - // commands.push(this.mobileCreateRepeatUntil(block)); - //} else if (block.type === 'controls_repeat_while') { - // commands.push(this.mobileCreateRepeatWhile(block)); - //} else if (block.type === 'controls_repeat') { - // commands.push(this.mobileCreateRepeat(block)); - //} else if (block.type === 'controls_whileUntil') { - // commands.push(this.mobileCreateWhileUntil(block)); - //} else if (block.type === 'controls_if') { - // commands.push(this.mobileCreateIf(block)); - //} else if (block.type === 'call_proc') { - // commands.push(this.mobileCreateProcedureCall(block)); - //} - - block = blocks.shift(); +ocargo.BlocklyCompiler.prototype.mobileCreateSequence = function (blocks) { + var commands = []; + + var block = blocks.shift(); + while (block) { + if (block.type === "move_forwards") { + commands.push(new ForwardCommand(block)); + } else if (block.type === "turn_left") { + commands.push(new TurnLeftCommand(block)); + } else if (block.type === "turn_right") { + commands.push(new TurnRightCommand(block)); + } else if (block.type === "turn_around") { + commands.push(new TurnAroundCommand(block)); + } else if (block.type === "wait") { + commands.push(new WaitCommand(block)); + } else if (block.type === "deliver") { + commands.push(new DeliverCommand(block)); } - - return commands; + //} else if (block.type === 'controls_repeat_until') { + // commands.push(this.mobileCreateRepeatUntil(block)); + //} else if (block.type === 'controls_repeat_while') { + // commands.push(this.mobileCreateRepeatWhile(block)); + //} else if (block.type === 'controls_repeat') { + // commands.push(this.mobileCreateRepeat(block)); + //} else if (block.type === 'controls_whileUntil') { + // commands.push(this.mobileCreateWhileUntil(block)); + //} else if (block.type === 'controls_if') { + // commands.push(this.mobileCreateIf(block)); + //} else if (block.type === 'call_proc') { + // commands.push(this.mobileCreateProcedureCall(block)); + //} + + block = blocks.shift(); + } + + return commands; }; /** Instructions **/ // New completely custom repeat until and repeat while blocks -ocargo.BlocklyCompiler.prototype.mobileCreateRepeatUntil = function(block, conditionBlock) { - var condition; - if (conditionBlock === null || (condition = this.mobileGetCondition(conditionBlock)) === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } +ocargo.BlocklyCompiler.prototype.mobileCreateRepeatUntil = function ( + block, + conditionBlock +) { + var condition; + if ( + conditionBlock === null || + (condition = this.mobileGetCondition(conditionBlock)) === null + ) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + + // negate condition for repeat until + condition = this.negateCondition(condition); + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); +}; - // negate condition for repeat until - condition = this.negateCondition(condition); +ocargo.BlocklyCompiler.prototype.mobileCreateRepeatWhile = function (block) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + var condition = this.getCondition(conditionBlock); + + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); +}; - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - return new While(condition, this.createSequence(bodyBlock), block); +ocargo.BlocklyCompiler.prototype.mobileCreateRepeat = function (block) { + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While( + this.counterCondition( + block, + parseInt(block.inputList[0].fieldRow[1].text_) + ), + this.createSequence(bodyBlock), + block + ); }; -ocargo.BlocklyCompiler.prototype.mobileCreateRepeatWhile = function(block) { - var conditionBlock = block.inputList[0].connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - var condition = this.getCondition(conditionBlock); +ocargo.BlocklyCompiler.prototype.mobileCreateWhileUntil = function (block) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + var condition = this.getCondition(conditionBlock); + if (block.inputList[0].fieldRow[1].value_ == "UNTIL") { + condition = this.negateCondition(condition); + } - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - return new While(condition, this.createSequence(bodyBlock), block); + var bodyBlock = block.inputList[1].connection.targetBlock(); + if (bodyBlock === null) { + throw gettext_noop("Perhaps try looking at your 'repeat' blocks?"); + } + return new While(condition, this.createSequence(bodyBlock), block); }; -ocargo.BlocklyCompiler.prototype.mobileCreateRepeat = function(block) { - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - return new While( - this.counterCondition(block, parseInt(block.inputList[0].fieldRow[1].text_)), - this.createSequence(bodyBlock), - block); -}; +ocargo.BlocklyCompiler.prototype.mobileCreateIf = function (block) { + var conditionalCommandSets = []; -ocargo.BlocklyCompiler.prototype.mobileCreateWhileUntil = function(block) { - var conditionBlock = block.inputList[0].connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); - } - var condition = this.getCondition(conditionBlock); - if (block.inputList[0].fieldRow[1].value_ == 'UNTIL') { - condition = this.negateCondition(condition); - } + var elseCount = block.elseCount_ || 0; + var i = 0; + while (i < block.inputList.length - elseCount) { + var input = block.inputList[i]; + var condition; - var bodyBlock = block.inputList[1].connection.targetBlock(); - if (bodyBlock === null) { - throw gettext_noop('Perhaps try looking at your \'repeat\' blocks?'); + if (input.name.indexOf("IF") === 0) { + var conditionBlock = input.connection.targetBlock(); + if (conditionBlock === null) { + throw gettext_noop("Perhaps try looking at your 'if' blocks?"); + } + condition = this.getCondition(conditionBlock); + } else if (input.name.indexOf("DO") === 0) { + var conditionalCommandSet = {}; + conditionalCommandSet.condition = condition; + conditionalCommandSet.commands = this.createSequence( + input.connection.targetBlock() + ); + conditionalCommandSets.push(conditionalCommandSet); } - return new While(condition, this.createSequence(bodyBlock), block); -}; - -ocargo.BlocklyCompiler.prototype.mobileCreateIf = function(block) { - var conditionalCommandSets = []; - - var elseCount = block.elseCount_ || 0; - var i = 0; - while (i < block.inputList.length - elseCount) { - var input = block.inputList[i]; - var condition; - - if (input.name.indexOf('IF') === 0) { - var conditionBlock = input.connection.targetBlock(); - if (conditionBlock === null) { - throw gettext_noop('Perhaps try looking at your \'if\' blocks?'); - } - condition = this.getCondition(conditionBlock); - } else if (input.name.indexOf('DO') === 0) { - var conditionalCommandSet = {}; - conditionalCommandSet.condition = condition; - conditionalCommandSet.commands = this.createSequence(input.connection.targetBlock()); - conditionalCommandSets.push(conditionalCommandSet); - } - i++; - } + i++; + } - if (elseCount === 1) { - var elseBody = this.createSequence( - block.inputList[block.inputList.length - 1].connection.targetBlock()); - } + if (elseCount === 1) { + var elseBody = this.createSequence( + block.inputList[block.inputList.length - 1].connection.targetBlock() + ); + } - return new If(conditionalCommandSets, elseBody, block); + return new If(conditionalCommandSets, elseBody, block); }; -ocargo.BlocklyCompiler.prototype.mobileCreateProcedureCall = function(block) { - var name = block.inputList[0].fieldRow[2].text_; - if (name === "") { - throw gettext_noop('Perhaps try checking the names in your \'call\' blocks?'); - } +ocargo.BlocklyCompiler.prototype.mobileCreateProcedureCall = function (block) { + var name = block.inputList[0].fieldRow[2].text_; + if (name === "") { + throw gettext_noop("Perhaps try checking the names in your 'call' blocks?"); + } - var procCall = new ProcedureCall(block); - this.procedureBindings.push({call:procCall,name:name}); - return procCall; -}; - -ocargo.BlocklyCompiler.prototype.mobileGetCondition = function(conditionBlock) { - if (conditionBlock.type === 'road_exists') { - var selection = conditionBlock.inputList[0].fieldRow[1].value_; - return this.roadCondition(conditionBlock, selection); - } else if (conditionBlock.type === 'dead_end') { - return this.deadEndCondition(conditionBlock); - } else if (conditionBlock.type === 'at_destination') { - return this.atDestinationCondition(conditionBlock); - } else if (conditionBlock.type === 'logic_negate') { - return this.negateCondition( - this.getCondition(conditionBlock.inputList[0].connection.targetBlock())); - } else if (conditionBlock.type === 'traffic_light') { - return this.trafficLightCondition(conditionBlock); - } else{ - return null; - } + var procCall = new ProcedureCall(block); + this.procedureBindings.push({ call: procCall, name: name }); + return procCall; +}; + +ocargo.BlocklyCompiler.prototype.mobileGetCondition = function ( + conditionBlock +) { + if (conditionBlock.type === "road_exists") { + var selection = conditionBlock.inputList[0].fieldRow[1].value_; + return this.roadCondition(conditionBlock, selection); + } else if (conditionBlock.type === "dead_end") { + return this.deadEndCondition(conditionBlock); + } else if (conditionBlock.type === "at_destination") { + return this.atDestinationCondition(conditionBlock); + } else if (conditionBlock.type === "logic_negate") { + return this.negateCondition( + this.getCondition(conditionBlock.inputList[0].connection.targetBlock()) + ); + } else if (conditionBlock.type === "traffic_light") { + return this.trafficLightCondition(conditionBlock); + } else { + return null; + } }; -ocargo.BlocklyCompiler.prototype.workspaceToPython = function() { - Blockly.Python.variableDB_.reset(); +ocargo.BlocklyCompiler.prototype.workspaceToPython = function () { + Blockly.Python.variableDB_.reset(); - var procBlocks = ocargo.blocklyControl.procedureBlocks(); + var procBlocks = ocargo.blocklyControl.procedureBlocks(); - var code = ""; + var code = ""; - for (var i = 0; i < procBlocks.length; i++) { - code += '\n' + Blockly.Python.blockToCode(procBlocks[i]); - } + for (var i = 0; i < procBlocks.length; i++) { + code += "\n" + Blockly.Python.blockToCode(procBlocks[i]); + } + + // TODO support events in python + //var eventBlocks = ocargo.blocklyControl.onEventDoBlocks(); + //for (var i = 0; i < eventBlocks.length; i++) { + // code += '\n' + Blockly.Python.blockToCode(eventBlocks[i]); + //} - var startBlock = ocargo.blocklyControl.startBlock(); - code += '\n' + Blockly.Python.blockToCode(startBlock); + var startBlock = ocargo.blocklyControl.startBlock(); + code += "\n" + Blockly.Python.blockToCode(startBlock); - return code; + return code; }; diff --git a/game/static/game/js/blocklyControl.js b/game/static/game/js/blocklyControl.js index 547f7651c..4e3cc28a7 100644 --- a/game/static/game/js/blocklyControl.js +++ b/game/static/game/js/blocklyControl.js @@ -1,26 +1,26 @@ -'use strict'; +"use strict"; var ocargo = ocargo || {}; ocargo.BlocklyControl = function () { - this.blocklyCustomisations = new ocargo.BlocklyCustomisations(); - this.blocklyCustomisations.setupDoubleclick(); - this.blocklyCustomisations.setupLimitedBlocks(); - this.blocklyDiv = document.getElementById('blockly_holder'); - this.toolbox = document.getElementById('blockly_toolbox'); - Blockly.inject(this.blocklyDiv, { - path: '/static/game/js/blockly/', - toolbox: BLOCKLY_XML, - trashcan: true, - scrollbars: true, - maxInstances: maxInstances - }); - - // Stop the flyout from closing automatically - Blockly.Flyout.autoClose = false; - - this.blocklyCustomisations.addLimitedBlockListeners(Blockly.mainWorkspace); - this.blocklyCustomisations.addClickListenerToStartBlock(); + this.blocklyCustomisations = new ocargo.BlocklyCustomisations(); + this.blocklyCustomisations.setupDoubleclick(); + this.blocklyCustomisations.setupLimitedBlocks(); + this.blocklyDiv = document.getElementById("blockly_holder"); + this.toolbox = document.getElementById("blockly_toolbox"); + Blockly.inject(this.blocklyDiv, { + path: "/static/game/js/blockly/", + toolbox: BLOCKLY_XML, + trashcan: true, + scrollbars: true, + maxInstances: maxInstances, + }); + + // Stop the flyout from closing automatically + Blockly.Flyout.autoClose = false; + + this.blocklyCustomisations.addLimitedBlockListeners(Blockly.mainWorkspace); + this.blocklyCustomisations.addClickListenerToStartBlock(); }; ocargo.BlocklyControl.BLOCK_HEIGHT = 20; @@ -33,166 +33,175 @@ ocargo.BlocklyControl.BLOCK_CHARACTER_WIDTH = 40; ocargo.BlocklyControl.prototype.incorrectBlock = null; ocargo.BlocklyControl.prototype.incorrectBlockColour = null; -ocargo.BlocklyControl.prototype.prepare = function(blocks) { - try { - return { - success:true, - program: blocks? ocargo.blocklyCompiler.mobileCompile(blocks) : ocargo.blocklyCompiler.compile() - }; - } catch (error) { - return { - success:false, - error: gettext('Your program doesn\'t look quite right...') + "

" + gettext(error) - }; - } +ocargo.BlocklyControl.prototype.prepare = function (blocks) { + try { + return { + success: true, + program: blocks + ? ocargo.blocklyCompiler.mobileCompile(blocks) + : ocargo.blocklyCompiler.compile(), + }; + } catch (error) { + return { + success: false, + error: + gettext("Your program doesn't look quite right...") + + "

" + + gettext(error), + }; + } }; -ocargo.BlocklyControl.prototype.redrawBlockly = function() { - Blockly.svgResize(Blockly.mainWorkspace); +ocargo.BlocklyControl.prototype.redrawBlockly = function () { + Blockly.svgResize(Blockly.mainWorkspace); }; ocargo.BlocklyControl.prototype.clearIncorrectBlock = function () { - this.incorrectBlock = null; -} + this.incorrectBlock = null; +}; function wasGameStarted(blocks) { - let gameStarted = false; - for (let block of blocks) { - if (block.type == 'start') gameStarted = true; - } - return gameStarted; + let gameStarted = false; + for (let block of blocks) { + if (block.type == "start") gameStarted = true; + } + return gameStarted; } -ocargo.BlocklyControl.prototype.reset = function() { +ocargo.BlocklyControl.prototype.reset = function () { + let allBlocks = Blockly.mainWorkspace.getAllBlocks(); - let allBlocks = Blockly.mainWorkspace.getAllBlocks() - - for (let block of allBlocks) { - if (block.type != 'start') block.dispose(true) - } + for (let block of allBlocks) { + if (block.type != "start") block.dispose(true); + } - // Each time a game starts the clear function is called. - // Therefore a simple check is preformed to see if the level - // has a start button, if not then create a start button - if (!wasGameStarted(allBlocks)) { - let startBlock = this.createBlock('start'); - startBlock.moveBy(30+(i%2)*200,30+Math.floor(i/2)*100); - } + // Each time a game starts the clear function is called. + // Therefore a simple check is preformed to see if the level + // has a start button, if not then create a start button + if (!wasGameStarted(allBlocks)) { + let startBlock = this.createBlock("start"); + startBlock.moveBy(30 + (i % 2) * 200, 30 + Math.floor(i / 2) * 100); + } - this.clearIncorrectBlock(); + this.clearIncorrectBlock(); }; -ocargo.BlocklyControl.prototype.deserialize = function(text) { - try { - var oldXml = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); - - var newXml = Blockly.Xml.textToDom(text); - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(newXml, Blockly.mainWorkspace); - var legal = this.removeIllegalBlocks(); - - if (!legal) { - ocargo.Drawing.startPopup( - gettext('Loading workspace'), - "", - gettext('Sorry, this workspace has blocks in it that aren\'t allowed in this level!'), - true - ); - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(oldXml, Blockly.mainWorkspace); - } - } catch (e) { - console.log(e); - this.reset(); +ocargo.BlocklyControl.prototype.deserialize = function (text) { + try { + var oldXml = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); + + var newXml = Blockly.Xml.textToDom(text); + Blockly.mainWorkspace.clear(); + Blockly.Xml.domToWorkspace(newXml, Blockly.mainWorkspace); + var legal = this.removeIllegalBlocks(); + + if (!legal) { + ocargo.Drawing.startPopup( + gettext("Loading workspace"), + "", + gettext( + "Sorry, this workspace has blocks in it that aren't allowed in this level!" + ), + true + ); + Blockly.mainWorkspace.clear(); + Blockly.Xml.domToWorkspace(oldXml, Blockly.mainWorkspace); } + } catch (e) { + console.log(e); + this.reset(); + } }; -ocargo.BlocklyControl.prototype.serialize = function() { - var xml = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); - return Blockly.Xml.domToText(xml); +ocargo.BlocklyControl.prototype.serialize = function () { + var xml = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); + return Blockly.Xml.domToText(xml); }; -ocargo.BlocklyControl.prototype.removeIllegalBlocks = function() { - // Buggy blockly doesn't serialise properly on Safari. - var isSafari = navigator.userAgent.indexOf('Safari') !== -1 && - navigator.userAgent.indexOf('Chrome') === -1; - - var blocks = Blockly.mainWorkspace.getAllBlocks(); - blocks.sort(function(a, b) { - return a.id - b.id; - }); - - var startCount = 1; - var clean = true; - - for (var i = 0; i < blocks.length; i++) { - var block = blocks[i]; - - if (block.type !== 'start') { - var found = false; - for (var j = 0; j < BLOCKS.length; j++) { - if (BLOCKS[j].type == block.type) { - found = true; - break; - } - } - - if (!found) { - clean = false; - block.dispose(); - } - } else { - startCount--; - if (isSafari && startCount < 0) { - block.dispose(); - } +ocargo.BlocklyControl.prototype.removeIllegalBlocks = function () { + // Buggy blockly doesn't serialise properly on Safari. + var isSafari = + navigator.userAgent.indexOf("Safari") !== -1 && + navigator.userAgent.indexOf("Chrome") === -1; + + var blocks = Blockly.mainWorkspace.getAllBlocks(); + blocks.sort(function (a, b) { + return a.id - b.id; + }); + + var startCount = 1; + var clean = true; + + for (var i = 0; i < blocks.length; i++) { + var block = blocks[i]; + + if (block.type !== "start") { + var found = false; + for (var j = 0; j < BLOCKS.length; j++) { + if (BLOCKS[j].type == block.type) { + found = true; + break; } + } + + if (!found) { + clean = false; + block.dispose(); + } + } else { + startCount--; + if (isSafari && startCount < 0) { + block.dispose(); + } } - if (startCount > 0) { - this.reset(); - return true; - } - return clean; + } + if (startCount > 0) { + this.reset(); + return true; + } + return clean; }; -ocargo.BlocklyControl.prototype.setCodeChangesAllowed = function(changesAllowed) { - this.blocklyDiv.style.pointerEvents = changesAllowed ? "" : "none"; +ocargo.BlocklyControl.prototype.setCodeChangesAllowed = function ( + changesAllowed +) { + this.blocklyDiv.style.pointerEvents = changesAllowed ? "" : "none"; }; -ocargo.BlocklyControl.prototype.loadPreviousAttempt = function() { - function decodeHTML(text) { - var e = document.createElement('div'); - e.innerHTML = text; - return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue; - } - // Use the user's last attempt if available - if (WORKSPACE) { - this.deserialize(decodeHTML(WORKSPACE)); - } +ocargo.BlocklyControl.prototype.loadPreviousAttempt = function () { + function decodeHTML(text) { + var e = document.createElement("div"); + e.innerHTML = text; + return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue; + } + // Use the user's last attempt if available + if (WORKSPACE) { + this.deserialize(decodeHTML(WORKSPACE)); + } - this.redrawBlockly(); + this.redrawBlockly(); }; -ocargo.BlocklyControl.prototype.createBlock = function(blockType) { - var block = Blockly.mainWorkspace.newBlock(blockType) - // var block = Blockly.Block.obtain(Blockly.mainWorkspace, blockType); - block.initSvg(); - block.render(); - return block; +ocargo.BlocklyControl.prototype.createBlock = function (blockType) { + var block = Blockly.mainWorkspace.newBlock(blockType); + // var block = Blockly.Block.obtain(Blockly.mainWorkspace, blockType); + block.initSvg(); + block.render(); + return block; }; -ocargo.BlocklyControl.prototype.addBlockToEndOfProgram = function(blockType) { - var blockToAdd = this.createBlock(blockType); +ocargo.BlocklyControl.prototype.addBlockToEndOfProgram = function (blockType) { + var blockToAdd = this.createBlock(blockType); - var block = this.startBlock(); - while (block.nextConnection.targetBlock()) { - block = block.nextConnection.targetBlock(); - } + var block = this.startBlock(); + while (block.nextConnection.targetBlock()) { + block = block.nextConnection.targetBlock(); + } - block.nextConnection.connect(blockToAdd.previousConnection); + block.nextConnection.connect(blockToAdd.previousConnection); }; -ocargo.BlocklyControl.prototype.disconnectedStartBlock = function() { +ocargo.BlocklyControl.prototype.disconnectedStartBlock = function () { var emptyStart = this.startBlock().getChildren().length == 0; if (emptyStart) { if (this.totalBlocksCount() > 1) { @@ -205,93 +214,121 @@ ocargo.BlocklyControl.prototype.disconnectedStartBlock = function() { } }; -ocargo.BlocklyControl.prototype.startBlock = function() { - return Blockly.mainWorkspace.getTopBlocks().filter(function (block) { - return block.type === 'start'; - })[0]; +ocargo.BlocklyControl.prototype.startBlock = function () { + return Blockly.mainWorkspace.getTopBlocks().filter(function (block) { + return block.type === "start"; + })[0]; }; -ocargo.BlocklyControl.prototype.procedureBlocks = function() { - return Blockly.mainWorkspace.getTopBlocks().filter(function (block) { - return block.type === 'declare_proc'; - }); +ocargo.BlocklyControl.prototype.procedureBlocks = function () { + return Blockly.mainWorkspace.getTopBlocks().filter(function (block) { + return block.type === "declare_proc"; + }); }; -ocargo.BlocklyControl.prototype.totalBlocksCount = function() { - return Blockly.mainWorkspace.getAllBlocks().length; +ocargo.BlocklyControl.prototype.onEventDoBlocks = function () { + // find and return all top blocks that are event handler blocks + var startBlocks = []; + Blockly.mainWorkspace.getTopBlocks().forEach(function (block) { + if (block.type === "declare_event") { + startBlocks.push(block); + } + }); + return startBlocks; }; -ocargo.BlocklyControl.prototype.activeBlocksCount = function() { - var startBlock = this.startBlock(); - var procedureBlocks = this.procedureBlocks(); - var n = 0; - var i; +ocargo.BlocklyControl.prototype.totalBlocksCount = function () { + return Blockly.mainWorkspace.getAllBlocks().length; +}; - n += count(startBlock.nextConnection.targetBlock()); +ocargo.BlocklyControl.prototype.activeBlocksCount = function () { + var startBlock = this.startBlock(); + var procedureBlocks = this.procedureBlocks(); + var eventBlocks = this.onEventDoBlocks(); + var n = 0; + var i; - // 1 includes the procedure declaration block - for (i = 0; i < procedureBlocks.length; i++) { - n += 1 + count(procedureBlocks[i].inputList[1].connection.targetBlock()); - } + n += count(startBlock.nextConnection.targetBlock()); - return n; + // 1 includes the procedure declaration block + for (i = 0; i < procedureBlocks.length; i++) { + n += 1 + count(procedureBlocks[i].inputList[1].connection.targetBlock()); + } + // 1 includes the on-event-do block + for (i = 0; i < eventBlocks.length; i++) { + n += 1 + count(eventBlocks[i].inputList[1].connection.targetBlock()); + } - function count(block) { - if (!block) { - return 0; - } + return n; - var n = 1; - - if (block.type === 'controls_repeat_until' || block.type === 'controls_repeat_while' || - block.type === 'controls_whileUntil') { - var conditionBlock = block.inputList[0].connection.targetBlock(); - n += count(conditionBlock); - var bodyBlock = block.inputList[1].connection.targetBlock(); - n += count(bodyBlock); - var nextBlock = block.nextConnection.targetBlock(); - n += count(nextBlock); - } else if (block.type === 'controls_repeat') { - var bodyBlock = block.inputList[1].connection.targetBlock(); - n += count(bodyBlock); - var nextBlock = block.nextConnection.targetBlock(); - n += count(nextBlock); - } else if (block.type === 'controls_if') { - var elseCount = block.elseCount_ || 0; - - for (var i = 0; i < block.inputList.length - elseCount; i++) { - var input = block.inputList[i]; - if (input.name.indexOf('IF') === 0) { - var conditionBlock = input.connection.targetBlock(); - n += count(conditionBlock); - } else if (input.name.indexOf('DO') === 0) { - var bodyBlock = input.connection.targetBlock(); - n += count(bodyBlock); - } - } - - if (elseCount === 1) { - var elseBlock = block.inputList[block.inputList.length - 1] - .connection.targetBlock(); - n += count(elseBlock); - } - - var nextBlock = block.nextConnection.targetBlock(); - n += count(nextBlock); - } else if (block.type === 'call_proc' || block.type === 'move_forwards' || - block.type === 'turn_left' || block.type === 'turn_right' || - block.type === 'turn_around' || block.type === 'wait' || - block.type === 'deliver') { - var nextBlock = block.nextConnection.targetBlock(); - n += count(nextBlock); - } else if (block.type === 'logic_negate') { - var conditionBlock = block.inputList[0].connection.targetBlock(); - n += count(conditionBlock); - } + function count(block) { + if (!block) { + return 0; + } - return n; + var n = 1; + + if ( + block.type === "controls_repeat_until" || + block.type === "controls_repeat_while" || + block.type === "controls_whileUntil" + ) { + var conditionBlock = block.inputList[0].connection.targetBlock(); + n += count(conditionBlock); + var bodyBlock = block.inputList[1].connection.targetBlock(); + n += count(bodyBlock); + var nextBlock = block.nextConnection.targetBlock(); + n += count(nextBlock); + } else if (block.type === "controls_repeat") { + var bodyBlock = block.inputList[1].connection.targetBlock(); + n += count(bodyBlock); + var nextBlock = block.nextConnection.targetBlock(); + n += count(nextBlock); + } else if (block.type === "controls_if") { + var elseCount = block.elseCount_ || 0; + + for (var i = 0; i < block.inputList.length - elseCount; i++) { + var input = block.inputList[i]; + if (input.name.indexOf("IF") === 0) { + var conditionBlock = input.connection.targetBlock(); + n += count(conditionBlock); + } else if (input.name.indexOf("DO") === 0) { + var bodyBlock = input.connection.targetBlock(); + n += count(bodyBlock); + } + } + + if (elseCount === 1) { + var elseBlock = + block.inputList[block.inputList.length - 1].connection.targetBlock(); + n += count(elseBlock); + } + + var nextBlock = block.nextConnection.targetBlock(); + n += count(nextBlock); + } else if ( + block.type === "call_proc" || + block.type === "move_forwards" || + block.type === "turn_left" || + block.type === "turn_right" || + block.type === "turn_around" || + block.type === "wait" || + block.type === "deliver" || + block.type === "variables_numeric_set" || + block.type === "variables_increment" + ) { + var nextBlock = block.nextConnection.targetBlock(); + n += count(nextBlock); + } else if (block.type === "logic_negate" || block.type === "logic_compare") { + var conditionBlock = block.inputList[0].connection.targetBlock(); + n += count(conditionBlock); + } else if (block.type === "variables_get" || block.type === "math_number") { + n++ } + + return n; + } }; /************************/ @@ -299,90 +336,101 @@ ocargo.BlocklyControl.prototype.activeBlocksCount = function() { /************************/ // Define custom select methods that select a block and its inputs -ocargo.BlocklyControl.prototype.setBlockSelected = function(block, selected) { - if (!block instanceof Blockly.BlockSvg) { - return; - } +ocargo.BlocklyControl.prototype.setBlockSelected = function (block, selected) { + if (!block instanceof Blockly.BlockSvg) { + return; + } - block.inputList.forEach(function(input) { - if (input.connection && input.type !== Blockly.NEXT_STATEMENT) { - var targetBlock = input.connection.targetBlock(); - if (targetBlock) { - this.setBlockSelected(targetBlock, selected); - } + block.inputList.forEach( + function (input) { + if (input.connection && input.type !== Blockly.NEXT_STATEMENT) { + var targetBlock = input.connection.targetBlock(); + if (targetBlock) { + this.setBlockSelected(targetBlock, selected); } - }.bind(this)); + } + }.bind(this) + ); - if (selected) { - block.addSelect(); - } else { - block.removeSelect(); - } + if (selected) { + block.addSelect(); + } else { + block.removeSelect(); + } }; -ocargo.BlocklyControl.prototype.clearAllSelections = function() { - Blockly.mainWorkspace.getAllBlocks().forEach(function (block) { - if(!block.keepHighlighting){ - this.setBlockSelected(block, false); - } - }.bind(this)); +ocargo.BlocklyControl.prototype.clearAllSelections = function () { + Blockly.mainWorkspace.getAllBlocks().forEach( + function (block) { + if (!block.keepHighlighting) { + this.setBlockSelected(block, false); + } + }.bind(this) + ); }; -ocargo.BlocklyControl.prototype.highlightIncorrectBlock = function(incorrectBlock) { - var frequency = 300; - var repeats = 3; - - this.incorrectBlock = incorrectBlock; - this.incorrectBlockColour = incorrectBlock.getColour(); - - this.incorrectBlock.setColour(0); - for (var i = 0; i < repeats; i++) { - window.setTimeout(function () { - if (this.incorrectBlock) { - this.setBlockSelected(incorrectBlock, true); - } - }.bind(this), 2 * i * frequency); - window.setTimeout(function () { - if (this.incorrectBlock) { - this.setBlockSelected(incorrectBlock, false); - } - }.bind(this), (2 * i + 1) * frequency); - } -}; - -ocargo.BlocklyControl.tryCatchSilently = function (f) { - return function() { - try { - f(); - } catch (e) { - // Nothing +ocargo.BlocklyControl.prototype.highlightIncorrectBlock = function ( + incorrectBlock +) { + var frequency = 300; + var repeats = 3; + + this.incorrectBlock = incorrectBlock; + this.incorrectBlockColour = incorrectBlock.getColour(); + + this.incorrectBlock.setColour(0); + for (var i = 0; i < repeats; i++) { + window.setTimeout( + function () { + if (this.incorrectBlock) { + this.setBlockSelected(incorrectBlock, true); } - }; + }.bind(this), + 2 * i * frequency + ); + window.setTimeout( + function () { + if (this.incorrectBlock) { + this.setBlockSelected(incorrectBlock, false); + } + }.bind(this), + (2 * i + 1) * frequency + ); + } }; -ocargo.BlocklyControl.prototype.resetIncorrectBlock = function() { - if (this.incorrectBlock) { - this.incorrectBlock.setColour(this.incorrectBlockColour); +ocargo.BlocklyControl.tryCatchSilently = function (f) { + return function () { + try { + f(); + } catch (e) { + // Nothing } + }; }; +ocargo.BlocklyControl.prototype.resetIncorrectBlock = function () { + if (this.incorrectBlock) { + this.incorrectBlock.setColour(this.incorrectBlockColour); + } +}; -ocargo.BlockHandler = function(id) { - this.id = id; - this.selectedBlock = null; +ocargo.BlockHandler = function (id) { + this.id = id; + this.selectedBlock = null; }; -ocargo.BlockHandler.prototype.selectBlock = function(block) { - if (block) { - this.deselectCurrent(); - this.setBlockSelected(block, true); - this.selectedBlock = block; - } +ocargo.BlockHandler.prototype.selectBlock = function (block) { + if (block) { + this.deselectCurrent(); + this.setBlockSelected(block, true); + this.selectedBlock = block; + } }; -ocargo.BlockHandler.prototype.deselectCurrent = function() { - if (this.selectedBlock) { - this.setBlockSelected(this.selectedBlock, false); - this.selectedBlock = null; - } +ocargo.BlockHandler.prototype.deselectCurrent = function () { + if (this.selectedBlock) { + this.setBlockSelected(this.selectedBlock, false); + this.selectedBlock = null; + } }; diff --git a/game/static/game/js/blocklyCustomBlocks.js b/game/static/game/js/blocklyCustomBlocks.js index b181d0748..384417382 100644 --- a/game/static/game/js/blocklyCustomBlocks.js +++ b/game/static/game/js/blocklyCustomBlocks.js @@ -1,140 +1,186 @@ -'use strict'; +"use strict"; var ocargo = ocargo || {}; var Blockly = Blockly || {}; function initCustomBlocks() { - initCustomBlocksDescription(); - initCustomBlocksPython(); + initCustomBlocksDescription(); + initCustomBlocksPython(); } function initCustomBlocksDescription() { - - Blockly.Blocks['start'] = { - // Beginning block - identifies the start of the program - init: function() { - ocargo.blocklyControl.numStartBlocks++; - this.setColour(50); - this.appendDummyInput() - .appendField(gettext('Start')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + CHARACTER_EN_FACE_URL, - ocargo.BlocklyControl.BLOCK_CHARACTER_HEIGHT, - ocargo.BlocklyControl.BLOCK_CHARACTER_WIDTH)); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('The beginning of the program')); - this.setDeletable(false); - } - }; - - /*****************/ - /* Action Blocks */ - /*****************/ - - Blockly.Blocks['move_forwards'] = { - // Block for moving forward - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('move forwards')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'actions/forward.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Move the van forwards')); - } - }; - - Blockly.Blocks['turn_left'] = { - // Block for turning left - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('turn left')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - 38, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'actions/left.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Turn the van left')); - } - }; - - Blockly.Blocks['turn_right'] = { - // Block for turning right - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('turn right')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - 29, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'actions/right.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Turn the van right')); - } - }; - - Blockly.Blocks['turn_around'] = { - // Block for turning around - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('turn around')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - 12, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + - 'actions/turn_around.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Turn the van around')); - } - }; - - Blockly.Blocks['wait'] = { - // Block for not moving the van for a time - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('wait')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - 60, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'actions/wait.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Keep the van stationary')); - } - }; - - Blockly.Blocks['deliver'] = { - // Block for delivering (only on levels with multiple destinations) - init: function() { - this.setColour(160); - this.appendDummyInput() - .appendField(gettext('deliver')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - 43, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'actions/deliver.svg', - ocargo.BlocklyControl.IMAGE_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Deliver the goods from the van')); - } - }; + Blockly.Blocks["start"] = { + // Beginning block - identifies the start of the program + init: function () { + ocargo.blocklyControl.numStartBlocks++; + this.setColour(50); + this.appendDummyInput() + .appendField(gettext("Start")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + CHARACTER_EN_FACE_URL, + ocargo.BlocklyControl.BLOCK_CHARACTER_HEIGHT, + ocargo.BlocklyControl.BLOCK_CHARACTER_WIDTH + ) + ); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("The beginning of the program")); + this.setDeletable(false); + }, + }; + + /*****************/ + /* Action Blocks */ + /*****************/ + + Blockly.Blocks["move_forwards"] = { + // Block for moving forward + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("move forwards")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/forward.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Move the van forwards")); + }, + }; + + Blockly.Blocks["turn_left"] = { + // Block for turning left + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("turn left")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 38, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/left.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Turn the van left")); + }, + }; + + Blockly.Blocks["turn_right"] = { + // Block for turning right + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("turn right")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 29, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/right.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Turn the van right")); + }, + }; + + Blockly.Blocks["turn_around"] = { + // Block for turning around + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("turn around")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 12, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/turn_around.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Turn the van around")); + }, + }; + + Blockly.Blocks["wait"] = { + // Block for not moving the van for a time + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("wait")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 60, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/wait.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Keep the van stationary")); + }, + }; + + Blockly.Blocks["deliver"] = { + // Block for delivering (only on levels with multiple destinations) + init: function () { + this.setColour(160); + this.appendDummyInput() + .appendField(gettext("deliver")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 43, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "actions/deliver.svg", + ocargo.BlocklyControl.IMAGE_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Deliver the goods from the van")); + }, + }; Blockly.Blocks['sound_horn'] = { init: function() { @@ -153,64 +199,82 @@ function initCustomBlocksDescription() { } }; - /*****************/ - /* Conditions */ - /*****************/ - - Blockly.Blocks['road_exists'] = { - init: function() { - var BOOLEANS = - [[gettext('road exists forward'), 'FORWARD'], - [gettext('road exists left'), 'LEFT'], - [gettext('road exists right'), 'RIGHT']]; - this.setColour(210); - this.setOutput(true, 'Boolean'); - this.appendDummyInput() - .appendField(new Blockly.FieldDropdown(BOOLEANS), 'CHOICE') - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - } - }; - - Blockly.Blocks['traffic_light'] = { - init: function() { - var BOOLEANS = - [[gettext('traffic light red'), ocargo.TrafficLight.RED], - [gettext('traffic light green'), ocargo.TrafficLight.GREEN]]; - this.setColour(210); - this.setOutput(true, 'Boolean'); - this.appendDummyInput() - .appendField(new Blockly.FieldDropdown(BOOLEANS), 'CHOICE') - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - } - }; - - Blockly.Blocks['dead_end'] = { - init: function() { - this.setColour(210); - this.setOutput(true, 'Boolean'); - this.appendDummyInput() - .appendField(gettext('is dead end')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - } - }; - - Blockly.Blocks['at_destination'] = { - init: function() { - this.setColour(210); - this.setOutput(true, 'Boolean'); - this.appendDummyInput() - .appendField(gettext('at destination')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - } - }; + /*****************/ + /* Conditions */ + /*****************/ + + Blockly.Blocks["road_exists"] = { + init: function () { + var BOOLEANS = [ + [gettext("road exists forward"), "FORWARD"], + [gettext("road exists left"), "LEFT"], + [gettext("road exists right"), "RIGHT"], + ]; + this.setColour(210); + this.setOutput(true, "Boolean"); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown(BOOLEANS), "CHOICE") + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + }, + }; + + Blockly.Blocks["traffic_light"] = { + init: function () { + var BOOLEANS = [ + [gettext("traffic light red"), ocargo.TrafficLight.RED], + [gettext("traffic light green"), ocargo.TrafficLight.GREEN], + ]; + this.setColour(210); + this.setOutput(true, "Boolean"); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown(BOOLEANS), "CHOICE") + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + }, + }; + + Blockly.Blocks["dead_end"] = { + init: function () { + this.setColour(210); + this.setOutput(true, "Boolean"); + this.appendDummyInput() + .appendField(gettext("is dead end")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + }, + }; + + Blockly.Blocks["at_destination"] = { + init: function () { + this.setColour(210); + this.setOutput(true, "Boolean"); + this.appendDummyInput() + .appendField(gettext("at destination")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + }, + }; Blockly.Blocks['cow_crossing'] = { init: function() { @@ -227,139 +291,259 @@ function initCustomBlocksDescription() { /* Procedures */ /****************/ - Blockly.Blocks['call_proc'] = { - // Block for calling a defined procedure - init: function() { - var name = ''; - this.setColour(260); - this.appendDummyInput() - .appendField(gettext('Call')) - .appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', 7, - ocargo.BlocklyControl.BLOCK_HEIGHT)) - .appendField(new Blockly.FieldTextInput(name),'NAME'); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Call')); - } - - }; - - Blockly.Blocks['declare_proc'] = { - // Block for declaring a procedure - init: function() { - var name = ''; - this.setColour(260); - this.appendDummyInput() - .appendField(gettext('Define')) - .appendField(new Blockly.FieldTextInput(name),'NAME'); - this.appendStatementInput('DO') - .setCheck('Action') - .appendField(gettext('Do')); - this.setTooltip(gettext('Declares the procedure')); - this.statementConnection_ = null; - } - }; - - /*******************/ - /* Control Flows */ - /*******************/ - - Blockly.Blocks['controls_repeat_while'] = { - // Block for repeat while - init: function() { - this.setColour(120); - this.appendValueInput("condition") - .setCheck("Boolean") - .appendField(gettext('repeat while')); - this.appendStatementInput("body") - .setCheck("Action") - .appendField(gettext('do')); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('While a value is true, do some statements')); - } - }; - - Blockly.Blocks['controls_repeat_until'] = { - // Block for repeat until - init: function() { - this.setColour(120); - this.appendValueInput("condition") - .setCheck("Boolean") - .appendField(gettext('repeat until')); - this.appendStatementInput("body") - .setCheck("Action") - .appendField(gettext('do')); - this.setPreviousStatement(true, 'Action'); - this.setNextStatement(true, 'Action'); - this.setTooltip(gettext('Until a value is true, do some statements')); + Blockly.Blocks["call_proc"] = { + // Block for calling a defined procedure + init: function () { + var name = ""; + this.setColour(260); + this.appendDummyInput() + .appendField(gettext("Call")) + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + 7, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ) + .appendField(new Blockly.FieldTextInput(name), "NAME"); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Call")); + }, + }; + + Blockly.Blocks["declare_proc"] = { + // Block for declaring a procedure + init: function () { + var name = ""; + this.setColour(260); + this.appendDummyInput() + .appendField(gettext("Define")) + .appendField(new Blockly.FieldTextInput(name), "NAME"); + this.appendStatementInput("DO") + .setCheck("Action") + .appendField(gettext("Do")); + this.setTooltip(gettext("Declares the procedure")); + this.statementConnection_ = null; + }, + }; + + /****************/ + /* Events */ + /****************/ + + Blockly.Blocks["declare_event"] = { + // Block for declaring an event handler + init: function () { + this.setColour(260); + var dropdown = new Blockly.FieldDropdown( + [ + [gettext("white"), ocargo.Cow.WHITE], + [gettext("brown"), ocargo.Cow.BROWN], + ], + function (option) { + var imageUrl = + ocargo.Drawing.imageDir + ocargo.Drawing.cowUrl(option); + this.sourceBlock_.getField("IMAGE").setValue(imageUrl); } - }; - - // Set text colour to red - var textBlock = Blockly.Blocks['text']; - var originalTextInit = textBlock.init; - textBlock.init = function() { - originalTextInit.call(this); - this.setColour(260); - }; - - //Customise controls_repeat block to not allow more than a sensible number of repetitions - var controlsRepeatBlock = Blockly.Blocks['controls_repeat']; - var originalInit = controlsRepeatBlock.init; - controlsRepeatBlock.init = function () { - originalInit.call(this); - - this.setPreviousStatement(!0, 'Action'); - this.setNextStatement(!0, 'Action'); - this.inputList[1].setCheck('Action'); //Disallow event action blocks to be in body - - var input = this.inputList[0]; - var field = input.fieldRow[1]; - field.changeHandler_ = function(text) { - var n = Blockly.FieldTextInput.numberValidator(text); - if (n) { - n = String(Math.min(Math.max(0, Math.floor(n)), 20)); - } - return n; - }; - }; - - // Make 'not' taller - var notBlock = Blockly.Blocks['logic_negate']; - var originalNotInit = notBlock.init; - notBlock.init = function () { - originalNotInit.call(this); - this.inputList[0].appendField(new Blockly.FieldImage(ocargo.Drawing.imageDir + 'empty.svg', - ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, - ocargo.BlocklyControl.BLOCK_HEIGHT)); - }; + ); + this.appendDummyInput("Event") + .appendField(gettext("On ")) + .appendField(dropdown, "TYPE") + .appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + ocargo.Drawing.whiteCowUrl, + ocargo.BlocklyControl.COW_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ), + "IMAGE" + ); + this.getField("IMAGE").EDITABLE = true; //saves the image path as well in the XML + this.appendStatementInput("DO") + .setCheck("EventAction") + .appendField(gettext("Do")); + this.setTooltip(gettext("Declares the event handler")); + this.statementConnection_ = null; + }, + }; + + /*******************/ + /* Control Flows */ + /*******************/ + + Blockly.Blocks["controls_repeat_while"] = { + // Block for repeat while + init: function () { + this.setColour(120); + this.appendValueInput("condition") + .setCheck("Boolean") + .appendField(gettext("repeat while")); + this.appendStatementInput("body") + .setCheck("Action") + .appendField(gettext("do")); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("While a value is true, do some statements")); + }, + }; + + Blockly.Blocks["controls_repeat_until"] = { + // Block for repeat until + init: function () { + this.setColour(120); + this.appendValueInput("condition") + .setCheck("Boolean") + .appendField(gettext("repeat until")); + this.appendStatementInput("body") + .setCheck("Action") + .appendField(gettext("do")); + this.setPreviousStatement(true, "Action"); + this.setNextStatement(true, "Action"); + this.setTooltip(gettext("Until a value is true, do some statements")); + }, + }; + + /*****************/ + /* Variables */ + /*****************/ + + Blockly.Blocks["variables_get"] = { + init: function () { + this.appendDummyInput().appendField( + new Blockly.FieldTextInput(""), + "NAME" + ); + this.setOutput(true, null); + this.setColour(330); + this.setTooltip(gettext("A variable")); + }, + }; + + Blockly.Blocks["variables_set"] = { + init: function () { + this.appendValueInput("VALUE") + .setCheck(null) + .appendField("set") + .appendField(new Blockly.FieldTextInput(""), "VAR") + .appendField("to"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(330); + this.setTooltip(gettext("Set a variable")); + }, + }; + + Blockly.Blocks["variables_numeric_set"] = { + init: function () { + this.appendDummyInput() + .appendField("set") + .appendField(new Blockly.FieldTextInput(""), "NAME") + .appendField("to") + .appendField(new Blockly.FieldNumber(0), "VALUE"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(330); + this.setTooltip(gettext("Set a variable to a number")); + }, + }; + + Blockly.Blocks["variables_increment"] = { + init: function () { + this.appendDummyInput() + .appendField("increment") + .appendField(new Blockly.FieldTextInput(""), "NAME") + .appendField("by") + .appendField(new Blockly.FieldNumber(0), "VALUE"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(330); + this.setTooltip(gettext("Increment a variable")); + }, + }; + + /***************/ + /* Numbers */ + /***************/ + + Blockly.Blocks["math_number"] = { + init: function () { + this.appendDummyInput() + .appendField("number") + .appendField(new Blockly.FieldNumber(0), "NUM"); + this.setOutput(true, null); + this.setColour(230); + this.setTooltip(gettext("A number")); + }, + }; + + // Set text colour to red + var textBlock = Blockly.Blocks["text"]; + var originalTextInit = textBlock.init; + textBlock.init = function () { + originalTextInit.call(this); + this.setColour(260); + }; + + //Customise controls_repeat block to not allow more than a sensible number of repetitions + var controlsRepeatBlock = Blockly.Blocks["controls_repeat"]; + var originalInit = controlsRepeatBlock.init; + controlsRepeatBlock.init = function () { + originalInit.call(this); + + this.setPreviousStatement(!0, "Action"); + this.setNextStatement(!0, "Action"); + this.inputList[1].setCheck("Action"); //Disallow event action blocks to be in body + + var input = this.inputList[0]; + var field = input.fieldRow[1]; + field.changeHandler_ = function (text) { + var n = Blockly.FieldTextInput.numberValidator(text); + if (n) { + n = String(Math.min(Math.max(0, Math.floor(n)), 20)); + } + return n; + }; + }; + + // Make 'not' taller + var notBlock = Blockly.Blocks["logic_negate"]; + var originalNotInit = notBlock.init; + notBlock.init = function () { + originalNotInit.call(this); + this.inputList[0].appendField( + new Blockly.FieldImage( + ocargo.Drawing.imageDir + "empty.svg", + ocargo.BlocklyControl.EXTRA_BLOCK_WIDTH, + ocargo.BlocklyControl.BLOCK_HEIGHT + ) + ); + }; } function initCustomBlocksPython() { - Blockly.Python['start'] = function(block) { - return ''; - }; + Blockly.Python["start"] = function (block) { + return ""; + }; - Blockly.Python['move_forwards'] = function(block) { - return 'my_van.move_forwards()\n'; - }; + Blockly.Python["move_forwards"] = function (block) { + return "my_van.move_forwards()\n"; + }; - Blockly.Python['turn_left'] = function(block) { - return 'my_van.turn_left()\n'; - }; + Blockly.Python["turn_left"] = function (block) { + return "my_van.turn_left()\n"; + }; - Blockly.Python['turn_right'] = function(block) { - return 'my_van.turn_right()\n'; - }; + Blockly.Python["turn_right"] = function (block) { + return "my_van.turn_right()\n"; + }; - Blockly.Python['turn_around'] = function(block) { - return 'my_van.turn_around()\n'; - }; + Blockly.Python["turn_around"] = function (block) { + return "my_van.turn_around()\n"; + }; - Blockly.Python['wait'] = function(block) { - return 'my_van.wait()\n'; - }; + Blockly.Python["wait"] = function (block) { + return "my_van.wait()\n"; + }; Blockly.Python['deliver'] = function(block) { return 'my_van.deliver()\n'; @@ -370,66 +554,109 @@ function initCustomBlocksPython() { }; - Blockly.Python['road_exists'] = function(block) { - if(block.inputList[0].fieldRow[1].value_ === 'FORWARD'){ - var python = "my_van.is_road('FORWARD')"; - }else if(block.inputList[0].fieldRow[1].value_ === 'LEFT'){ - var python = "my_van.is_road('LEFT')"; - }else{ - var python = "my_van.is_road('RIGHT')"; - } - - return [python, Blockly.Python.ORDER_NONE]; - // TODO: figure out what this ordering relates to - }; - - Blockly.Python['traffic_light'] = function(block) { - var python; - if(block.inputList[0].fieldRow[1].value_ === ocargo.TrafficLight.RED){ - python = "my_van.at_traffic_light('RED')"; - }else{ - python = "my_van.at_traffic_light('GREEN')"; - } - - return [python, Blockly.Python.ORDER_NONE]; //TODO: figure out what this ordering relates to - }; - - Blockly.Python['dead_end'] = function(block) { - return ['my_van.at_dead_end()', Blockly.Python.ORDER_NONE]; - // TODO: figure out what this ordering relates to - }; - - Blockly.Python['cow_crossing'] = function(block) { - return ['my_van.cow_crossing()', Blockly.Python.ORDER_NONE]; - // TODO: figure out what this ordering relates to - }; - - Blockly.Python['at_destination'] = function(block) { - return ['my_van.at_destination()', Blockly.Python.ORDER_NONE]; - // TODO: figure out what this ordering relates to; - }; - - Blockly.Python['call_proc'] = function(block) { - return block.inputList[0].fieldRow[2].text_ + '()\n'; - }; - - Blockly.Python['declare_proc'] = function(block) { - var branch = Blockly.Python.statementToCode(block, 'DO'); - return 'def ' + block.inputList[0].fieldRow[1].text_ + '():\n' + branch; - // TODO: get code out of sub-blocks (there's a Blockly function for it) - }; - - Blockly.Python['controls_repeat_while'] = function(block) { - var condition = Blockly.Python.valueToCode(block, 'condition', Blockly.Python.ORDER_ATOMIC); - var subBlock = Blockly.Python.statementToCode(block, 'body'); - var code = 'while ' + condition + ':\n' + subBlock; - return code; - }; - - Blockly.Python['controls_repeat_until'] = function(block) { - var condition = Blockly.Python.valueToCode(block, 'condition', Blockly.Python.ORDER_ATOMIC); - var subBlock = Blockly.Python.statementToCode(block, 'body'); - var code = 'while not ' + condition + ':\n' + subBlock; - return code; - }; + Blockly.Python["road_exists"] = function (block) { + if (block.inputList[0].fieldRow[1].value_ === "FORWARD") { + var python = "my_van.is_road('FORWARD')"; + } else if (block.inputList[0].fieldRow[1].value_ === "LEFT") { + var python = "my_van.is_road('LEFT')"; + } else { + var python = "my_van.is_road('RIGHT')"; + } + + return [python, Blockly.Python.ORDER_NONE]; + // TODO: figure out what this ordering relates to + }; + + Blockly.Python["traffic_light"] = function (block) { + var python; + if (block.inputList[0].fieldRow[1].value_ === ocargo.TrafficLight.RED) { + python = "my_van.at_traffic_light('RED')"; + } else { + python = "my_van.at_traffic_light('GREEN')"; + } + + return [python, Blockly.Python.ORDER_NONE]; //TODO: figure out what this ordering relates to + }; + + Blockly.Python["dead_end"] = function (block) { + return ["my_van.at_dead_end()", Blockly.Python.ORDER_NONE]; + // TODO: figure out what this ordering relates to + }; + + Blockly.Python["cow_crossing"] = function (block) { + return ["my_van.cow_crossing()", Blockly.Python.ORDER_NONE]; + // TODO: figure out what this ordering relates to + }; + + Blockly.Python["at_destination"] = function (block) { + return ["my_van.at_destination()", Blockly.Python.ORDER_NONE]; + // TODO: figure out what this ordering relates to; + }; + + Blockly.Python["call_proc"] = function (block) { + return block.inputList[0].fieldRow[2].text_ + "()\n"; + }; + + Blockly.Python["declare_proc"] = function (block) { + var branch = Blockly.Python.statementToCode(block, "DO"); + return "def " + block.inputList[0].fieldRow[1].text_ + "():\n" + branch; + // TODO: get code out of sub-blocks (there's a Blockly function for it) + }; + + Blockly.Python["declare_event"] = function (block) { + // TODO support events in python + throw "events not supported in python"; + }; + + Blockly.Python["controls_repeat_while"] = function (block) { + var condition = Blockly.Python.valueToCode( + block, + "condition", + Blockly.Python.ORDER_ATOMIC + ); + var subBlock = Blockly.Python.statementToCode(block, "body"); + var code = "while " + condition + ":\n" + subBlock; + return code; + }; + + Blockly.Python["controls_repeat_until"] = function (block) { + var condition = Blockly.Python.valueToCode( + block, + "condition", + Blockly.Python.ORDER_ATOMIC + ); + var subBlock = Blockly.Python.statementToCode(block, "body"); + var code = "while not " + condition + ":\n" + subBlock; + return code; + }; + + Blockly.Python["variables_get"] = function (block) { + var variableName = block.getFieldValue("NAME"); + return [variableName, Blockly.Python.ORDER_ATOMIC]; + }; + + Blockly.Python["variables_set"] = function (block) { + var variableName = block.getFieldValue("VAR"); + var value = Blockly.Python.valueToCode( + block, + "VALUE", + Blockly.Python.ORDER_NONE + ); + var code = `${variableName} = ${value}\n`; + return code; + }; + + Blockly.Python["variables_numeric_set"] = function (block) { + var variableName = block.getFieldValue("NAME"); + var numberValue = block.getFieldValue("VALUE"); + var code = `${variableName} = ${numberValue}\n`; + return code; + }; + + Blockly.Python["variables_increment"] = function (block) { + var variableName = block.getFieldValue("NAME"); + var numberValue = block.getFieldValue("VALUE"); + var code = `${variableName} = ${variableName} + ${numberValue}\n`; + return code; + }; } diff --git a/game/static/game/js/drawing.js b/game/static/game/js/drawing.js index 2a2938c84..8cefe64ad 100644 --- a/game/static/game/js/drawing.js +++ b/game/static/game/js/drawing.js @@ -8,8 +8,8 @@ var GRID_SPACE_SIZE = 100 let PAPER_WIDTH = GRID_SPACE_SIZE * GRID_WIDTH let PAPER_HEIGHT = GRID_SPACE_SIZE * GRID_HEIGHT let PAPER_PADDING = 30 -let EXTENDED_PAPER_WIDTH = PAPER_WIDTH + 2 * PAPER_PADDING -let EXTENDED_PAPER_HEIGHT = PAPER_HEIGHT + 2 * PAPER_PADDING +let EXTENDED_PAPER_WIDTH = '100%' +let EXTENDED_PAPER_HEIGHT = '100%' let DEFAULT_CHARACTER_WIDTH = 40 let DEFAULT_CHARACTER_HEIGHT = 20 @@ -1050,16 +1050,20 @@ ocargo.Drawing.startPopup = function ( if (youtubeVideo[0]) { $("#modal-mascot").hide() } + + // create a wrapper for the buttons that will be appended + let buttonDiv = $("
").addClass("modal-buttons") + + const icons = [ + $("").addClass("iconify icon").attr("data-icon", "mdi:chevron-left"), + "NOT USED", + $("").addClass("iconify icon").attr("data-icon", "mdi:chevron-right"), + ] + // buttons are passed as html string.. // hence this terribleness // check if we pass an array of buttons or just one button if (Array.isArray(buttons)) { - const icons = [ - $("").addClass("iconify icon").attr("data-icon", "mdi:chevron-left"), - "NOT USED", - $("").addClass("iconify icon").attr("data-icon", "mdi:chevron-right"), - ] - const links = [ PREV_LEVEL_URL, "", @@ -1067,8 +1071,7 @@ ocargo.Drawing.startPopup = function ( ] const regexID = /id=\"*\w+_\w+\"/ - // create a wrapper for the buttons that will be appended - let buttonDiv = $("
").addClass("modal-buttons") + for (let i = 0; i < buttons.length; i++) { // get id with regex by stripping the html content let currentID = buttons[i].match(regexID)[0].slice(3).replaceAll('"', '') @@ -1094,10 +1097,35 @@ ocargo.Drawing.startPopup = function ( else if (buttons) { $('#modal-buttons').html(buttons) + + let tryAgainButton = $("#try_again_button") + tryAgainButton.removeClass().addClass("navigation_button_portal long_button rapid-router-welcome") + buttonDiv.append(tryAgainButton) + + let editButton = $("#edit_button") + editButton.removeClass().addClass("navigation_button_portal long_button rapid-router-welcome") + buttonDiv.append(editButton) + + let nextLevelButton = $("#next_level_button") + nextLevelButton.removeClass().addClass("navigation_button_portal_secondary long_button rapid-router-welcome button--icon") + nextLevelButton.append(icons[2]) + buttonDiv.append(nextLevelButton) + + let playButton = $("#play_button") + playButton.removeClass().addClass("navigation_button_portal_secondary long_button rapid-router-welcome button--icon") + playButton.append(icons[2]) + buttonDiv.append(playButton) + + $("#modal-buttons").html(buttonDiv) } else { $('#modal-buttons').html( ocargo.button.dismissButtonHtml('close_button', gettext('Close')) ) + + let closeButton = $("#close_button") + closeButton.removeClass().addClass("navigation_button_portal long_button rapid-router-welcome") + buttonDiv.append(closeButton) + $("#modal-buttons").html(buttonDiv) } // Show popup $("#myModal").show() @@ -1121,24 +1149,6 @@ ocargo.Drawing.startYesNoPopup = function ( $('#modal-noBtn').click(noFunction) } -// This provides a pop-up with 2 options -ocargo.Drawing.startOptionsPopup = function ( - title, - subtitle, - message, - optionAFunction, - optionBFunction, - optionAText, - optionBText, - mascot -) { - let buttonHtml = - ' ' - ocargo.Drawing.startPopup(title, subtitle, message, mascot, buttonHtml) - $('#modal-optionABtn').click(optionAFunction) - $('#modal-optionBBtn').click(optionBFunction) -} - // This is the function that starts the pop-up when there is no internet connection while playing the game ocargo.Drawing.startInternetDownPopup = function () { ocargo.Drawing.startPopup( diff --git a/game/static/game/js/jquery.dataTables.min.js b/game/static/game/js/jquery.dataTables.min.js index 85dd817e1..7a43a95aa 100644 --- a/game/static/game/js/jquery.dataTables.min.js +++ b/game/static/game/js/jquery.dataTables.min.js @@ -1,160 +1,4 @@ -/*! DataTables 1.10.7 - * ©2008-2015 SpryMedia Ltd - datatables.net/license +/*! DataTables 1.13.6 + * ©2008-2023 SpryMedia Ltd - datatables.net/license */ -(function(Ea,Q,k){var P=function(h){function W(a){var b,c,e={};h.each(a,function(d){if((b=d.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=d.replace(b[0],b[2].toLowerCase()),e[c]=d,"o"===b[1]&&W(a[d])});a._hungarianMap=e}function H(a,b,c){a._hungarianMap||W(a);var e;h.each(b,function(d){e=a._hungarianMap[d];if(e!==k&&(c||b[e]===k))"o"===e.charAt(0)?(b[e]||(b[e]={}),h.extend(!0,b[e],b[d]),H(a[e],b[e],c)):b[e]=b[d]})}function P(a){var b=m.defaults.oLanguage,c=a.sZeroRecords; -!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate"); -A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");if(a=a.aoSearchCols)for(var b=0,c=a.length;b").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("
").css({position:"absolute", -top:1,left:1,width:100,overflow:"scroll"}).append(h('
').css({width:"100%",height:10}))).appendTo("body"),c=b.find(".test");a.bScrollOversize=100===c[0].offsetWidth;a.bScrollbarLeft=1!==Math.round(c.offset().left);b.remove()}function hb(a,b,c,e,d,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;e!==d;)a.hasOwnProperty(e)&&(g=j?b(g,a[e],e,a):a[e],j=!0,e+=f);return g}function Fa(a,b){var c=m.defaults.column,e=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:Q.createElement("th"),sTitle:c.sTitle? -c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[e],mData:c.mData?c.mData:e,idx:e});a.aoColumns.push(c);c=a.aoPreSearchCols;c[e]=h.extend({},m.models.oSearch,c[e]);ka(a,e,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],e=a.oClasses,d=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=d.attr("width")||null;var f=(d.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),H(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&& -(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=R(g),i=b.mRender?R(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var e=j(a,b,k,c);return i&&b?i(e,b,a,c):e};b.fnSetData=function(a,b,c){return S(g)(a,b,c)};"number"!==typeof g&& -(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,d.addClass(e.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=e.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=e.sSortableAsc,b.sSortingClassJUI=e.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=e.sSortableDesc,b.sSortingClassJUI=e.sSortJUIDescAllowed):(b.sSortingClass=e.sSortable,b.sSortingClassJUI=e.sSortJUI)}function X(a){if(!1!==a.oFeatures.bAutoWidth){var b= -a.aoColumns;Ga(a);for(var c=0,e=b.length;cq[f])e(l.length+q[f],o);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[d]--; -1!=e&&c===k&&a.splice(e,1)}function ca(a,b,c,e){var d=a.aoData[b],f,g=function(c,f){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=x(a,b,f,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===d.src)d._aData=na(a,d,e,e===k?k:d._aData).data;else{var j=d.anCells;if(j)if(e!==k)g(j[e],e);else{c=0;for(f=j.length;c").appendTo(g));b=0;for(c=l.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH); -h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,o=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:o;for(j=j?0:g;j",{"class":d?e[0]:""}).append(h("",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];w(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],La(a),g,o,i]);w(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],La(a),g,o,i]);e=h(a.nTBody);e.children().detach();e.append(h(b));w(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing= -!1}}function N(a,b){var c=a.oFeatures,e=c.bFilter;c.bSort&&lb(a);e?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;M(a);a._drawHold=!1}function mb(a){var b=a.oClasses,c=h(a.nTable),c=h("
").insertBefore(c),e=a.oFeatures,d=h("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=d[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,o,l,q,n=0;n")[0];o=f[n+1];if("'"==o||'"'==o){l="";for(q=2;f[n+q]!=o;)l+=f[n+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(o=l.split("."),i.id=o[0].substr(1,o[0].length-1),i.className=o[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;n+=q}d.append(i);d=h(i)}else if(">"==j)d=d.parent();else if("l"==j&&e.bPaginate&&e.bLengthChange)g=nb(a);else if("f"==j&&e.bFilter)g=ob(a);else if("r"==j&&e.bProcessing)g=pb(a);else if("t"==j)g=qb(a);else if("i"== -j&&e.bInfo)g=rb(a);else if("p"==j&&e.bPaginate)g=sb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(o=i.length;q',j=e.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("
",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("
").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",d[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());M(a)});h(a.nTable).bind("length.dt.DT",function(b,c,f){a===c&&h("select",i).val(f)});return i[0]}function sb(a){var b=a.sPaginationType,c=m.ext.pager[b],e="function"===typeof c,d=function(a){M(a)},b=h("
").addClass(a.oClasses.sPaging+b)[0], -f=a.aanFeatures;e||c.fnInit(a,b,d);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(e){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),q,l=0;for(q=f.p.length;lf&&(e=0)): -"first"==b?e=0:"previous"==b?(e=0<=d?e-d:0,0>e&&(e=0)):"next"==b?e+d",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");w(a, -null,"processing",[a,b])}function qb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var e=c.sX,d=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),o=h(b[0].cloneNode(!1)),l=b.children("tfoot");c.sX&&"100%"===b.attr("width")&&b.removeAttr("width");l.length||(l=null);c=h("
",{"class":f.sScrollWrapper}).append(h("
",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0, -width:e?!e?null:s(e):"100%"}).append(h("
",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("
",{"class":f.sScrollBody}).css({overflow:"auto",height:!d?null:s(d),width:!e?null:s(e)}).append(b));l&&c.append(h("
",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:e?!e?null:s(e):"100%"}).append(h("
",{"class":f.sScrollFootInner}).append(o.removeAttr("id").css("margin-left", -0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=c.children(),q=b[0],f=b[1],n=l?b[2]:null;if(e)h(f).on("scroll.DT",function(){var a=this.scrollLeft;q.scrollLeft=a;l&&(n.scrollLeft=a)});a.nScrollHead=q;a.nScrollBody=f;a.nScrollFoot=n;a.aoDrawCallback.push({fn:Y,sName:"scrolling"});return c[0]}function Y(a){var b=a.oScroll,c=b.sX,e=b.sXInner,d=b.sY,f=b.iBarWidth,g=h(a.nScrollHead),j=g[0].style,i=g.children("div"),o=i[0].style,l=i.children("table"),i=a.nScrollBody,q=h(i),n=i.style, -k=h(a.nScrollFoot).children("div"),p=k.children("table"),m=h(a.nTHead),r=h(a.nTable),t=r[0],O=t.style,L=a.nTFoot?h(a.nTFoot):null,ha=a.oBrowser,w=ha.bScrollOversize,v,u,y,x,z,A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};r.children("thead, tfoot").remove();z=m.clone().prependTo(r);v=m.find("tr");y=z.find("tr");z.find("th, td").removeAttr("tabindex");L&&(x=L.clone().prependTo(r),u=L.find("tr"),x=x.find("tr")); -c||(n.width="100%",g[0].style.width="100%");h.each(qa(a,z),function(b,c){D=la(a,b);c.style.width=a.aoColumns[D].sWidth});L&&G(function(a){a.style.width=""},x);b.bCollapse&&""!==d&&(n.height=q[0].offsetHeight+m[0].offsetHeight+"px");g=r.outerWidth();if(""===c){if(O.width="100%",w&&(r.find("tbody").height()>i.offsetHeight||"scroll"==q.css("overflow-y")))O.width=s(r.outerWidth()-f)}else""!==e?O.width=s(e):g==q.width()&&q.height()g-f&&(O.width=s(g))):O.width= -s(g);g=r.outerWidth();G(E,y);G(function(a){C.push(a.innerHTML);A.push(s(h(a).css("width")))},y);G(function(a,b){a.style.width=A[b]},v);h(y).height(0);L&&(G(E,x),G(function(a){B.push(s(h(a).css("width")))},x),G(function(a,b){a.style.width=B[b]},u),h(x).height(0));G(function(a,b){a.innerHTML='
'+C[b]+"
";a.style.width=A[b]},y);L&&G(function(a,b){a.innerHTML="";a.style.width=B[b]},x);if(r.outerWidth()i.offsetHeight|| -"scroll"==q.css("overflow-y")?g+f:g;if(w&&(i.scrollHeight>i.offsetHeight||"scroll"==q.css("overflow-y")))O.width=s(u-f);(""===c||""!==e)&&I(a,1,"Possible column misalignment",6)}else u="100%";n.width=s(u);j.width=s(u);L&&(a.nScrollFoot.style.width=s(u));!d&&w&&(n.height=s(t.offsetHeight+f));d&&b.bCollapse&&(n.height=s(d),b=c&&t.offsetWidth>i.offsetWidth?f:0,t.offsetHeighti.clientHeight|| -"scroll"==q.css("overflow-y");ha="padding"+(ha.bScrollbarLeft?"Left":"Right");o[ha]=l?f+"px":"0px";L&&(p[0].style.width=s(b),k[0].style.width=s(b),k[0].style[ha]=l?f+"px":"0px");q.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)i.scrollTop=0}function G(a,b,c){for(var e=0,d=0,f=b.length,g,j;d").appendTo(j.find("tbody"));j.find("tfoot th, tfoot td").css("width", -"");i=qa(a,j.find("thead")[0]);for(n=0;n").css("width",s(a)).appendTo(b||Q.body),e=c[0].offsetWidth;c.remove();return e}function Fb(a,b){var c=a.oScroll;if(c.sX||c.sY)c=!c.sX?c.iBarWidth:0,b.style.width=s(h(b).outerWidth()-c)}function Eb(a,b){var c=Gb(a,b);if(0>c)return null;var e=a.aoData[c];return!e.nTr?h("").html(x(a,c,b,"display"))[0]:e.anCells[b]}function Gb(a,b){for(var c,e=-1,d=-1,f=0,g=a.aoData.length;fe&&(e=c.length,d=f);return d}function s(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Hb(){var a=m.__scrollbarWidth;if(a===k){var b=h("

").css({position:"absolute",top:0,left:0,width:"100%",height:150,padding:0,overflow:"scroll",visibility:"hidden"}).appendTo("body"),a=b[0].offsetWidth-b[0].clientWidth;m.__scrollbarWidth=a;b.remove()}return a}function U(a){var b,c,e=[],d=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var o=[]; -f=function(a){a.length&&!h.isArray(a[0])?o.push(a):o.push.apply(o,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ad?1:0,0!==c)return"asc"===j.dir?c:-c;c=e[a];d=e[b];return cd?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,r=f[b]._aSortData;for(j=0;jg?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,e=a.aoColumns,d=U(a),a=a.oLanguage.oAria,f=0,g=e.length;f/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0d?d+1:3));d=0;for(f=e.length;dd?d+1:3))}a.aLastSort=e}function Ib(a,b){var c=a.aoColumns[b],e=m.ext.order[c.sSortDataType],d;e&&(d=e.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j=e.length?[0,c[1]]:c)}));d.search!==k&&h.extend(a.oPreviousSearch,Ab(d.search));b=0;for(c=d.columns.length;b=c&&(b=c-e);b-=b%e;if(-1===e||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,e=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?e[c[b]]||e._:"string"===typeof c?e[c]||e._:e._}function B(a){return a.oFeatures.bServerSide? -"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Wa(a,b){var c=[],c=Mb.numbers_length,e=Math.floor(c/2);b<=c?c=V(0,b):a<=e?(c=V(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-e?c=V(b-(c-2),b):(c=V(a-e+2,a+e-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Aa(b,a)},"num-fmt":function(b){return Aa(b,a,Xa)},"html-num":function(b){return Aa(b,a,Ba)},"html-num-fmt":function(b){return Aa(b,a,Ba,Xa)}},function(b, -c){u.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(u.type.search[b+a]=u.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,u,t,r,v,Ya={},Ob=/[\r\n]/g,Ba=/<.*?>/g,ac=/^[\w\+\-]/,bc=/[\w\+\-]$/,Yb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Xa=/[',$\u00a3\u20ac\u00a5%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,J=function(a){return!a||!0===a|| -"-"===a?!0:!1},Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var e="string"===typeof a;if(J(a))return!0;b&&e&&(a=Qb(a,b));c&&e&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return J(a)?!0:!(J(a)||"string"===typeof a)?null:Za(a.replace(Ba,""),b,c)?!0:null},D=function(a,b,c){var e=[],d=0,f=a.length; -if(c!==k)for(;d")[0],Zb=wa.textContent!==k,$b=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new t(za(this[u.iApiIndex])):new t(this)};this.fnAddData=function(a,b){var c=this.api(!0),e=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b=== -k||b)&&c.draw();return e.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],e=c.oScroll;a===k||a?b.draw(!1):(""!==e.sX||""!==e.sY)&&Y(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var e=this.api(!0),a=e.rows(a),d=a.settings()[0],h=d.aoData[a[0][0]];a.remove();b&&b.call(this,d,h);(c===k||c)&&e.draw();return h}; -this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,e,d,h){d=this.api(!0);null===b||b===k?d.search(a,c,e,h):d.column(b).search(a,c,e,h);d.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var e=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==e||"th"==e?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()}; -this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c=== -k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return za(this[u.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,e,d){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(d===k||d)&&h.columns.adjust();(e===k||e)&&h.draw();return 0};this.fnVersionCheck=u.fnVersionCheck;var b=this,c=a===k,e=this.length;c&&(a={});this.oApi=this.internal=u.internal;for(var d in m.ext.internal)d&& -(this[d]=Nb(d));this.each(function(){var d={},d=1t<"F"ip>'),p.renderer)? -h.isPlainObject(p.renderer)&&!p.renderer.header&&(p.renderer.header="jqueryui"):p.renderer="jqueryui":h.extend(i,m.ext.classes,d.oClasses);q.addClass(i.sTable);if(""!==p.oScroll.sX||""!==p.oScroll.sY)p.oScroll.iBarWidth=Hb();!0===p.oScroll.sX&&(p.oScroll.sX="100%");p.iInitDisplayStart===k&&(p.iInitDisplayStart=d.iDisplayStart,p._iDisplayStart=d.iDisplayStart);null!==d.iDeferLoading&&(p.bDeferLoading=!0,g=h.isArray(d.iDeferLoading),p._iRecordsDisplay=g?d.iDeferLoading[0]:d.iDeferLoading,p._iRecordsTotal= -g?d.iDeferLoading[1]:d.iDeferLoading);var t=p.oLanguage;h.extend(!0,t,d.oLanguage);""!==t.sUrl&&(h.ajax({dataType:"json",url:t.sUrl,success:function(a){P(a);H(l.oLanguage,a);h.extend(true,t,a);ga(p)},error:function(){ga(p)}}),o=!0);null===d.asStripeClasses&&(p.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=p.asStripeClasses,s=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return s.hasClass(a)}))&&(h("tbody tr",this).removeClass(g.join(" ")),p.asDestroyStripes=g.slice()); -n=[];g=this.getElementsByTagName("thead");0!==g.length&&(da(p.aoHeader,g[0]),n=qa(p));if(null===d.aoColumns){r=[];g=0;for(j=n.length;g").appendTo(this));p.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("").appendTo(this));p.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0").appendTo(this);0===j.length||0===j.children().length?q.addClass(i.sNoFooter): -0a?new t(b[a],this[a]):null},filter:function(a){var b=[];if(y.filter)b=y.filter.call(this,a,this);else for(var c=0,e=this.length;c").addClass(b), -h("td",c).addClass(b).html(a)[0].colSpan=aa(e),d.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(d);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});r(["row().child.show()","row().child().show()"],function(){Vb(this,!0);return this});r(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});r(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});r("row().child.isShown()",function(){var a=this.context;return a.length&& -this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var dc=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,e,d){for(var c=[],e=0,f=d.length;e=0?b:g.length+b];if(typeof a==="function"){var d=Ca(c, -f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,d),i[f])?f:null})}var k=typeof a==="string"?a.match(dc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[la(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null})}else return h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray()},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});v("columns().header()", -"column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});v("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});v("columns().data()","column().data()",function(){return this.iterator("column-rows",Wb,1)});v("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});v("columns().cache()","column().cache()", -function(a){return this.iterator("column-rows",function(b,c,e,d,f){return ia(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});v("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,e,d){return ia(a.aoData,d,"anCells",b)},1)});v("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,e){if(a===k)return c.aoColumns[e].bVisible;var d=c.aoColumns,f=d[e],g=c.aoData,j,i,m;if(a!==k&&f.bVisible!==a){if(a){var l= -h.inArray(!0,D(d,"bVisible"),e+1);j=0;for(i=g.length;je;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings, -function(a,d){var f=d.nScrollHead?h("table",d.nScrollHead)[0]:null,g=d.nScrollFoot?h("table",d.nScrollFoot)[0]:null;if(d.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){return h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable})};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=H;r("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a, -b){r(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var e=h(this.tables().nodes());e[b].apply(e,a);return this})});r("clear()",function(){return this.iterator("table",function(a){oa(a)})});r("settings()",function(){return new t(this.context,this.context)});r("init()",function(){var a=this.context;return a.length?a[0].oInit:null});r("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});r("destroy()", -function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,e=b.oClasses,d=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(d),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),q;b.bDestroying=!0;w(b,"aoDestroyCallback","destroy",[b]);a||(new t(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(Ea).unbind(".DT-"+b.sInstance);d!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&d!=j.parentNode&&(i.children("tfoot").detach(), -i.append(j));i.detach();k.detach();b.aaSorting=[];b.aaSortingFixed=[];xa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(e.sSortable+" "+e.sSortableAsc+" "+e.sSortableDesc+" "+e.sSortableNone);b.bJUI&&(h("th span."+e.sSortIcon+", td span."+e.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+e.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));!a&&c&&c.insertBefore(d,b.nTableReinsertBefore);f.children().detach();f.append(l);i.css("width",b.sDestroyWidth).removeClass(e.sTable); -(q=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%q])});c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){r(b+"s().every()",function(a){return this.iterator(b,function(e,d,f){a.call((new t(e))[b](d,f))})})});r("i18n()",function(a,b,c){var e=this.context[0],a=R(a)(e.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.7";m.settings= -[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std", -sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1, -fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null, -fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"}, -sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null, -sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};W(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};W(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null, -bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[], -sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null, -bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==B(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==B(this)?1*this._iRecordsDisplay: -this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,e=this.aiDisplay.length,d=this.oFeatures,f=d.bPaginate;return d.bServerSide?!1===f||-1===a?b+e:Math.min(b+a,this._iRecordsDisplay):!f||c>e||-1===a?e:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}};m.ext=u={buttons:{},classes:{},errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{}, -header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(u,{afnFiltering:u.search,aTypes:u.type.detect,ofnSearch:u.type.search,oSort:u.type.order,afnSortData:u.order,aoFeatures:u.feature,oApi:u.internal,oStdClasses:u.classes,oPagination:u.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd", -sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead", -sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Da="",Da="",F=Da+"ui-state-default",ja=Da+"css_right ui-icon ui-icon-",Xb=Da+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses, -m.ext.classes,{sPageButton:"fg-button ui-button "+F,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:F+" sorting_asc",sSortDesc:F+" sorting_desc",sSortable:F+" sorting",sSortableAsc:F+" sorting_asc_disabled",sSortableDesc:F+" sorting_desc_disabled",sSortableNone:F+" sorting_disabled",sSortJUIAsc:ja+"triangle-1-n",sSortJUIDesc:ja+"triangle-1-s",sSortJUI:ja+"carat-2-n-s", -sSortJUIAscAllowed:ja+"carat-1-n",sSortJUIDescAllowed:ja+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+F,sScrollFoot:"dataTables_scrollFoot "+F,sHeaderTH:F,sFooterTH:F,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a,b){return["previous", -Wa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Wa(a,b),"next","last"]},_numbers:Wa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,e,d,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i,k,l=0,m=function(b,e){var n,r,t,s,u=function(b){Ta(a,b.data.action,true)};n=0;for(r=e.length;n").appendTo(b);m(t,s)}else{k=i="";switch(s){case "ellipsis":b.append('');break; -case "first":i=j.sFirst;k=s+(d>0?"":" "+g.sPageButtonDisabled);break;case "previous":i=j.sPrevious;k=s+(d>0?"":" "+g.sPageButtonDisabled);break;case "next":i=j.sNext;k=s+(d",{"class":g.sPageButton+" "+k,"aria-controls":a.sTableId,"data-dt-idx":l,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(i).appendTo(b); -Va(t,{action:s},u);l++}}}},n;try{n=h(Q.activeElement).data("dt-idx")}catch(r){}m(h(b).empty(),e);n&&h(b).find("[data-dt-idx="+n+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||J(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal; -return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return J(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return J(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ba,""):""},string:function(a){return J(a)?a:"string"===typeof a?a.replace(Ob," "):a}});var Aa=function(a,b,c,e){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")), -e&&(a=a.replace(e,"")));return 1*a};h.extend(u.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return J(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return J(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,e){h(a.nTable).on("order.dt.DT",function(d, -f,g,h){if(a===f){d=c.idx;b.removeClass(c.sSortingClass+" "+e.sSortAsc+" "+e.sSortDesc).addClass(h[d]=="asc"?e.sSortAsc:h[d]=="desc"?e.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,e){h("

").addClass(e.sSortJUIWrapper).append(b.contents()).append(h("").addClass(e.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(d,f,g,h){if(a===f){d=c.idx;b.removeClass(e.sSortAsc+" "+e.sSortDesc).addClass(h[d]=="asc"?e.sSortAsc:h[d]=="desc"?e.sSortDesc:c.sSortingClass); -b.find("span."+e.sSortIcon).removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed).addClass(h[d]=="asc"?e.sSortJUIAsc:h[d]=="desc"?e.sSortJUIDesc:c.sSortingClassJUI)}})}}});m.render={number:function(a,b,c,e){return{display:function(d){if("number"!==typeof d&&"string"!==typeof d)return d;var f=0>d?"-":"",d=Math.abs(parseFloat(d)),g=parseInt(d,10),d=c?b+(d-g).toFixed(c).substring(2):"";return f+(e||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g, -a)+d}}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:kb,_fnAjaxParameters:tb,_fnAjaxUpdateDraw:ub,_fnAjaxDataSrc:sa,_fnAddColumn:Fa,_fnColumnOptions:ka,_fnAdjustColumnSizing:X,_fnVisibleToColumnIndex:la,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:Z,_fnColumnTypes:Ha,_fnApplyColumnDefs:ib,_fnHungarianMap:W,_fnCamelToHungarian:H,_fnLanguageCompat:P,_fnBrowserDetect:gb,_fnAddData:K,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex: -null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:x,_fnSetCellData:Ia,_fnSplitObjNotation:Ka,_fnGetObjectDataFn:R,_fnSetObjectDataFn:S,_fnGetDataMaster:La,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:ca,_fnGetRowElements:na,_fnCreateTr:Ja,_fnBuildHead:jb,_fnDrawHead:ea,_fnDraw:M,_fnReDraw:N,_fnAddOptionsHtml:mb,_fnDetectHeader:da,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:ob,_fnFilterComplete:fa,_fnFilterCustom:xb,_fnFilterColumn:wb,_fnFilter:vb,_fnFilterCreateSearch:Qa, -_fnEscapeRegex:va,_fnFilterData:yb,_fnFeatureHtmlInfo:rb,_fnUpdateInfo:Bb,_fnInfoMacros:Cb,_fnInitialise:ga,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:nb,_fnFeatureHtmlPaginate:sb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:pb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:qb,_fnScrollDraw:Y,_fnApplyToChildren:G,_fnCalculateColumnWidths:Ga,_fnThrottle:ua,_fnConvertToWidth:Db,_fnScrollingWidthAdjust:Fb,_fnGetWidestNode:Eb,_fnGetMaxLenString:Gb,_fnStringToCss:s,_fnScrollBarWidth:Hb,_fnSortFlatten:U, -_fnSort:lb,_fnSortAria:Jb,_fnSortListener:Ua,_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:I,_fnMap:E,_fnBindAction:Va,_fnCallbackReg:z,_fnCallbackFire:w,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:B,_fnRowAttributes:Ma,_fnCalculateEnd:function(){}});h.fn.dataTable=m;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]= -b});return h.fn.dataTable};"function"===typeof define&&define.amd?define("datatables",["jquery"],P):"object"===typeof exports?module.exports=P(require("jquery")):jQuery&&!jQuery.fn.dataTable&&P(jQuery)})(window,document); +!function(n){"use strict";var a;"function"==typeof define&&define.amd?define(["jquery"],function(t){return n(t,window,document)}):"object"==typeof exports?(a=require("jquery"),"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||a(t),n(e,t,t.document)}:n(a,window,window.document)):window.DataTable=n(jQuery,window,document)}(function(P,j,v,H){"use strict";function d(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null}function l(t,e,n){var a=typeof t,r="string"==a;return"number"==a||"bigint"==a||!!h(t)||(e&&r&&(t=$(t,e)),n&&r&&(t=t.replace(q,"")),!isNaN(parseFloat(t))&&isFinite(t))}function a(t,e,n){var a;return!!h(t)||(h(a=t)||"string"==typeof a)&&!!l(t.replace(V,"").replace(/