Compare commits
No commits in common. "main" and "v0.0.1" have entirely different histories.
9
.github/pull_request_template.md
vendored
9
.github/pull_request_template.md
vendored
|
@ -1,9 +0,0 @@
|
||||||
Please answer the following questions and leave the below in as part of your PR.
|
|
||||||
|
|
||||||
- [ ] I have read the [developer documentation](https://github.com/babashka/scittle/blob/main/doc/dev.md).
|
|
||||||
|
|
||||||
- [ ] This PR corresponds to an [issue with a clear problem statement](https://github.com/babashka/scittle/blob/main/doc/dev.md#start-with-an-issue-before-writing-code).
|
|
||||||
|
|
||||||
<!-- - [ ] This PR contains a [test](https://github.com/babashka/scittle/blob/main/doc/dev.md#tests) to prevent against future regressions -->
|
|
||||||
|
|
||||||
- [ ] I have updated the [CHANGELOG.md](https://github.com/babashka/scittle/blob/main/CHANGELOG.md) file with a description of the addressed issue.
|
|
21
.gitignore
vendored
21
.gitignore
vendored
|
@ -1,21 +0,0 @@
|
||||||
.cpcache
|
|
||||||
.nrepl-port
|
|
||||||
target
|
|
||||||
repl
|
|
||||||
scratch.clj
|
|
||||||
.shadow-cljs
|
|
||||||
target
|
|
||||||
yarn.lock
|
|
||||||
node_modules/
|
|
||||||
.DS_Store
|
|
||||||
resources/public/js
|
|
||||||
.store
|
|
||||||
gh-pages/
|
|
||||||
gh-pages/
|
|
||||||
/.lsp
|
|
||||||
/dist
|
|
||||||
/.clj-kondo/.cache
|
|
||||||
/.clj-kondo/rewrite-clj
|
|
||||||
/plugins/demo/resources/public/js/
|
|
||||||
.portal
|
|
||||||
resources/public/test/scratch.html
|
|
110
CHANGELOG.md
110
CHANGELOG.md
|
@ -1,110 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
[Scittle](https://github.com/babashka/scittle): execute Clojure(Script) directly from browser script tags via SCI!
|
|
||||||
|
|
||||||
<!-- To create a new NPM release: -->
|
|
||||||
|
|
||||||
<!-- - Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github -->
|
|
||||||
<!-- - `bb replace-version 0.6.22 0.7.23` -->
|
|
||||||
<!-- - Create Github release with updated links from `doc/links.md` -->
|
|
||||||
<!-- - `bb gh-pages` -->
|
|
||||||
|
|
||||||
## v0.7.27 (2025-08-21)
|
|
||||||
|
|
||||||
- [#95](https://github.com/babashka/scittle/issues/121): support string requires
|
|
||||||
of `globalThis` js deps ([@chr15m](https://github.com/chr15m)). See
|
|
||||||
[docs](https://github.com/babashka/scittle/blob/main/doc/js-libraries.md).
|
|
||||||
- Potentially breaking: `(.-foo-bar {})` now behaves as `{}.foo_bar`, i.e. the property or method name is munged.
|
|
||||||
|
|
||||||
## v0.7.26 (2025-08-20)
|
|
||||||
|
|
||||||
- [#121](https://github.com/babashka/scittle/issues/121): add `cjohansen/dataspex` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
|
||||||
- [#118](https://github.com/babashka/scittle/issues/118): add `goog.string/format` ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
|
||||||
- Support alternative `(set! #js {} -a 1)` CLJS syntax (by bumping SCI)
|
|
||||||
- Add source maps to distribution
|
|
||||||
- Add dev versions of all modules in the `dev` folder of the distribution + a `dev/scitte.cljs-devtools.js` module
|
|
||||||
|
|
||||||
## v0.7.23 (2025-06-18)
|
|
||||||
|
|
||||||
- [#107](https://github.com/babashka/scittle/issues/107): add `replicant` plugin ([@jeroenvandijk](https://github.com/jeroenvandijk))
|
|
||||||
- [#102](https://github.com/babashka/scittle/issues/102): add `applied-science/js-interop` plugin ([@chr15m](https://github.com/chr15m))
|
|
||||||
- [#105](https://github.com/babashka/scittle/issues/105): add `goog.string/htmlEscape` ([@ikappaki](https://github.com/ikappaki) )
|
|
||||||
- [#113](https://github.com/babashka/scittle/issues/113): add `unchecked-set` and `unchecked-get`
|
|
||||||
|
|
||||||
## v0.6.22 (2024-12-19)
|
|
||||||
|
|
||||||
- [#99](https://github.com/babashka/scittle/issues/99): make `js/import` work
|
|
||||||
|
|
||||||
## v0.6.20 (2024-11-24)
|
|
||||||
|
|
||||||
- [#55](https://github.com/babashka/scittle/issues/55): create gh-pages dir before using.
|
|
||||||
- [#89](https://github.com/babashka/scittle/issues/89): allow `evaluate_script_tags` to specify individual scripts.
|
|
||||||
- [#87](https://github.com/babashka/scittle/issues/87): prod build on fresh checkout fails
|
|
||||||
|
|
||||||
## v0.6.19 (2024-10-08)
|
|
||||||
|
|
||||||
- Add `cljs.pprint/code-dispatch` and `cljs.pprint/with-pprint-dispatch`
|
|
||||||
|
|
||||||
## v0.6.18 (2024-04-30)
|
|
||||||
|
|
||||||
- [#77](https://github.com/babashka/scittle/issues/77): make dependency on browser (`js/document`) optional so scittle can run in webworkers, Node.js, etc.
|
|
||||||
|
|
||||||
## v0.6.17 (2024-04-22)
|
|
||||||
|
|
||||||
- [#69](https://github.com/babashka/scittle/issues/69): executing script tag with src + whitespace doesn't work
|
|
||||||
- [#72](https://github.com/babashka/scittle/issues/72): add clojure 1.11 functions like `update-vals`
|
|
||||||
- [#75](https://github.com/babashka/scittle/issues/75): Support reader conditionals in source code
|
|
||||||
|
|
||||||
## v0.6.16 (2023-05-04)
|
|
||||||
|
|
||||||
- [#58](https://github.com/babashka/scittle/issues/58): build system for creating scittle distribution with custom libraries. See [plugins/demo](plugins/demo).
|
|
||||||
- Use `window.location.hostname` for WebSocket connection instead of hardcoding `"localhost"` ([@pyrmont](https://github.com/pyrmont))
|
|
||||||
- Upgrade `sci.configs` to `"33bd51e53700b224b4cb5bda59eb21b62f962745"`
|
|
||||||
- Update nREPL implementation: implement `eldoc` (`info`, `lookup`) ([@benjamin-asdf](https://github.com/benjamin-asdf))
|
|
||||||
|
|
||||||
## v0.6.15 (2023-01-05)
|
|
||||||
|
|
||||||
- Fix destructuring in `defmethod` (by upgrading SCI)
|
|
||||||
|
|
||||||
## v0.5.13 (2022-12-23)
|
|
||||||
|
|
||||||
- Fix `cljs.pprint` plugin
|
|
||||||
|
|
||||||
## v0.5.12 (2022-12-23)
|
|
||||||
|
|
||||||
- Fix `reagent` `with-let` macro with advanced compiled builds
|
|
||||||
- Upgrade promesa and shadow-cljs
|
|
||||||
- Fix `#queue` literal
|
|
||||||
- SCI: performance improvements
|
|
||||||
|
|
||||||
## v0.4.11 (2022-11-23)
|
|
||||||
|
|
||||||
- Add `scittle.re-frame` plugin. This gives access to the
|
|
||||||
[re-frame](https://github.com/day8/re-frame) library.
|
|
||||||
- Fix for [44](https://github.com/babashka/scittle/issues/44): Honoring `SCITTLE_NREPL_WEBSOCKET_PORT` in `scittle.nrepl`
|
|
||||||
- Add all public vars of `cljs-ajax` `ajax.core`
|
|
||||||
- Upgrade several built-in libraries
|
|
||||||
|
|
||||||
## v0.3.10
|
|
||||||
|
|
||||||
- Add `scittle.promesa.js` plugin. This gives access to the [promesa](https://cljdoc.org/d/funcool/promesa/8.0.450/doc/user-guide) library.
|
|
||||||
- Add `scittle.pprint.js` plugin. This gives access to [cljs.pprint](https://cljs.github.io/api/cljs.pprint/).
|
|
||||||
- Improve error messages
|
|
||||||
|
|
||||||
## v0.2.8
|
|
||||||
|
|
||||||
- Upgrade to SCI 0.3.1
|
|
||||||
- Upgrade to Reagent 1.1.0
|
|
||||||
- Add support for Reagent's `create-class` and `with-let`
|
|
||||||
|
|
||||||
## v0.1.1
|
|
||||||
|
|
||||||
- Upgrade to SCI 0.3.0
|
|
||||||
|
|
||||||
## v0.1.0
|
|
||||||
|
|
||||||
- Fixes for `try/catch`
|
|
||||||
|
|
||||||
## v0.0.1
|
|
||||||
|
|
||||||
Initial release.
|
|
198
LICENSE
198
LICENSE
|
@ -1,198 +0,0 @@
|
||||||
Eclipse Public License - v 1.0
|
|
||||||
|
|
||||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
|
||||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
|
||||||
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
|
||||||
|
|
||||||
1. DEFINITIONS
|
|
||||||
|
|
||||||
"Contribution" means:
|
|
||||||
|
|
||||||
a) in the case of the initial Contributor, the initial code and documentation
|
|
||||||
distributed under this Agreement, and
|
|
||||||
b) in the case of each subsequent Contributor:
|
|
||||||
i) changes to the Program, and
|
|
||||||
ii) additions to the Program;
|
|
||||||
|
|
||||||
where such changes and/or additions to the Program originate from and are
|
|
||||||
distributed by that particular Contributor. A Contribution 'originates' from
|
|
||||||
a Contributor if it was added to the Program by such Contributor itself or
|
|
||||||
anyone acting on such Contributor's behalf. Contributions do not include
|
|
||||||
additions to the Program which: (i) are separate modules of software
|
|
||||||
distributed in conjunction with the Program under their own license
|
|
||||||
agreement, and (ii) are not derivative works of the Program.
|
|
||||||
|
|
||||||
"Contributor" means any person or entity that distributes the Program.
|
|
||||||
|
|
||||||
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
|
||||||
necessarily infringed by the use or sale of its Contribution alone or when
|
|
||||||
combined with the Program.
|
|
||||||
|
|
||||||
"Program" means the Contributions distributed in accordance with this Agreement.
|
|
||||||
|
|
||||||
"Recipient" means anyone who receives the Program under this Agreement,
|
|
||||||
including all Contributors.
|
|
||||||
|
|
||||||
2. GRANT OF RIGHTS
|
|
||||||
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
|
||||||
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
|
||||||
reproduce, prepare derivative works of, publicly display, publicly perform,
|
|
||||||
distribute and sublicense the Contribution of such Contributor, if any, and
|
|
||||||
such derivative works, in source code and object code form.
|
|
||||||
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
|
||||||
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
|
||||||
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
|
||||||
transfer the Contribution of such Contributor, if any, in source code and
|
|
||||||
object code form. This patent license shall apply to the combination of the
|
|
||||||
Contribution and the Program if, at the time the Contribution is added by
|
|
||||||
the Contributor, such addition of the Contribution causes such combination
|
|
||||||
to be covered by the Licensed Patents. The patent license shall not apply
|
|
||||||
to any other combinations which include the Contribution. No hardware per
|
|
||||||
se is licensed hereunder.
|
|
||||||
c) Recipient understands that although each Contributor grants the licenses to
|
|
||||||
its Contributions set forth herein, no assurances are provided by any
|
|
||||||
Contributor that the Program does not infringe the patent or other
|
|
||||||
intellectual property rights of any other entity. Each Contributor
|
|
||||||
disclaims any liability to Recipient for claims brought by any other entity
|
|
||||||
based on infringement of intellectual property rights or otherwise. As a
|
|
||||||
condition to exercising the rights and licenses granted hereunder, each
|
|
||||||
Recipient hereby assumes sole responsibility to secure any other
|
|
||||||
intellectual property rights needed, if any. For example, if a third party
|
|
||||||
patent license is required to allow Recipient to distribute the Program, it
|
|
||||||
is Recipient's responsibility to acquire that license before distributing
|
|
||||||
the Program.
|
|
||||||
d) Each Contributor represents that to its knowledge it has sufficient
|
|
||||||
copyright rights in its Contribution, if any, to grant the copyright
|
|
||||||
license set forth in this Agreement.
|
|
||||||
|
|
||||||
3. REQUIREMENTS
|
|
||||||
|
|
||||||
A Contributor may choose to distribute the Program in object code form under its
|
|
||||||
own license agreement, provided that:
|
|
||||||
|
|
||||||
a) it complies with the terms and conditions of this Agreement; and
|
|
||||||
b) its license agreement:
|
|
||||||
i) effectively disclaims on behalf of all Contributors all warranties and
|
|
||||||
conditions, express and implied, including warranties or conditions of
|
|
||||||
title and non-infringement, and implied warranties or conditions of
|
|
||||||
merchantability and fitness for a particular purpose;
|
|
||||||
ii) effectively excludes on behalf of all Contributors all liability for
|
|
||||||
damages, including direct, indirect, special, incidental and
|
|
||||||
consequential damages, such as lost profits;
|
|
||||||
iii) states that any provisions which differ from this Agreement are offered
|
|
||||||
by that Contributor alone and not by any other party; and
|
|
||||||
iv) states that source code for the Program is available from such
|
|
||||||
Contributor, and informs licensees how to obtain it in a reasonable
|
|
||||||
manner on or through a medium customarily used for software exchange.
|
|
||||||
|
|
||||||
When the Program is made available in source code form:
|
|
||||||
|
|
||||||
a) it must be made available under this Agreement; and
|
|
||||||
b) a copy of this Agreement must be included with each copy of the Program.
|
|
||||||
Contributors may not remove or alter any copyright notices contained within
|
|
||||||
the Program.
|
|
||||||
|
|
||||||
Each Contributor must identify itself as the originator of its Contribution, if
|
|
||||||
any, in a manner that reasonably allows subsequent Recipients to identify the
|
|
||||||
originator of the Contribution.
|
|
||||||
|
|
||||||
4. COMMERCIAL DISTRIBUTION
|
|
||||||
|
|
||||||
Commercial distributors of software may accept certain responsibilities with
|
|
||||||
respect to end users, business partners and the like. While this license is
|
|
||||||
intended to facilitate the commercial use of the Program, the Contributor who
|
|
||||||
includes the Program in a commercial product offering should do so in a manner
|
|
||||||
which does not create potential liability for other Contributors. Therefore, if
|
|
||||||
a Contributor includes the Program in a commercial product offering, such
|
|
||||||
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
|
||||||
every other Contributor ("Indemnified Contributor") against any losses, damages
|
|
||||||
and costs (collectively "Losses") arising from claims, lawsuits and other legal
|
|
||||||
actions brought by a third party against the Indemnified Contributor to the
|
|
||||||
extent caused by the acts or omissions of such Commercial Contributor in
|
|
||||||
connection with its distribution of the Program in a commercial product
|
|
||||||
offering. The obligations in this section do not apply to any claims or Losses
|
|
||||||
relating to any actual or alleged intellectual property infringement. In order
|
|
||||||
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
|
|
||||||
Contributor in writing of such claim, and b) allow the Commercial Contributor to
|
|
||||||
control, and cooperate with the Commercial Contributor in, the defense and any
|
|
||||||
related settlement negotiations. The Indemnified Contributor may participate in
|
|
||||||
any such claim at its own expense.
|
|
||||||
|
|
||||||
For example, a Contributor might include the Program in a commercial product
|
|
||||||
offering, Product X. That Contributor is then a Commercial Contributor. If that
|
|
||||||
Commercial Contributor then makes performance claims, or offers warranties
|
|
||||||
related to Product X, those performance claims and warranties are such
|
|
||||||
Commercial Contributor's responsibility alone. Under this section, the
|
|
||||||
Commercial Contributor would have to defend claims against the other
|
|
||||||
Contributors related to those performance claims and warranties, and if a court
|
|
||||||
requires any other Contributor to pay any damages as a result, the Commercial
|
|
||||||
Contributor must pay those damages.
|
|
||||||
|
|
||||||
5. NO WARRANTY
|
|
||||||
|
|
||||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
|
||||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
|
||||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
|
||||||
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
|
||||||
Recipient is solely responsible for determining the appropriateness of using and
|
|
||||||
distributing the Program and assumes all risks associated with its exercise of
|
|
||||||
rights under this Agreement , including but not limited to the risks and costs
|
|
||||||
of program errors, compliance with applicable laws, damage to or loss of data,
|
|
||||||
programs or equipment, and unavailability or interruption of operations.
|
|
||||||
|
|
||||||
6. DISCLAIMER OF LIABILITY
|
|
||||||
|
|
||||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
|
||||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
|
||||||
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
|
|
||||||
GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
7. GENERAL
|
|
||||||
|
|
||||||
If any provision of this Agreement is invalid or unenforceable under applicable
|
|
||||||
law, it shall not affect the validity or enforceability of the remainder of the
|
|
||||||
terms of this Agreement, and without further action by the parties hereto, such
|
|
||||||
provision shall be reformed to the minimum extent necessary to make such
|
|
||||||
provision valid and enforceable.
|
|
||||||
|
|
||||||
If Recipient institutes patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
|
||||||
(excluding combinations of the Program with other software or hardware)
|
|
||||||
infringes such Recipient's patent(s), then such Recipient's rights granted under
|
|
||||||
Section 2(b) shall terminate as of the date such litigation is filed.
|
|
||||||
|
|
||||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
|
||||||
comply with any of the material terms or conditions of this Agreement and does
|
|
||||||
not cure such failure in a reasonable period of time after becoming aware of
|
|
||||||
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
|
||||||
Recipient agrees to cease use and distribution of the Program as soon as
|
|
||||||
reasonably practicable. However, Recipient's obligations under this Agreement
|
|
||||||
and any licenses granted by Recipient relating to the Program shall continue and
|
|
||||||
survive.
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
|
||||||
order to avoid inconsistency the Agreement is copyrighted and may only be
|
|
||||||
modified in the following manner. The Agreement Steward reserves the right to
|
|
||||||
publish new versions (including revisions) of this Agreement from time to time.
|
|
||||||
No one other than the Agreement Steward has the right to modify this Agreement.
|
|
||||||
The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
|
|
||||||
may assign the responsibility to serve as the Agreement Steward to a suitable
|
|
||||||
separate entity. Each new version of the Agreement will be given a
|
|
||||||
distinguishing version number. The Program (including Contributions) may always
|
|
||||||
be distributed subject to the version of the Agreement under which it was
|
|
||||||
received. In addition, after a new version of the Agreement is published,
|
|
||||||
Contributor may elect to distribute the Program (including its Contributions)
|
|
||||||
under the new version. Except as expressly stated in Sections 2(a) and 2(b)
|
|
||||||
above, Recipient receives no rights or licenses to the intellectual property of
|
|
||||||
any Contributor under this Agreement, whether expressly, by implication,
|
|
||||||
estoppel or otherwise. All rights in the Program not expressly granted under
|
|
||||||
this Agreement are reserved.
|
|
||||||
|
|
||||||
This Agreement is governed by the laws of the State of New York and the
|
|
||||||
intellectual property laws of the United States of America. No party to this
|
|
||||||
Agreement will bring a legal action under this Agreement more than one year
|
|
||||||
after the cause of action arose. Each party waives its rights to a jury trial in
|
|
||||||
any resulting litigation.
|
|
58
README.md
58
README.md
|
@ -1,58 +0,0 @@
|
||||||
# Scittle
|
|
||||||
|
|
||||||
The [Small Clojure Interpreter](https://github.com/babashka/sci) exposed for usage in script tags.
|
|
||||||
|
|
||||||
Try it out on [CodePen](https://codepen.io/Prestance/pen/PoOdZQw)!
|
|
||||||
|
|
||||||
See [Github pages](https://babashka.org/scittle/) for usage.
|
|
||||||
|
|
||||||
See
|
|
||||||
[babashka-scittle-guestbook](https://github.com/kloimhardt/babashka-scittle-guestbook)
|
|
||||||
for a minimal full stack web application.
|
|
||||||
|
|
||||||
See [releases](https://github.com/babashka/scittle/releases) for links to
|
|
||||||
[JSDelivr](https://www.jsdelivr.com) to get versioned artifacts.
|
|
||||||
|
|
||||||
## Serving assets
|
|
||||||
|
|
||||||
To serve assets you can use the
|
|
||||||
[babashka.http-server](https://github.com/babashka/http-server) dependency (with
|
|
||||||
babashka or Clojure JVM):
|
|
||||||
|
|
||||||
``` clojure
|
|
||||||
(require '[babashka.http-server :as http])
|
|
||||||
(http/serve {:port 1341 :dir "resources/public"})
|
|
||||||
@(promise) ;; wait until process is killed
|
|
||||||
```
|
|
||||||
|
|
||||||
### nREPL
|
|
||||||
|
|
||||||
See [doc/nrepl](doc/nrepl).
|
|
||||||
|
|
||||||
### Service worker
|
|
||||||
|
|
||||||
See [doc/serviceworker.md](doc/serviceworker.md).
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
Run `bb tasks` to see all available tasks:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ bb tasks
|
|
||||||
The following tasks are available:
|
|
||||||
|
|
||||||
clean Start from clean slate.
|
|
||||||
dev Development build. Starts webserver and watches for changes.
|
|
||||||
prod Builds production artifacts.
|
|
||||||
release Updates Github pages with new release build.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
Idea by Arne Brasseur a.k.a [plexus](https://github.com/plexus).
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Copyright © 2021 - 2022 Michiel Borkent
|
|
||||||
|
|
||||||
Distributed under the EPL License. See LICENSE.
|
|
|
@ -16,7 +16,7 @@
|
||||||
<pre>
|
<pre>
|
||||||
<code class="html">
|
<code class="html">
|
||||||
<head>
|
<head>
|
||||||
<script src="https://babashka.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
|
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(defn my-alert []
|
(defn my-alert []
|
76
bb.edn
76
bb.edn
|
@ -1,76 +0,0 @@
|
||||||
{:deps {io.github.babashka/sci.nrepl
|
|
||||||
#_{:local/root "../sci.nrepl"}
|
|
||||||
{:git/sha "2f8a9ed2d39a1b09d2b4d34d95494b56468f4a23"}
|
|
||||||
io.github.babashka/http-server
|
|
||||||
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}
|
|
||||||
io.github.scittle/build
|
|
||||||
{:local/root "build"}}
|
|
||||||
|
|
||||||
:tasks
|
|
||||||
{:requires ([scittle.build :as build]
|
|
||||||
[babashka.fs :as fs]
|
|
||||||
[cheshire.core :as json]
|
|
||||||
[babashka.process :as p :refer [process]])
|
|
||||||
|
|
||||||
clean {:doc "Start from clean slate."
|
|
||||||
:task (do (fs/delete-tree (fs/file "resources" "public" "js"))
|
|
||||||
(fs/delete-tree ".cpcache")
|
|
||||||
(fs/delete-tree ".shadow-cljs"))}
|
|
||||||
|
|
||||||
shadow:watch {:doc "Development build. Starts webserver and watches for changes."
|
|
||||||
:task (build/build {:action "watch"
|
|
||||||
:args *command-line-args*})}
|
|
||||||
|
|
||||||
http-server {:doc "Starts http server for serving static files"
|
|
||||||
:requires ([babashka.http-server :as http])
|
|
||||||
:task (do (http/serve {:port 1341 :dir "resources/public"})
|
|
||||||
(println "Serving static assets at http://localhost:1341"))}
|
|
||||||
|
|
||||||
browser-nrepl {:doc "Start browser nREPL"
|
|
||||||
:requires ([sci.nrepl.browser-server :as bp])
|
|
||||||
:task (bp/start! {})}
|
|
||||||
|
|
||||||
-dev {:depends [shadow:watch browser-nrepl http-server]}
|
|
||||||
|
|
||||||
dev {:doc "Development build. Starts webserver and watches for changes."
|
|
||||||
:task (do (run '-dev {:parallel true})
|
|
||||||
(deref (promise)))}
|
|
||||||
|
|
||||||
prod {:doc "Builds production artifacts."
|
|
||||||
:task (build/build {})
|
|
||||||
:depends [clean]}
|
|
||||||
|
|
||||||
dist {:doc "Prepare dist folder for npm package"
|
|
||||||
:depends [prod]
|
|
||||||
:task (do
|
|
||||||
(fs/delete-tree "dist")
|
|
||||||
(fs/create-dirs "dist/dev")
|
|
||||||
(run! (fn [f] (fs/copy f "dist" {:replace-existing true}))
|
|
||||||
(fs/glob "resources/public/js" "*.{js,js.map}"))
|
|
||||||
(run! (fn [f] (fs/copy f "dist/dev" {:replace-existing true}))
|
|
||||||
(fs/glob "resources/public/js/dev" "*.{js,js.map}")))}
|
|
||||||
|
|
||||||
bump-version {:doc "Bumps package.json and pushes new git tag"
|
|
||||||
:task (do (shell "npm version patch")
|
|
||||||
(shell "git push --atomic origin main"
|
|
||||||
(str "v" (:version (json/parse-string (slurp "package.json") true)))))}
|
|
||||||
|
|
||||||
npm-publish {:doc "Updates NPM ibrary"
|
|
||||||
:task (do (run 'dist)
|
|
||||||
(run 'bump-version)
|
|
||||||
(shell "npm publish"))}
|
|
||||||
|
|
||||||
replace-version {:doc "Ported from bash one-liners. Expects two versions.
|
|
||||||
TODO: port to Clojure.
|
|
||||||
TODO: skip changelog.md
|
|
||||||
"
|
|
||||||
:task
|
|
||||||
(let [[prev next] *command-line-args*]
|
|
||||||
(-> (process ["bash" "-c"
|
|
||||||
(format "rg %s --files-with-matches -g '!/CHANGELOG.md' | xargs sed -i '' 's/%s/%s/g'"
|
|
||||||
prev prev next)]
|
|
||||||
{:inherit true})
|
|
||||||
p/check))}
|
|
||||||
|
|
||||||
gh-pages {:doc "Updates Github pages with new release build."
|
|
||||||
:task (shell "script/release.clj")}}}
|
|
|
@ -3,10 +3,11 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<script src="https://babashka.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
||||||
<script src="https://babashka.github.io/scittle/js/scittle.reagent.js" type="application/javascript"></script>
|
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="https://borkdude.github.io/scittle/js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
|
@ -1,83 +0,0 @@
|
||||||
(ns scittle.build
|
|
||||||
"Provides bb tasks for building and releasing scittle"
|
|
||||||
(:require
|
|
||||||
[babashka.classpath :as classpath]
|
|
||||||
[babashka.fs :as fs]
|
|
||||||
[babashka.tasks :refer [clojure]]
|
|
||||||
[clojure.edn :as edn]
|
|
||||||
[clojure.string :as str]))
|
|
||||||
|
|
||||||
(defn- feature-files
|
|
||||||
[]
|
|
||||||
(filter fs/exists?
|
|
||||||
(map (fn [d]
|
|
||||||
(fs/file d "scittle_plugin.edn"))
|
|
||||||
(classpath/split-classpath (classpath/get-classpath)))))
|
|
||||||
|
|
||||||
(defn- read-configs
|
|
||||||
[files]
|
|
||||||
(->> files
|
|
||||||
(mapcat (comp edn/read-string slurp str))))
|
|
||||||
|
|
||||||
(defn- build-cmd [cmd scittle-dir]
|
|
||||||
(let [files (feature-files)
|
|
||||||
feature-configs (read-configs files)
|
|
||||||
;; Each ./src/scittle_plugin.edn has a ./deps.edn
|
|
||||||
feature-dirs (map (comp fs/parent fs/parent) files)
|
|
||||||
cmd' (if (seq files)
|
|
||||||
(format "-Sdeps '%s' %s"
|
|
||||||
{:deps
|
|
||||||
(merge (into {}
|
|
||||||
(map (fn [dir]
|
|
||||||
[(symbol (str (fs/file-name dir) "/deps"))
|
|
||||||
{:local/root (str dir)}])
|
|
||||||
feature-dirs))
|
|
||||||
{'scittle/deps {:local/root scittle-dir}})}
|
|
||||||
cmd)
|
|
||||||
cmd)]
|
|
||||||
(when (seq feature-configs)
|
|
||||||
(println "Building features:" (str/join ", " (map :name feature-configs)) "..."))
|
|
||||||
(if (seq feature-configs)
|
|
||||||
(apply str cmd'
|
|
||||||
(map (fn [m] (format " --config-merge '%s'" (pr-str (:shadow-config m))))
|
|
||||||
feature-configs))
|
|
||||||
cmd')))
|
|
||||||
|
|
||||||
(defn- build*
|
|
||||||
[cmd]
|
|
||||||
(let [building-outside-scittle? (not (fs/exists? "shadow-cljs.edn"))
|
|
||||||
scittle-dir (when building-outside-scittle?
|
|
||||||
(->> (classpath/get-classpath)
|
|
||||||
classpath/split-classpath
|
|
||||||
;; Pull out scittle from local/root or git/url
|
|
||||||
(some #(when (re-find #"(scittle/[0-9a-f]+|scittle)/src" %) %))
|
|
||||||
fs/parent))]
|
|
||||||
(when building-outside-scittle?
|
|
||||||
(fs/copy (fs/file scittle-dir "shadow-cljs.edn") "shadow-cljs.edn"))
|
|
||||||
(let [cmd (build-cmd cmd (str scittle-dir))]
|
|
||||||
(println "> clojure" cmd)
|
|
||||||
(clojure {:extra-env {"SCI_ELIDE_VARS" "true"}} cmd))
|
|
||||||
(when building-outside-scittle?
|
|
||||||
(fs/delete "shadow-cljs.edn"))))
|
|
||||||
|
|
||||||
(defn build
|
|
||||||
"Build scittle shadow builds using clojure cmd and commandline args. Features on
|
|
||||||
classpath are automatically added.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
* :action - compile action, defaults to release, but may also be compile or watch"
|
|
||||||
[{:keys [action
|
|
||||||
args] :or {action "release"}}]
|
|
||||||
(build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s" action (str/join " " args)))
|
|
||||||
(when (= "release" action)
|
|
||||||
(println "Also building dev release build")
|
|
||||||
(build* (format "-M -m shadow.cljs.devtools.cli --force-spawn %s main %s %s"
|
|
||||||
action
|
|
||||||
"--config-merge '{:compiler-options {:optimizations :simple
|
|
||||||
:pretty-print true
|
|
||||||
:pseudo-names true}
|
|
||||||
:output-dir \"resources/public/js/dev\"
|
|
||||||
:modules {:scittle.cljs-devtools {:entries [scittle.cljs-devtools]
|
|
||||||
:depends-on #{:scittle}}}}'"
|
|
||||||
(str/join " " args)))))
|
|
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
};"
|
};"
|
||||||
"if(typeof scittle === 'undefined'){"
|
"if(typeof scittle === 'undefined'){"
|
||||||
(append-tag :script {:src "https://babashka.github.io/scittle/js/scittle.js"
|
(append-tag :script {:src "https://borkdude.github.io/scittle/js/scittle.js"
|
||||||
:onerror "function(){alert('Error loading ' + this.src)}"
|
:onerror "function(){alert('Error loading ' + this.src)}"
|
||||||
:onload "runCode"})
|
:onload "runCode"})
|
||||||
"} else {
|
"} else {
|
||||||
|
@ -134,7 +134,6 @@
|
||||||
[:br]
|
[:br]
|
||||||
[(fn []
|
[(fn []
|
||||||
[:a {:href (str "?name=" (js/encodeURIComponent @*bookmark-name)
|
[:a {:href (str "?name=" (js/encodeURIComponent @*bookmark-name)
|
||||||
"&code=" (js/encodeURIComponent @*code)
|
"&code=" (js/encodeURIComponent @*code))} "Copy this link to share ⤴️"])]]))
|
||||||
"%20")} "Copy this link to share ⤴️"])]]))
|
|
||||||
|
|
||||||
(rdom/render [workspace] (.getElementById js/document "app"))
|
(rdom/render [workspace] (.getElementById js/document "app"))
|
30
deps.edn
30
deps.edn
|
@ -1,30 +0,0 @@
|
||||||
{:paths ["src" "resources"]
|
|
||||||
:deps
|
|
||||||
{org.clojure/clojure {:mvn/version "1.11.1"}
|
|
||||||
thheller/shadow-cljs {:mvn/version "3.1.8"}
|
|
||||||
org.babashka/sci {:git/url "https://github.com/babashka/sci"
|
|
||||||
:git/sha "756376056b32198d96dd5b272cee8fc483db60df"}
|
|
||||||
#_{:local/root "../babashka/sci"}
|
|
||||||
reagent/reagent {:mvn/version "1.1.1"}
|
|
||||||
no.cjohansen/replicant {:mvn/version "2025.03.27"}
|
|
||||||
re-frame/re-frame {:mvn/version "1.3.0"}
|
|
||||||
cljsjs/react {:mvn/version "18.2.0-1"}
|
|
||||||
cljsjs/react-dom {:mvn/version "18.2.0-1"}
|
|
||||||
cljsjs/react-dom-server {:mvn/version "18.2.0-1"}
|
|
||||||
cljs-ajax/cljs-ajax {:mvn/version "0.8.4"}
|
|
||||||
applied-science/js-interop {:mvn/version "0.4.2"}
|
|
||||||
funcool/promesa {:mvn/version "11.0.678"}
|
|
||||||
io.github.babashka/sci.nrepl
|
|
||||||
#_{:local/root "../sci.nrepl"}
|
|
||||||
{:git/url "https://github.com/babashka/sci.nrepl"
|
|
||||||
:git/sha "75f379c685bbd58c3e23f531339eb144e104937d"}
|
|
||||||
io.github.babashka/sci.configs
|
|
||||||
#_{:local/root "/Users/borkdude/dev/sci.configs"}
|
|
||||||
{:git/url "https://github.com/babashka/sci.configs"
|
|
||||||
:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
|
||||||
:exclusions [org.babashka/sci]}
|
|
||||||
binaryage/devtools {:mvn/version "1.0.7"}}
|
|
||||||
:aliases
|
|
||||||
{:dev
|
|
||||||
{:extra-paths ["dev"]
|
|
||||||
:extra-deps {}}}}
|
|
109
doc/dev.md
109
doc/dev.md
|
@ -1,109 +0,0 @@
|
||||||
# Dev
|
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
### Start with an issue before writing code
|
|
||||||
|
|
||||||
Before writing any code, please create an issue first that describes the problem
|
|
||||||
you are trying to solve with alternatives that you have considered. A little bit
|
|
||||||
of prior communication can save a lot of time on coding. Keep the problem as
|
|
||||||
small as possible. If there are two problems, make two issues. We discuss the
|
|
||||||
issue and if we reach an agreement on the approach, it's time to move on to a
|
|
||||||
PR.
|
|
||||||
|
|
||||||
### Follow up with a pull request
|
|
||||||
|
|
||||||
Post a corresponding PR with the smallest change possible to address the
|
|
||||||
issue. Then we discuss the PR, make changes as needed and if we reach an
|
|
||||||
agreement, the PR will be merged.
|
|
||||||
|
|
||||||
<!-- ### Tests -->
|
|
||||||
|
|
||||||
<!-- Each bug fix, change or new feature should be tested well to prevent future -->
|
|
||||||
<!-- regressions. -->
|
|
||||||
|
|
||||||
### Force-push
|
|
||||||
|
|
||||||
Please do not use `git push --force` on your PR branch for the following
|
|
||||||
reasons:
|
|
||||||
|
|
||||||
- It makes it more difficult for others to contribute to your branch if needed.
|
|
||||||
- It makes it harder to review incremental commits.
|
|
||||||
- Links (in e.g. e-mails and notifications) go stale and you're confronted with:
|
|
||||||
this code isn't here anymore, when clicking on them.
|
|
||||||
- CircleCI doesn't play well with it: it might try to fetch a commit which
|
|
||||||
doesn't exist anymore.
|
|
||||||
- Your PR will be squashed anyway.
|
|
||||||
|
|
||||||
## Developing
|
|
||||||
|
|
||||||
Run `bb dev` to start shadow-cljs compilation in watch mode.
|
|
||||||
|
|
||||||
<!-- ## Testing -->
|
|
||||||
|
|
||||||
<!-- You can run tests using `bb run-tests` and `bb run-integration-tests`. -->
|
|
||||||
|
|
||||||
## Release
|
|
||||||
|
|
||||||
Static files including compiled JS are hosted on Github. This is set up like
|
|
||||||
described
|
|
||||||
[here](https://medium.com/linagora-engineering/deploying-your-js-app-to-github-pages-the-easy-way-or-not-1ef8c48424b7):
|
|
||||||
|
|
||||||
All the commands below assume that you already have a git project initialized and that you are in its root folder.
|
|
||||||
|
|
||||||
```
|
|
||||||
# Create an orphan branch named gh-pages
|
|
||||||
git checkout --orphan gh-pages
|
|
||||||
# Remove all files from staging
|
|
||||||
git rm -rf .
|
|
||||||
# Create an empty commit so that you will be able to push on the branch next
|
|
||||||
git commit --allow-empty -m "Init empty branch"
|
|
||||||
# Push the branch
|
|
||||||
git push origin gh-pages
|
|
||||||
```
|
|
||||||
|
|
||||||
Now that the branch is created and pushed to origin, let’s configure the worktree correctly:
|
|
||||||
|
|
||||||
```
|
|
||||||
# Come back to master
|
|
||||||
git checkout main
|
|
||||||
# Add gh-pages to .gitignore
|
|
||||||
echo "gh-pages/" >> .gitignore
|
|
||||||
git worktree add gh-pages gh-pages
|
|
||||||
```
|
|
||||||
|
|
||||||
After cloning this repo to a new dir:
|
|
||||||
|
|
||||||
```
|
|
||||||
git fetch origin gh-pages
|
|
||||||
git worktree prune
|
|
||||||
git worktree add gh-pages gh-pages
|
|
||||||
```
|
|
||||||
|
|
||||||
To deploy to Github Pages:
|
|
||||||
|
|
||||||
```
|
|
||||||
script/release.clj
|
|
||||||
```
|
|
||||||
|
|
||||||
To create a new NPM release:
|
|
||||||
|
|
||||||
- Prepare version `package.json`, except patch (if anything should change here)
|
|
||||||
- Run `bb npm-publish`: this will compile, bump patch version, create tag and and push to npm and Github
|
|
||||||
- `bb replace-version 0.6.16 0.7.27`
|
|
||||||
- Create Github release with updated links from `doc/links.md`
|
|
||||||
- `bb gh-pages`
|
|
||||||
|
|
||||||
<!-- To upgrade examples: -->
|
|
||||||
|
|
||||||
<!-- ``` -->
|
|
||||||
<!-- rg '0.0.1' --files-with-matches | xargs sed -i '' 's/0.0.7.27.1.0/g' -->
|
|
||||||
<!-- bb release -->
|
|
||||||
<!-- cd gh-pages -->
|
|
||||||
<!-- git checkout -b v0.7.27 -->
|
|
||||||
<!-- git push --set-upstream origin v0.7.27 -->
|
|
||||||
<!-- git checkout gh-pages -->
|
|
||||||
<!-- cd .. -->
|
|
||||||
<!-- ``` -->
|
|
||||||
|
|
||||||
<!-- Then make a new release on Github with the `v0.7.27` tag. -->
|
|
|
@ -1,49 +0,0 @@
|
||||||
# Loading JS libraries
|
|
||||||
|
|
||||||
Since `v0.7.27` scittle allows to load libraries from the global enviroment.
|
|
||||||
This means you can load a library in a `<script>` tag and use it via `:require` in scittle.
|
|
||||||
|
|
||||||
An example:
|
|
||||||
|
|
||||||
``` html
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/js-confetti@latest/dist/js-confetti.browser.js"></script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(require '["JSConfetti" :as confetti])
|
|
||||||
(.addConfetti (confetti.))
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
```
|
|
||||||
|
|
||||||
## ES modules
|
|
||||||
|
|
||||||
The async nature of ES modules makes them a litte bit more difficult to work
|
|
||||||
with in scittle. You need to disable automatic evaluation of script tags first
|
|
||||||
using `scittle.core.disable_auto_eval()`. In a `module` type `<script>` tag you
|
|
||||||
can then load ES modules, attach them to the global object and manually invoke
|
|
||||||
`scittle.core.eval_script_tags();` when setup is completed.
|
|
||||||
|
|
||||||
``` html
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
|
||||||
<script>scittle.core.disable_auto_eval()</script>
|
|
||||||
<script type="module">
|
|
||||||
import confetti from "https://esm.sh/canvas-confetti@1.6.0"
|
|
||||||
globalThis.JSConfetti = confetti;
|
|
||||||
scittle.core.eval_script_tags();
|
|
||||||
</script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(require '["JSConfetti" :as confetti])
|
|
||||||
(confetti)
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
```
|
|
20
doc/links.md
20
doc/links.md
|
@ -1,20 +0,0 @@
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js-interop.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.replicant.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.pprint.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js
|
|
||||||
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.js-interop.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-ajax.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.reagent.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.re-frame.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.replicant.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.promesa.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.pprint.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.nrepl.js
|
|
||||||
https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/dev/scittle.cljs-devtools.js
|
|
|
@ -1,49 +0,0 @@
|
||||||
# nREPL
|
|
||||||
|
|
||||||
To connect to a Scittle nREPL server from your editor, follow these steps. The
|
|
||||||
setup described here, can be found in this directory.
|
|
||||||
|
|
||||||
In babashka or Clojure JVM, use the
|
|
||||||
[sci.nrepl](https://github.com/babashka/sci.nrepl) dependency and run:
|
|
||||||
|
|
||||||
``` clojure
|
|
||||||
(require '[sci.nrepl.browser-server :as nrepl])
|
|
||||||
(nrepl/start! {:nrepl-port 1339 :websocket-port 1340})
|
|
||||||
```
|
|
||||||
|
|
||||||
This will run an nREPL server on port 1339 and a websocket server on port 1340.
|
|
||||||
Your editor's nREPL client will connect to port 1339 and your browser, running
|
|
||||||
scittle, will connect to port 1340. The nREPL server forwards messages to the
|
|
||||||
browser via the websocket connection.
|
|
||||||
|
|
||||||
In your scittle website, you will need to include the following, in addition to
|
|
||||||
the normal routine:
|
|
||||||
|
|
||||||
``` html
|
|
||||||
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js" type="application/javascript"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
Also include the CLJS file that you want to evaluate with nREPL:
|
|
||||||
|
|
||||||
``` html
|
|
||||||
<script src="playground.cljs" type="application/x-scittle"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
Then visit `playground.cljs` in your editor and connect to the nREPL server,
|
|
||||||
and start evaluating!
|
|
||||||
|
|
||||||
See the `index.html` file for an example.
|
|
||||||
|
|
||||||
When you run `bb dev` in this directory, and then open `http://localhost:1341`
|
|
||||||
you should be able evaluate expressions in `playground.cljs`. See a demo
|
|
||||||
[here](https://twitter.com/borkdude/status/1526285565343281159).
|
|
||||||
|
|
||||||
Note that the nREPL server connection stays alive even after the browser window
|
|
||||||
refreshes.
|
|
||||||
|
|
||||||
### CIDER
|
|
||||||
|
|
||||||
Choose `cider-connect-cljs`, select port `1339`, followed by the `nbb` REPL
|
|
||||||
type. If you use multiple REPLs in your project, choose
|
|
||||||
`sesman-link-with-buffer` to choose the right REPL for the right buffer.
|
|
|
@ -1,18 +0,0 @@
|
||||||
{:deps {io.github.babashka/sci.nrepl
|
|
||||||
#_{:local/root "/Users/borkdude/dev/sci.nrepl"}
|
|
||||||
{:git/sha "4f7f6d652a71b5bdc0c110313a4908d956e7a97d"}
|
|
||||||
io.github.babashka/http-server
|
|
||||||
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}
|
|
||||||
:tasks {http-server {:doc "Starts http server for serving static files"
|
|
||||||
:requires ([babashka.http-server :as http])
|
|
||||||
:task (do (http/serve {:port 1341 :dir "."})
|
|
||||||
(println "Serving static assets at http://localhost:1341"))}
|
|
||||||
|
|
||||||
browser-nrepl {:doc "Start browser nREPL"
|
|
||||||
:requires ([sci.nrepl.browser-server :as bp])
|
|
||||||
:task (bp/start! {})}
|
|
||||||
|
|
||||||
-dev {:depends [http-server browser-nrepl]}
|
|
||||||
|
|
||||||
dev {:task (do (run '-dev {:parallel true})
|
|
||||||
(deref (promise)))}}}
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
|
||||||
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.nrepl.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle" src="playground.cljs"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Scittle</h1>
|
|
||||||
<h2>What is this?</h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,15 +0,0 @@
|
||||||
(ns playground)
|
|
||||||
|
|
||||||
(+ 1 2 3)
|
|
||||||
|
|
||||||
(->
|
|
||||||
(js/document.getElementsByTagName "body")
|
|
||||||
first
|
|
||||||
(.append
|
|
||||||
(doto (js/document.createElement "p")
|
|
||||||
(.append
|
|
||||||
(js/document.createTextNode "there")))))
|
|
||||||
|
|
||||||
(defn foo [])
|
|
||||||
|
|
||||||
(js/alert "Isn't this cool? :)")
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Scittle in a service worker
|
|
||||||
|
|
||||||
You can use Scittle to bootstrap a ClojureScript based service worker.
|
|
||||||
|
|
||||||
Put the following code into e.g. `scittle-sw.js` to create a JavaScript based service worker, load Scittle, then fetch your script and eval it.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
importScripts("scittle.min.js");
|
|
||||||
|
|
||||||
const request = await fetch("sw.cljs");
|
|
||||||
const text = await request.text();
|
|
||||||
const result = scittle.core.eval_string(text);
|
|
||||||
```
|
|
||||||
|
|
||||||
Then load `scittle-sw.js` in your HTML:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script>
|
|
||||||
if('serviceWorker' in navigator)
|
|
||||||
navigator.serviceWorker.register('scittle-sw.js');
|
|
||||||
</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
This will load `sw.cljs` and eval it in the context of the service worker.
|
|
||||||
|
|
||||||
A ready-made example can be found at [chr15m/scittle-template-serviceworker](https://github.com/chr15m/scittle-template-serviceworker).
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.cljs-ajax.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(require '[ajax.core :refer [GET]])
|
(require '[ajax.core :refer [GET]])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(defn my-alert []
|
(defn my-alert []
|
||||||
(js/alert "You clicked!"))
|
(js/alert "You clicked!"))
|
|
@ -1,9 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.js" type="application/javascript"></script>
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js" type="application/javascript"></script>
|
<script src="https://borkdude.github.io/scittle/js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
<script type="application/x-scittle">
|
<script type="application/x-scittle">
|
||||||
(require '[reagent.core :as r]
|
(require '[reagent.core :as r]
|
||||||
'[reagent.dom :as rdom])
|
'[reagent.dom :as rdom])
|
134
index.html
Normal file
134
index.html
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
|
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
||||||
|
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
<script src="js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-scittle">
|
||||||
|
(defn my-alert []
|
||||||
|
(js/alert "You clicked!"))
|
||||||
|
|
||||||
|
(set! (.-my_alert js/window) my-alert)
|
||||||
|
|
||||||
|
(require '[reagent.core :as r]
|
||||||
|
'[reagent.dom :as rdom])
|
||||||
|
|
||||||
|
(def state (r/atom {:clicks 0}))
|
||||||
|
|
||||||
|
(defn my-component []
|
||||||
|
[:div
|
||||||
|
[:p "Clicks: " (:clicks @state)]
|
||||||
|
[:p [:button {:on-click #(swap! state update :clicks inc)}
|
||||||
|
"Click me!"]]])
|
||||||
|
|
||||||
|
(rdom/render [my-component] (.getElementById js/document "app"))
|
||||||
|
|
||||||
|
(require '[ajax.core :refer [GET]])
|
||||||
|
|
||||||
|
(defn handler [response]
|
||||||
|
(js/alert (str response)))
|
||||||
|
|
||||||
|
(defn make-request []
|
||||||
|
(GET "html/cljs-ajax.html" {:handler handler}))
|
||||||
|
|
||||||
|
;; export function to use from JavaScript:
|
||||||
|
(set! (.-make_request js/window) make-request)
|
||||||
|
|
||||||
|
(def code-tags (.querySelectorAll js/document "code[data-type='scittle']"))
|
||||||
|
|
||||||
|
(require '[goog.object :as gobject])
|
||||||
|
(doseq [code code-tags]
|
||||||
|
(let [src (.getAttribute code "data-src")
|
||||||
|
req (js/XMLHttpRequest.)]
|
||||||
|
(.open req "GET" src true)
|
||||||
|
(set! (.-onload req)
|
||||||
|
(fn []
|
||||||
|
(let [response (gobject/get req "response")]
|
||||||
|
(set! (.-innerText code) response)
|
||||||
|
(.highlightElement js/hljs code))))
|
||||||
|
(.send req)))
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style="float: right;">
|
||||||
|
<a href="https://GitHub.com/borkdude/scittle"><img src="https://img.shields.io/github/stars/borkdude/scittle.svg?style=social&label=Star"></a></div>
|
||||||
|
|
||||||
|
<h1>Scittle</h1>
|
||||||
|
<h2>What is this?</h2>
|
||||||
|
<p>This project exposes the <a href="https://github.com/borkdude/sci">Small Clojure Interpreter</a> in the
|
||||||
|
browser in such a way that you can use it with the <tt>script</tt> tag.</p>
|
||||||
|
<h2>Project status</h2>
|
||||||
|
<p>
|
||||||
|
This project is currently experimental and breaking changes are
|
||||||
|
bound to happen. Feedback is welcome on <a href="https://github.com/borkdude/scittle">Github</a>.</p>
|
||||||
|
<p>
|
||||||
|
You can get a copy
|
||||||
|
of <tt>scittle.js</tt> <a href="https://borkdude.github.io/scittle/js/scittle.js">here</a>. If
|
||||||
|
you want a pinned version of <tt>scittle.js</tt>, your best bet is to
|
||||||
|
download your own copy and host it yourself.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a name="usage"></a>
|
||||||
|
<h2><a href="#usage">Usage</a></h2>
|
||||||
|
|
||||||
|
Include <tt>scittle.js</tt> and write a <tt>script</tt> tag
|
||||||
|
where <tt>type</tt> is set
|
||||||
|
to <tt>application/x-scittle</tt>.
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/export.html" class="html"></code></pre>
|
||||||
|
<button onclick="my_alert()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a name="src"></a>
|
||||||
|
<h2><a href="#src">Source from file</a></h2>
|
||||||
|
|
||||||
|
When you have a file on your server, say <tt>cljs/script.cljs</tt>, you can load it using the <tt>src</tt> attribute:
|
||||||
|
|
||||||
|
<pre><code id="scittle-tag-example" class="html">
|
||||||
|
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<script type="text/javascript">hljs.highlightElement(document.getElementById("scittle-tag-example"));</script>
|
||||||
|
|
||||||
|
<a name="reagent"></a>
|
||||||
|
<h2><a href="#reagent">Reagent plugin</a></h2>
|
||||||
|
|
||||||
|
To enable <a href="https://github.com/reagent-project/reagent">reagent</a>,
|
||||||
|
in addition to <tt>scittle.js</tt>, you need to include React
|
||||||
|
and <tt>scittle.reagent.js</tt>:
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/reagent.html" class="html"></code></pre>
|
||||||
|
|
||||||
|
<div id="app"></div>
|
||||||
|
|
||||||
|
<a name="cljs-ajax"></a>
|
||||||
|
<h2><a href="#cljs-ajax">Cljs-ajax plugin</a></h2>
|
||||||
|
|
||||||
|
To enable <a href="https://github.com/JulianBirch/cljs-ajax">cljs-ajax</a>,
|
||||||
|
in addition to <tt>scittle.js</tt>, you need to include <tt>scittle.cljs-ajax.js</tt>:
|
||||||
|
|
||||||
|
<pre><code data-type="scittle" data-src="html/cljs-ajax.html" class="html"></code></pre>
|
||||||
|
|
||||||
|
<button onclick="make_request()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a name="examples"></a>
|
||||||
|
<h2><a href="#examples">Examples</a></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="tictactoe.html">Tic-tac-toe</a></li>
|
||||||
|
<li><a href="bookmarklet.html">Bookmarklet</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
63
js/sci-script-tag-plugin-reagent.js
Normal file
63
js/sci-script-tag-plugin-reagent.js
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
(function(){
|
||||||
|
shadow$provide[0]=function(b,c,a,d){a.exports=React};
|
||||||
|
shadow$provide[1]=function(b,c,a,d){a.exports=ReactDOM};
|
||||||
|
'use strict';var v8=function(a,b){let c,d;for(let e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(let f=0;f<u8.length;f++)c=u8[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},z8=function(a,b){var c=w8[a];if(void 0!==c)return c;try{x8.push(a);var d=y8[a],e=shadow$provide[a];if(void 0===d){if(void 0===e)throw"Module not provided: "+a;d={exports:{}};y8[a]=d}if(e){delete shadow$provide[a];try{e.call(d,$APP.kX,z8,d,d.exports)}catch(l){throw console.warn("shadow-cljs - failed to load",
|
||||||
|
a),l;}if(b){var f=b.globals;if(f)for(a=0;a<f.length;a++)window[f[a]]=d.exports}}}finally{x8.pop()}return d.exports},A8=function(a){return 2>$APP.Je(a)?$APP.fT(a):[$APP.fT($APP.Ch.i(a,0,1)),$APP.Ch.h(a,1)].join("")},C8=function(a){if("string"===typeof a)return a;a=$APP.Wh(a);var b=$APP.jT.h(a,/-/),c=$APP.z(b);b=$APP.r(c);c=$APP.t(c);return $APP.n(B8.g?B8.g(b):B8.call(null,b))?a:$APP.Yb.i($APP.q,b,$APP.Yi.h(A8,c))},D8=function(a){var b=function(){var c=function(){var d=$APP.jf(a);if(d){d=a.displayName;
|
||||||
|
if($APP.n(d))return d;d=a.name;return"string"===typeof d&&$APP.z(d)?d:null}return d}();if($APP.n(c))return c;c=function(){var d=null!=a?a.J&4096||$APP.Ua===a.Nd?!0:!1:!1;return d?$APP.Wh(a):d}();if($APP.n(c))return c;c=$APP.F(a);return $APP.vf(c)?$APP.T.g(c):null}();return $APP.n(b)?$APP.cT($APP.q.g(b),"$","."):null},E8=function(a){return a instanceof $APP.ee||a instanceof $APP.x},G8=function(a){if($APP.vf(a))try{var b=$APP.ce.h(a,F8)}catch(c){b=null}else b=null;return b},H8=function(a){var b=F8.g($APP.F(a));
|
||||||
|
if($APP.n(b))return b;b=G8($APP.B.i(a,1,null));if($APP.n(b))return b;b=$APP.B.i(a,0,null);switch(b instanceof $APP.ee?b.fb:null){case "\x3e":case "f\x3e":return G8($APP.B.i(a,2,null));case "r\x3e":return a=$APP.B.i(a,2,null),null==a?null:a.key;default:return null}},I8=function(a){return setTimeout(a,16)},J8=function(a,b){return a.pf-b.pf},K8=function(){return null},L8=function(a){for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.s?d.s():d.call(null);c+=1}else return null},M8=function(a,b,c){b.push(c);
|
||||||
|
return a.schedule()},N8=function(){this.jf=!1},P8=function(a){if($APP.n(a.cljsIsDirty))return null;a.cljsIsDirty=!0;return O8.queue_render(a)},Q8=function(a){if(null!=a&&null!=a.If)a=a.id;else{var b=Q8[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Q8._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("Compiler.get-id",a);}return a},R8=function(a,b){if(null!=a&&null!=a.xf)a=a.xf(a,b);else{var c=R8[$APP.pa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);
|
||||||
|
else if(c=R8._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Rb("Compiler.as-element",a);}return a},S8=function(a,b,c,d,e){if(null!=a&&null!=a.yf)a=a.yf(a,b,c,d,e);else{var f=S8[$APP.pa(null==a?null:a)];if(null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else if(f=S8._,null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else throw $APP.Rb("Compiler.make-element",a);}return a},U8=function(a,b){b.kf=null;a:{var c=T8;T8=b;try{var d=a.s?a.s():a.call(null);break a}finally{T8=c}d=void 0}a=
|
||||||
|
b.kf;b.bf=!1;a:{c=b.df;var e=null==a?0:a.length,f=e===(null==c?0:c.length);if(f)for(f=0;;){var l=f===e;if(l){c=l;break a}if(a[f]===c[f])f+=1;else{c=!1;break a}}else c=f}c||b._update_watching(a);return d},V8=function(a){var b=T8;if(null!=b){var c=b.kf;null==c?b.kf=[a]:c.push(a)}},W8=function(a,b,c){a.Bc=$APP.E.i(a.Bc,b,c);return a.sf=null},X8=function(a,b){a.Bc=$APP.hf.h(a.Bc,b);return a.sf=null},Y8=function(a,b,c){var d=a.sf;d=null==d?a.sf=$APP.fg(function(p,w,A){p.push(w);p.push(A);return p},[],
|
||||||
|
a.Bc):d;for(var e=d.length,f=0;;)if(f<e){var l=d[f],g=d[f+1];g.B?g.B(l,a,b,c):g.call(null,l,a,b,c);f=2+f}else break},Z8=function(a,b,c,d){$APP.od(a,["#object[reagent.ratom.",$APP.q.g(c)," "].join(""));a:{c=T8;T8=null;try{var e=d;break a}finally{T8=c}e=void 0}$APP.gn(e,a,b);return $APP.od(a,"]")},$8=function(a,b,c,d){this.state=a;this.D=b;this.Fe=c;this.Bc=d;this.C=2154201088;this.J=114690},a9=function(a){if(null!=a&&null!=a.rf)a=a.rf(a);else{var b=a9[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):
|
||||||
|
b.call(null,a);else if(b=a9._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("IDisposable.dispose!",a);}return a},b9=function(a,b,c,d){return a._handle_change(b,c,d)},c9=function(a){this.f=a;this.state=null;this.bf=!0;this.vf=!1;this.lf=this.af=this.Bc=this.df=null;this.C=2153807872;this.J=114690},e9=function(){for(;;){var a=d9;if(null==a)return null;d9=null;for(var b=a.length,c=0;;)if(c<b)a[c]._queued_run(),c+=1;else break}},i9=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),
|
||||||
|
d+=1;else break;c=arguments[0];var e=$APP.Ai(1<b.length?new $APP.Xb(b.slice(1),0,null):null);b=$APP.ce.h(e,f9);d=$APP.ce.h(e,g9);e=$APP.ce.h(e,h9);c=new c9(c);c._set_opts(new $APP.m(null,3,[f9,b,g9,d,h9,e],null));return c},l9=function(a,b){var c=j9,d=k9,e=U8(a,d);null!=d.df&&(k9=i9(null),d._set_opts(c),d.f=a,d.af=function(){return P8.g?P8.g(b):P8.call(null,b)},b.cljsRatom=d);return e},m9=function(a,b){var c=b.argv;if(null==c){c=$APP.P;a=a.constructor;a:for(var d=$APP.xa(b),e=d.length,f=$APP.Hi,l=
|
||||||
|
0;;)if(l<e){var g=d[l];f=$APP.E.i(f,$APP.Vh.g(g),$APP.Aa(b,g));l+=1}else break a;b=new $APP.O(null,2,5,c,[a,f],null)}else b=c;return b},n9=function(a){var b;if(b=$APP.jf(a))a=null==a?null:a.prototype,b=null!=(null==a?null:a.cf);return b},o9=function(a,b){for(;;){var c=a.cf,d=!0===a.Af?c.call(a,a):function(){var e=m9(a,a.props);switch($APP.Je(e)){case 1:return c.call(a);case 2:return c.call(a,$APP.B.h(e,1));case 3:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2));case 4:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,
|
||||||
|
2),$APP.B.h(e,3));case 5:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2),$APP.B.h(e,3),$APP.B.h(e,4));default:return c.apply(a,$APP.cc.g(e).slice(1))}}();if($APP.xf(d))return R8(b,d);if($APP.If(d))a.cf=n9(d)?function(e,f,l,g,p){return function(){function w(D){var G=null;if(0<arguments.length){G=0;for(var J=Array(arguments.length-0);G<J.length;)J[G]=arguments[G+0],++G;G=new $APP.Xb(J,0,null)}return A.call(this,G)}function A(D){return R8(f,$APP.Yb.i($APP.Ck,p,D))}w.o=0;w.u=function(D){D=$APP.z(D);return A(D)};
|
||||||
|
w.j=A;return w}()}(a,b,c,null,d):d;else return d}},r9=function(a,b){switch(a instanceof $APP.ee?a.fb:null){case "getDefaultProps":throw Error("getDefaultProps not supported");case "getDerivedStateFromProps":return function(c,d){var e=b.call,f=c.argv;null!=f&&(c=$APP.B.i(f,1,null),c=$APP.vf(c)?c:null);return e.call(b,null,c,d)};case "getInitialState":return function(c){var d=c.Cf;d=null!=d?d:c.Cf=p9.g(null);return $APP.pj(d,b.call(c,c))};case "getSnapshotBeforeUpdate":return function(c,d){return b.call(this,
|
||||||
|
this,m9(this,c),d)};case "componentWillReceiveProps":return function(c){return b.call(this,this,m9(this,c))};case "UNSAFE_componentWillReceiveProps":return function(c){return b.call(this,this,m9(this,c))};case "shouldComponentUpdate":return function(c){var d=q9;if($APP.n(d))return d;d=this.props.argv;var e=c.argv,f=null==d||null==e;if(null==b){if(f)return f;try{return $APP.Di.h(d,e)}catch(l){return!1}}else return f?b.call(this,this,m9(this,this.props),m9(this,c)):b.call(this,this,d,e)};case "componentWillUpdate":return function(c,
|
||||||
|
d){return b.call(this,this,m9(this,c),d)};case "UNSAFE_componentWillUpdate":return function(c,d){return b.call(this,this,m9(this,c),d)};case "componentDidUpdate":return function(c,d,e){return b.call(this,this,m9(this,c),d,e)};case "componentWillMount":return function(){return b.call(this,this)};case "UNSAFE_componentWillMount":return function(){return b.call(this,this)};case "componentDidMount":return function(){return b.call(this,this)};case "componentWillUnmount":return function(){var c=$APP.Aa(this,
|
||||||
|
"cljsRatom");null!=c&&a9(c);this.cljsIsDirty=!1;return null==b?null:b.call(this,this)};case "componentDidCatch":return function(c,d){return b.call(this,this,c,d)};default:return null}},t9=function(a){return $APP.fg(function(b,c,d){return $APP.E.i(b,$APP.Vh.g(s9(c)),d)},$APP.Hi,a)},z9=function(a,b){var c=function(){var l=u9.g(a);return $APP.n(l)?l:v9.g(a)}(),d=null==u9.g(a),e=function(){var l=w9.g(a);if($APP.n(l))return l;l=D8(c);return $APP.n(l)?l:$APP.q.g($APP.Cn.g("reagent"))}(),f=$APP.fg(function(l,
|
||||||
|
g,p){var w=$APP.E.i,A=r9(g,p);return w.call($APP.E,l,g,$APP.n(A)?A:p)},$APP.Hi,a);return $APP.E.j(f,w9,e,$APP.Pe([x9,d,u9,c,v9,function(){var l=this,g=$APP.Aa(l,"cljsRatom");l.cljsIsDirty=!1;return null==g?l9(function(){a:{var p=y9;y9=l;try{var w=o9(l,b);break a}finally{y9=p}w=void 0}return w},l):g._run(!1)}]))},A9=function(a){return $APP.fg(function(b,c,d){c=$APP.Wh(c);b[c]=d;return b},{},a)},C9=function(a,b){return z9($APP.em.j($APP.Pe([B9,t9(a)])),b)},H9=function(a,b){function c(g,p,w){e8.Component.call(this,
|
||||||
|
g,p,w);$APP.n(l)&&(l.h?l.h(this,g):l.call(null,this,g));$APP.n(f)&&(this.state=f.g?f.g(this):f.call(null,this));this.pf=E9+=1;return this}a=C9(a,b);b=A9($APP.Yb.j($APP.hf,a,w9,F9,$APP.sA,$APP.Pe([v9,u9,G9])));var d=A9($APP.im(a,G9)),e=w9.g(a),f=F9.g(a),l=$APP.sA.g(a);v8(c.prototype,e8.Component.prototype,b);$APP.n(v9.g(a))&&(c.prototype.render=v9.g(a));$APP.n(u9.g(a))&&(c.prototype.cf=u9.g(a));$APP.n(x9.g(a))&&(c.prototype.Af=x9.g(a));v8(c,e8.Component,d);$APP.n(e)&&(c.displayName=e,c.$c=e,c.ue=function(g){return $APP.od(g,
|
||||||
|
e)});c.Td=!0;return c.prototype.constructor=c},I9=function(a,b,c){a=Q8(a);return b[a]=c},J9=function(a,b){for(;;){var c=b.cf,d=b.argv,e=$APP.Yb.h(c,d);if($APP.xf(e))return R8(a,e);if($APP.If(e))b.cf=n9(e)?function(f,l,g,p,w,A){return function(){function D(J){var R=null;if(0<arguments.length){R=0;for(var W=Array(arguments.length-0);R<W.length;)W[R]=arguments[R+0],++R;R=new $APP.Xb(W,0,null)}return G.call(this,R)}function G(J){return R8(f,$APP.Yb.i($APP.Ck,A,J))}D.o=0;D.u=function(J){J=$APP.z(J);return G(J)};
|
||||||
|
D.j=G;return D}()}(a,b,c,null,d,e):e;else return e}},K9=function(a,b){var c=b.argv,d=b.cf;b=e8.useState(0);$APP.B.i(b,0,null);var e=$APP.B.i(b,1,null),f=e8.useRef();$APP.n(f.current)||function(){var g={forceUpdate:function(){return e.g?e.g($APP.te):e.call(null,$APP.te)}};g.pf=E9+=1;g.constructor=d;g.cf=d;return f.current=g}();var l=f.current;b=$APP.Aa(l,"cljsRatom");e8.useEffect(function(){return function(){var g=$APP.Aa(l,"cljsRatom");return null==g?null:a9(g)}},[]);l.argv=c;l.cljsIsDirty=!1;return null==
|
||||||
|
b?l9(function(){a:{var g=y9;y9=l;try{var p=J9(a,l);break a}finally{y9=g}p=void 0}return p},l):b._run(!1)},L9=function(a,b){a=a.argv;b=b.argv;var c=!1===q9;if(c)try{return $APP.fe.h(a,b)}catch(d){return!1}else return c},M9=function(a,b){function c(e){return K9(a,e)}var d=$APP.Aa(b,Q8(a));if($APP.n(d))return d;c.displayName=D8(b);d=e8.memo(c,L9);I9(a,b,d);return d},Q9=function(a,b,c,d){var e=$APP.Ai($APP.Hi);e=$APP.ce.h(e,N9);if(a===document.activeElement&&$APP.H(O9,a.type)&&"string"===typeof b&&"string"===
|
||||||
|
typeof c){var f=a.value;if($APP.Di.h(f,c))return O8.add_after_render(function(){return P9.g?P9.g(d):P9.call(null,d)});c=$APP.Je(f)-a.selectionStart;c=$APP.Je(b)-c;d.gf=b;a.value=b;$APP.jf(e)&&(e.g?e.g(b):e.call(null,b));a.selectionStart=c;return a.selectionEnd=c}d.gf=b;a.value=b;return $APP.jf(e)?e.g?e.g(b):e.call(null,b):null},P9=function(a){if($APP.n(a.nf)){a.tf=!1;var b=a.Bf,c=a.gf,d=a.qf;return $APP.Di.h(b,c)?Q9(d,b,c,a):null}return null},R9=function(a,b,c){a.gf=c.target.value;$APP.n(a.tf)||(a.tf=
|
||||||
|
!0,O8.add_after_render(function(){return P9(a)}));return b.g?b.g(c):b.call(null,c)},S9=function(a){var b=y9;if($APP.n(function(){var f=null!=a;return f?(f=a.hasOwnProperty("onChange"),$APP.n(f)?a.hasOwnProperty("value"):f):f}())){var c=a.value;c=null==c?"":c;var d=a.onChange,e=a.ref;$APP.n(b.nf)||(b.nf=!0,b.gf=c);$APP.n(b.zf)||(b.zf=$APP.jf(e)?function(f){b.qf=f;return e.g?e.g(f):e.call(null,f)}:$APP.n($APP.n(e)?e.hasOwnProperty("current"):e)?function(f){b.qf=f;return e.current=f}:function(f){return b.qf=
|
||||||
|
f});b.Bf=c;delete a.value;a.defaultValue=c;a.onChange=function(f){return R9(b,d,f)};a.ref=b.zf}},T9=function(a,b){return a.hasOwnProperty(b)?$APP.Aa(a,b):null},W9=function(a,b,c){if(E8(b)){var d=T9(U9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=U9[b]=d):b=d}c=V9.g?V9.g(c):V9.call(null,c);a[b]=c;return a},V9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(W9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=
|
||||||
|
Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,0,null)}return c.call(this,e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.u=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},Y9=function(a,b,c){if(E8(b)){var d=T9(X9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=X9[b]=d):b=d}c=V9(c);a[b]=c;return a},Z9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(Y9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;
|
||||||
|
if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,0,null)}return c.call(this,e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.u=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},$9=function(a,b,c,d,e){switch($APP.Je(b)-e){case 0:return e8.createElement(c,d);case 1:return e8.createElement(c,d,R8(a,$APP.B.i(b,e,null)));default:return e8.createElement.apply(null,$APP.fg(function(f,l,g){l>=e&&f.push(R8(a,g));return f},[c,
|
||||||
|
d],b))}},a$=function(a,b,c,d){this.tag=a;this.id=b;this.className=c;this.Df=d},c$=function(a,b,c){var d=$APP.Aa(a,Q8(c));null==d?n9(a)?a=I9(c,a,a):(d=$APP.F(a),d=$APP.E.i(d,b$,a),d=H9(d,c),a=I9(c,a,d)):a=d;c={};c.argv=b;b=H8(b);null!=b&&(c.key=b);return e8.createElement(a,c)},d$=function(a,b,c,d){var e={};e.cf=a;e.argv=$APP.Hk.h(b,c);b=H8(b);null!=b&&(e.key=b);return e8.createElement(M9(d,a),e)},e$=function(a,b,c){var d;if(d=$APP.jf(a))d=null==a?null:a.prototype,d=null!=(null==d?null:d.render);return d?
|
||||||
|
c$(a,b,c):d$(a,b,1,c)},i$=function(a,b,c,d){var e=a.tag,f=$APP.B.i(b,c,null),l=null==f||$APP.vf(f),g=function(){var w=l?f:null;var A=$APP.NQ.g(w);A=$APP.n(A)?$APP.E.i(w,$APP.NQ,f$.g(A)):w;var D=a.id;w=a.className;D=null!=D&&null==$APP.BS.g(A)?$APP.E.i(A,$APP.BS,D):A;if($APP.n(w)){var G=$APP.E.i,J=f$.h,R=$APP.NQ.g(A);A=$APP.n(R)?R:g$.g(A);w=G.call($APP.E,D,$APP.NQ,J.call(f$,w,A))}else w=D;w=$APP.n(a.Df)?Z9(w):V9(w);return $APP.n(w)?w:{}}();c+=l?1:0;a:switch(e){case "input":case "textarea":var p=!0;
|
||||||
|
break a;default:p=!1}if(p)return p=function(){var w=d.Jf;if($APP.n(w))return w;w=H9(h$,d);return d.Jf=w}(),R8(d,$APP.lf(new $APP.O(null,6,5,$APP.P,[p,b,e,g,c,d],null),$APP.F(b)));p=G8($APP.F(b));null!=p&&(g.key=p);return S8(d,b,e,g,c)},j$=function(a,b){return $APP.cc.g($APP.Yi.h(function(c){return R8(b,c)},a))},m$=function(a,b,c){null==b&&console.error("vec-to-elem",$APP.on.j($APP.Pe([a])));var d=$APP.B.i(a,0,null);switch(d instanceof $APP.ee?d.fb:null){case "\x3e":return c=$APP.B.i(a,1,null),c=new a$(c,
|
||||||
|
null,null,null),i$(c,a,2,b);case "r\x3e":c=$APP.B.i(a,1,null);d=$APP.B.i(a,2,null);d=$APP.n(d)?d:{};var e=G8($APP.F(a));null!=e&&(d.key=e);return S8(b,a,c,d,3);case "f\x3e":return d$($APP.B.i(a,1,null),a,2,b);case "\x3c\x3e":return d=$APP.B.i(a,1,null),c=null==d||$APP.vf(d),d=V9(c?d:null),d=$APP.n(d)?d:{},c=1+(c?1:0),e=H8(a),null!=e&&(d.key=e),S8(b,a,e8.Fragment,d,c);default:if(E8(d)||"string"===typeof d)a:for(;;)switch(c=$APP.B.i(a,0,null),c=$APP.Wh(c),d=c.indexOf("\x3e"),d){case -1:d=T9(k$,c);if(null==
|
||||||
|
d){var f=$APP.t($APP.Um(l$,$APP.Wh(c)));d=$APP.B.i(f,0,null);e=$APP.B.i(f,1,null);f=$APP.B.i(f,2,null);f=null==f?null:$APP.cT(f,/\./," ");var l=$APP.Di.h(-1,d.indexOf("-"));d=new a$(d,e,f,l);c=k$[c]=d}else c=d;b=i$(c,a,1,b);break a;case 0:b=null;break a;default:a=$APP.lf(new $APP.O(null,2,5,$APP.P,[$APP.Ch.i(c,0,d),$APP.E.i($APP.lf(a,null),0,$APP.Ch.h(c,d+1))],null),$APP.F(a))}else b=c.i?c.i(d,a,b):c.call(null,d,a,b);return b}},p$=function(a,b,c){var d=q9;q9=!0;try{return f8.render(a.s?a.s():a.call(null),
|
||||||
|
b,function(){var e=q9;q9=!1;try{return $APP.qj.B(o$,$APP.E,b,a),O8.flush_after_render(),null!=c?c.s?c.s():c.call(null):null}finally{q9=e}})}finally{q9=d}},u8="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),F9=new $APP.ee(null,"getInitialState","getInitialState",1541760916),q$=new $APP.ee(null,"component-will-unmount","component-will-unmount",-2058314698),u9=new $APP.ee(null,"reagentRender","reagentRender",-358306383),r$=new $APP.x(null,"container",
|
||||||
|
"container",-96406180,null),s$=new $APP.ee(null,"contextType","contextType",1033066077),t$=new $APP.ee(null,"getDerivedStateFromProps","getDerivedStateFromProps",-991834739),u$=new $APP.ee(null,"display-name","display-name",694513143),g$=new $APP.ee(null,"className","className",-1983287057),v$=new $APP.x("reagent.dom","render","reagent.dom/render",-1216356973,null),w$=new $APP.x(null,"callback-or-compiler","callback-or-compiler",90200066,null),x$=new $APP.x(null,"reagent.core","reagent.core",1841519592,
|
||||||
|
null),h9=new $APP.ee(null,"on-dispose","on-dispose",2105306360),y$=new $APP.ee(null,"no-cache","no-cache",1588056370),z$=new $APP.ee(null,"function-components","function-components",1492814963),A$=new $APP.x(null,"reagent.dom","reagent.dom",-2138920962,null),B$=new $APP.ee(null,"callback","callback",-705136228),x9=new $APP.ee(null,"cljsLegacyRender","cljsLegacyRender",-1527295613),N9=new $APP.ee(null,"on-write","on-write",31519475),C$=new $APP.ee(null,"contextTypes","contextTypes",-2023853910),D$=
|
||||||
|
new $APP.x(null,"render","render",232498073,null),v9=new $APP.ee(null,"render","render",-1408033454),f9=new $APP.ee(null,"auto-run","auto-run",1958400437),E$=new $APP.ee(null,"childContextTypes","childContextTypes",578717991),b$=new $APP.ee(null,"reagent-render","reagent-render",-985383853),F$=new $APP.x("reagent.core","atom","reagent.core/atom",1748890217,null),G$=new $APP.ee(null,"componentWillUnmount","componentWillUnmount",1573788814),w9=new $APP.ee(null,"displayName","displayName",-809144601),
|
||||||
|
H$=new $APP.ee(null,"getDerivedStateFromError","getDerivedStateFromError",166658477),g9=new $APP.ee(null,"on-set","on-set",-140953470),I$=new $APP.ee(null,"component-did-update","component-did-update",-1468549173),F8=new $APP.ee(null,"key","key",-1516042587),J$=new $APP.ee(null,"shouldComponentUpdate","shouldComponentUpdate",1795750960);var y8={},w8={},x8=[];z8.cache={};z8.resolve=function(a){return a};var e8=z8(0,{});var K$={};$APP.nj.g(null);var L$={},M$="undefined"!==typeof window&&null!=window.document,B8=new $APP.lm(null,new $APP.m(null,2,["aria",null,"data",null],null),null),f$=function f$(a){switch(arguments.length){case 0:return f$.s();case 1:return f$.g(arguments[0]);case 2:return f$.h(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return f$.j(arguments[0],arguments[1],new $APP.Xb(c.slice(2),0,null))}};f$.s=function(){return null};
|
||||||
|
f$.g=function(a){return $APP.qf(a)?(a=$APP.lj.h(function(b){return $APP.n(b)?E8(b)?$APP.Wh(b):b:null},a),$APP.z(a)?$APP.eT.h(" ",a):null):E8(a)?$APP.Wh(a):a};f$.h=function(a,b){return $APP.n(a)?$APP.n(b)?[$APP.q.g(f$.g(a))," ",$APP.q.g(f$.g(b))].join(""):f$.g(a):f$.g(b)};f$.j=function(a,b,c){return $APP.dc.i(f$,f$.h(a,b),c)};f$.u=function(a){var b=$APP.r(a),c=$APP.t(a);a=$APP.r(c);c=$APP.t(c);return this.j(b,a,c)};f$.o=2;var q9=!1;var E9=0,N$=M$?function(){var a=window;return function(){var b=a.requestAnimationFrame;if($APP.n(b))return b;b=a.webkitRequestAnimationFrame;if($APP.n(b))return b;b=a.mozRequestAnimationFrame;if($APP.n(b))return b;b=a.msRequestAnimationFrame;return $APP.n(b)?b:I8}().bind(a)}():I8;$APP.k=N8.prototype;$APP.k.flush_after_render=function(){var a=this.ef;if(null==a)return null;this.ef=null;return L8(a)};$APP.k.queue_render=function(a){null==this.hf&&(this.hf=[]);return M8(this,this.hf,a)};
|
||||||
|
$APP.k.schedule=function(){function a(){return b.run_queues()}var b=this;if(this.jf)return null;this.jf=!0;return N$.g?N$.g(a):N$.call(null,a)};$APP.k.flush_before_flush=function(){var a=this.ff;if(null==a)return null;this.ff=null;return L8(a)};$APP.k.flush_queues=function(){this.flush_before_flush();K8();this.flush_render();return this.flush_after_render()};$APP.k.run_queues=function(){this.jf=!1;return this.flush_queues()};
|
||||||
|
$APP.k.add_before_flush=function(a){null==this.ff&&(this.ff=[]);return M8(this,this.ff,a)};$APP.k.add_after_render=function(a){null==this.ef&&(this.ef=[]);return M8(this,this.ef,a)};$APP.k.flush_render=function(){var a=this.hf;if(null==a)return null;this.hf=null;a:{a.sort(J8);for(var b=a.length,c=0;;)if(c<b){var d=a[c];!0===d.cljsIsDirty&&d.forceUpdate();c+=1}else break a}return null};var O8=new N8;var T8;$APP.nj.g(0);var d9=null;$APP.k=$8.prototype;$APP.k.O=function(a,b,c){return Z8(b,c,"RAtom",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.T=function(){return this.D};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};$APP.k.ne=function(a,b){a=this.state;this.state=b;null!=this.Bc&&Y8(this,a,b);return b};$APP.k.oe=function(a,b){return this.ne(null,b.g?b.g(this.state):b.call(null,this.state))};
|
||||||
|
$APP.k.pe=function(a,b,c){return this.ne(null,b.h?b.h(this.state,c):b.call(null,this.state,c))};$APP.k.qe=function(a,b,c,d){return this.ne(null,b.i?b.i(this.state,c,d):b.call(null,this.state,c,d))};$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this.state,c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){return X8(this,b)};$APP.k.Z=function(a,b){return new $8(this.state,b,this.Fe,this.Bc)};
|
||||||
|
$APP.k.jb=function(){V8(this);return this.state};var p9=function p9(a){switch(arguments.length){case 1:return p9.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return p9.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};p9.g=function(a){return new $8(a,null,null,null)};p9.j=function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,$APP.ub);c=$APP.ce.h(c,$APP.oj);return new $8(a,b,c,null)};p9.u=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};
|
||||||
|
p9.o=1;$APP.k=c9.prototype;$APP.k._peek_at=function(){var a=T8;T8=null;try{return this.jb(null)}finally{T8=a}};$APP.k._handle_change=function(a,b,c){return b===c||this.bf?null:null==this.af?(this.bf=!0,null==d9&&(d9=[],!1===O8.jf&&O8.schedule()),d9.push(this)):!0===this.af?this._run(!1):this.af.g?this.af.g(this):this.af.call(null,this)};
|
||||||
|
$APP.k._update_watching=function(a){var b=$APP.qm(a),c=$APP.qm(this.df);this.df=a;a=$APP.z($APP.yY.h(b,c));for(var d=null,e=0,f=0;;)if(f<e){var l=d.S(null,f);$APP.td(l,this,b9);f+=1}else if(a=$APP.z(a))d=a,$APP.yf(d)?(a=$APP.Dd(d),f=$APP.Ed(d),d=a,e=$APP.Je(a),a=f):(a=$APP.r(d),$APP.td(a,this,b9),a=$APP.t(d),d=null,e=0),f=0;else break;b=$APP.z($APP.yY.h(c,b));c=null;for(e=d=0;;)if(e<d)a=c.S(null,e),$APP.ud(a,this),e+=1;else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),d=$APP.Ed(c),c=b,a=$APP.Je(b),
|
||||||
|
b=d,d=a):(a=$APP.r(c),$APP.ud(a,this),b=$APP.t(c),c=null,d=0),e=0;else return null};$APP.k._queued_run=function(){return this.bf&&null!=this.df?this._run(!0):null};$APP.k._try_capture=function(a){try{return this.lf=null,U8(a,this)}catch(b){return this.lf=this.state=a=b,this.bf=!1}};$APP.k._run=function(a){var b=this.state;a=$APP.n(a)?this._try_capture(this.f):U8(this.f,this);this.vf||(this.state=a,null==this.Bc||$APP.fe.h(b,a)||Y8(this,b,a));return a};
|
||||||
|
$APP.k._set_opts=function(a){var b=$APP.Ai(a);a=$APP.ce.h(b,f9);var c=$APP.ce.h(b,g9),d=$APP.ce.h(b,h9);b=$APP.ce.h(b,y$);null!=a&&(this.af=a);null!=c&&(this.Gf=c);null!=d&&(this.wf=d);return null!=b?this.vf=b:null};$APP.k.O=function(a,b,c){return Z8(b,c,"Reaction",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};
|
||||||
|
$APP.k.rf=function(){var a=this.state,b=this.df;this.af=this.state=this.df=null;this.bf=!0;b=$APP.z($APP.qm(b));for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);$APP.ud(f,this);e+=1}else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),e=$APP.Ed(c),c=b,d=$APP.Je(b),b=e):(b=$APP.r(c),$APP.ud(b,this),b=$APP.t(c),c=null,d=0),e=0;else break;null!=this.wf&&this.wf(a);a=this.Kf;if(null==a)return null;b=a.length;for(c=0;;)if(c<b)d=a[c],d.g?d.g(this):d.call(null,this),c+=1;else return null};
|
||||||
|
$APP.k.ne=function(a,b){a=this.state;this.state=b;this.Gf(a,b);Y8(this,a,b);return b};$APP.k.oe=function(a,b){a=this.ne;var c=this._peek_at();b=b.g?b.g(c):b.call(null,c);return a.call(this,null,b)};$APP.k.pe=function(a,b,c){a=this.ne;var d=this._peek_at();b=b.h?b.h(d,c):b.call(null,d,c);return a.call(this,null,b)};$APP.k.qe=function(a,b,c,d){a=this.ne;var e=this._peek_at();b=b.i?b.i(e,c,d):b.call(null,e,c,d);return a.call(this,null,b)};
|
||||||
|
$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this._peek_at(),c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){a=$APP.pf(this.Bc);X8(this,b);return!a&&$APP.pf(this.Bc)&&null==this.af?this.rf(null):null};
|
||||||
|
$APP.k.jb=function(){var a=this.lf;if(null!=a)throw a;(a=null==T8)&&(e9.s?e9.s():e9.call(null));a&&null==this.af?this.bf&&(a=this.state,this.state=this.f.s?this.f.s():this.f.call(null),null==this.Bc||$APP.fe.h(a,this.state)||Y8(this,a,this.state)):(V8(this),this.bf&&this._run(!1));return this.state};K8=e9;var k9=i9(null);var y9,j9=new $APP.m(null,1,[y$,!0],null),B9=new $APP.m(null,2,[J$,null,G$,null],null),s9=function(a){var b=$APP.nj.g($APP.Hi);return function(c){var d=$APP.ce.h($APP.Oc(b),c);if(null!=d)return d;d=a.g?a.g(c):a.call(null,c);$APP.qj.B(b,$APP.E,c,d);return d}}(function(a){if("string"===typeof a)return a;a=$APP.Wh(a);a=$APP.cT(a,/(unsafe|UNSAFE)[-_]/,"UNSAFE_");a=$APP.jT.h(a,/-/);var b=$APP.z(a);a=$APP.r(b);b=$APP.t(b);return $APP.Yb.i($APP.q,a,$APP.Yi.h(A8,b))}),G9=new $APP.O(null,5,5,$APP.P,[E$,C$,
|
||||||
|
s$,t$,H$],null);var O9=new $APP.lm(null,new $APP.m(null,6,["url",null,"tel",null,"text",null,"textarea",null,"password",null,"search",null],null),null),h$=new $APP.m(null,4,[u$,"ReagentInput",I$,P9,q$,function(a){return a.nf=null},b$,function(a,b,c,d,e){S9(c);return S8(e,a,b,c,d)}],null);var O$={},g8,l$=/([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/,U9={"class":"className","for":"htmlFor",charset:"charSet"},X9={},k$={},R$=function(a){var b=$APP.Cn.s(),c=$APP.n(z$.g(a))?e$:c$;if("undefined"===typeof K$||"undefined"===typeof L$||"undefined"===typeof O$||"undefined"===typeof g8)g8=function(d,e,f,l){this.Hf=d;this.id=e;this.uf=f;this.Ff=l;this.C=393216;this.J=0},g8.prototype.Z=function(d,e){return new g8(this.Hf,this.id,this.uf,e)},g8.prototype.T=function(){return this.Ff},g8.prototype.If=
|
||||||
|
function(){return this.id},g8.prototype.xf=function(d,e){return"object"!==$APP.pa(e)?e:$APP.xf(e)?m$(e,this,this.uf):$APP.Ff(e)?j$(e,this):E8(e)?$APP.Wh(e):(null!=e?e.C&2147483648||$APP.Ua===e.ba||(e.C?0:$APP.Pb($APP.qd,e)):$APP.Pb($APP.qd,e))?$APP.on.j($APP.Pe([e])):e},g8.prototype.yf=function(d,e,f,l,g){return $9(this,e,f,l,g)},g8.Td=!0,g8.$c="reagent.impl.template/t_reagent$impl$template35072",g8.ue=function(d){return $APP.od(d,"reagent.impl.template/t_reagent$impl$template35072")};return new g8(a,
|
||||||
|
b,c,$APP.Hi)}($APP.Hi);var S$=function S$(a){switch(arguments.length){case 1:return S$.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return S$.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};S$.g=function(a){return p9.g(a)};S$.j=function(a,b){return $APP.Yb.i(p9,a,b)};S$.u=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};S$.o=1;var f8=z8(1,{});var o$=$APP.nj.g($APP.Hi),T$=function T$(a){switch(arguments.length){case 2:return T$.h(arguments[0],arguments[1]);case 3:return T$.i(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};T$.h=function(a,b){return T$.i(a,b,R$)};
|
||||||
|
T$.i=function(a,b,c){e9();c=$APP.jf(c)?new $APP.O(null,2,5,$APP.P,[R$,c],null):new $APP.O(null,2,5,$APP.P,[c,B$.g(c)],null);var d=$APP.B.i(c,0,null);c=$APP.B.i(c,1,null);return p$(function(){return R8(d,$APP.jf(a)?a.s?a.s():a.call(null):a)},b,c)};T$.o=3;var U$=$APP.gU(x$,null),V$=new $APP.m(null,1,[$APP.YI,function(){var a=new $APP.de(function(){return S$},F$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[x$,$APP.YI,"reagent/core.cljs",11,new $APP.m(null,6,[$APP.aO,!0,$APP.Cs,1,$APP.Mt,1,$APP.hu,new $APP.O(null,1,5,$APP.P,[new $APP.O(null,1,5,$APP.P,[$APP.ct],null)],null),$APP.V,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.ct],null),new $APP.O(null,3,5,$APP.P,[$APP.ct,$APP.Wo,$APP.xL],null)),$APP.tC,$APP.I(null,
|
||||||
|
null)],null),1,211,211,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.ct],null),new $APP.O(null,3,5,$APP.P,[$APP.ct,$APP.Wo,$APP.xL],null)),"Like clojure.core/atom, except that it keeps track of derefs.\n Reagent components that derefs one of these are automatically\n re-rendered.",$APP.n(S$)?S$.m:null])),b=$APP.Oc(a);a=$APP.F(a);var c=U$.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,U$,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?
|
||||||
|
$APP.nX(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null),W$=$APP.gU(A$,null),X$=new $APP.m(null,1,[D$,function(){var a=new $APP.de(function(){return T$},v$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[A$,D$,"reagent/dom.cljs",13,new $APP.m(null,6,[$APP.aO,!1,$APP.Cs,3,$APP.Mt,3,$APP.hu,new $APP.O(null,2,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)],null),$APP.V,$APP.I(new $APP.O(null,
|
||||||
|
2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),$APP.tC,$APP.I(null,null)],null),1,29,29,$APP.I(new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),"Render a Reagent component into the DOM. The first argument may be\n either a vector (using Reagent's Hiccup syntax), or a React element.\n The second argument should be a DOM node.\n\n Optionally takes a callback that is called when the component is in place.\n\n Returns the mounted component instance.",
|
||||||
|
$APP.n(T$)?T$.m:null])),b=$APP.Oc(a);a=$APP.F(a);var c=W$.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,W$,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.nX(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null);
|
||||||
|
$APP.qj.i($APP.H7,function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,$APP.MA);var d=$APP.ce.h(c,$APP.Cr),e=$APP.ce.h(c,$APP.lH),f=$APP.ce.h(c,$APP.GG),l=$APP.ce.h(c,$APP.LJ),g=$APP.ce.h(c,$APP.PJ),p=$APP.ce.h(c,$APP.GE),w=$APP.ce.h(c,$APP.iH),A=$APP.ce.h(c,$APP.jC),D=$APP.ce.h(c,$APP.ls),G=$APP.ce.h(c,$APP.Iu),J=$APP.ce.h(c,$APP.Lt),R=$APP.ce.h(c,$APP.AP);c=$APP.WC.g(a);$APP.AQ(c,e,G,d,p,A);d=$APP.em.j($APP.Pe([$APP.CK.g(a),R]));e=$APP.jX(d);p=$APP.E.j;A=$APP.RP.g(a);return p.call($APP.E,new $APP.m(null,
|
||||||
|
5,[$APP.lH,$APP.Hi,$APP.WC,c,$APP.MA,b,$APP.GG,f,$APP.RP,$APP.n(A)?A:$APP.n(w)?w:J],null),$APP.iH,$APP.n(w)?$APP.A7($APP.iH.g(a),$APP.Pe([w])):null,$APP.Pe([$APP.Lt,$APP.n(J)?$APP.A7($APP.Lt.g(a),$APP.Pe([J])):null,$APP.ls,D,$APP.LJ,l,$APP.PJ,g,$APP.zA,$APP.zA.g(e),$APP.CK,d,$APP.QO,$APP.QO.g(e)]))},new $APP.m(null,1,[$APP.Cr,new $APP.m(null,2,[x$,V$,A$,X$],null)],null));
|
||||||
|
}).call(this);
|
2170
js/sci-script-tag.js
Normal file
2170
js/sci-script-tag.js
Normal file
File diff suppressed because it is too large
Load diff
1847
js/sci_script_tag.js
Normal file
1847
js/sci_script_tag.js
Normal file
File diff suppressed because it is too large
Load diff
183
js/scittle.cljs-ajax.js
Normal file
183
js/scittle.cljs-ajax.js
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
(function(){
|
||||||
|
'use strict';var Ts=function(a,b){return $APP.qh[a]=b},Us=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},Vs=function(a,b){b&=63;if(0==b)return a;var c=a.Qf;return 32>b?$APP.yh(a.Uf>>>b|c<<32-b,c>>>b):32==b?$APP.yh(c,0):$APP.yh(c>>>b-32,0)},Xs=function(a,b,c){return a.call.apply(a.bind,arguments)},Ys=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,
|
||||||
|
d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},$s=function(a,b,c){$s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Xs:Ys;return $s.apply(null,arguments)},bt=function(a,b){function c(){}c.prototype=b.prototype;a.Jg=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.xe=function(d,e,f){for(var l=Array(arguments.length-2),g=2;g<arguments.length;g++)l[g-2]=arguments[g];return b.prototype[e].apply(d,l)}},dt=function(a,b,c){return Object.prototype.hasOwnProperty.call(a,
|
||||||
|
b)?a[b]:a[b]=c(b)},gt=function(a){a:{var b=et;for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:"string"===typeof a?a.charAt(b):a[b]},ht=function(a,b){const c={};for(const d in a)c[d]=b.call(void 0,a[d],d,a);return c},jt=function(a,b){return a<b?-1:a>b?1:0},kt=function(a){return-1!=$APP.Xm.indexOf(a)},lt=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d},
|
||||||
|
nt=function(a){if(a.Fg&&"function"==typeof a.Fg)return a.Fg();if("string"===typeof a)return a.split("");if($APP.th(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b},ot=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if($APP.th(a)||"string"===typeof a)$APP.Wj(a,b,void 0);else{if(a.ag&&"function"==typeof a.ag)var c=a.ag();else if(a.Fg&&"function"==typeof a.Fg)c=void 0;else if($APP.th(a)||"string"===typeof a){c=[];
|
||||||
|
for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=$APP.xa(a);d=nt(a);e=d.length;for(var f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],a)}},rt=function(){},tt=function(a){if(a instanceof rt)return a;if("function"==typeof a.Yg)return a.Yg(!1);if($APP.th(a)){var b=0,c=new rt;c.next=function(){for(;;){if(b>=a.length)throw $APP.An;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},ut=function(a,b,c){if($APP.th(a))try{$APP.Wj(a,b,c)}catch(d){if(d!==$APP.An)throw d;}else{a=tt(a);try{for(;;)b.call(c,
|
||||||
|
a.next(),void 0,a)}catch(d){if(d!==$APP.An)throw d;}}},wt=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},xt=function(a,b){this.eg={};this.Yf=[];this.Ng=this.gg=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)},zt=function(a){if(a.gg!=a.Yf.length){for(var b=0,c=0;b<a.Yf.length;){var d=a.Yf[b];wt(a.eg,d)&&(a.Yf[c++]=d);b++}a.Yf.length=c}if(a.gg!=a.Yf.length){var e={};for(c=
|
||||||
|
b=0;b<a.Yf.length;)d=a.Yf[b],wt(e,d)||(a.Yf[c++]=d,e[d]=1),b++;a.Yf.length=c}},Ct=function(a){if(null!=a&&null!=a.Pf)a=a.Pf(a);else{var b=Ct[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Ct._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("ICloneable.-clone",a);}return a},Dt=function(a,b){if("-"==a.charAt(0))return $APP.Bh(Dt(a.substring(1),b));var c=parseInt(a,b||10);if(9007199254740991>=c)return new $APP.vh(c%4294967296|0,c/4294967296|0);if(0==a.length)throw Error("number format error: empty string");
|
||||||
|
if(0<=a.indexOf("-"))throw Error('number format error: interior "-" character: '+a);b=b||10;if(2>b||36<b)throw Error("radix out of range: "+b);c=$APP.Oh(Math.pow(b,8));for(var d=$APP.Gh,e=0;e<a.length;e+=8){var f=Math.min(8,a.length-e),l=parseInt(a.substring(e,e+f),b);8>f?(f=$APP.Oh(Math.pow(b,f)),d=d.multiply(f).add($APP.Oh(l))):(d=d.multiply(c),d=d.add($APP.Oh(l)))}return d},Et=function(a,b,c){if(null!=a&&null!=a.Zg)a=a.Zg(a,b,c);else{var d=Et[$APP.pa(null==a?null:a)];if(null!=d)a=d.Lf?d.Lf(a,b,
|
||||||
|
c):d.call(null,a,b,c);else if(d=Et._,null!=d)a=d.Lf?d.Lf(a,b,c):d.call(null,a,b,c);else throw $APP.Rb("AjaxImpl.-js-ajax-request",a);}return a},Ht=function(a){if(null!=a&&null!=a.dh)a=a.dh(a);else{var b=Ht[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Ht._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("AjaxResponse.-status",a);}return a},Kt=function(a){if(null!=a&&null!=a.eh)a=a.eh(a);else{var b=Kt[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);
|
||||||
|
else if(b=Kt._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("AjaxResponse.-status-text",a);}return a},Nt=function(a){if(null!=a&&null!=a.ah)a=a.ah(a);else{var b=Nt[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Nt._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("AjaxResponse.-get-all-headers",a);}return a},Ot=function(a){if(null!=a&&null!=a.$g)a=a.$g(a);else{var b=Ot[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Ot._,null!=
|
||||||
|
b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("AjaxResponse.-body",a);}return a},Pt=function(a){if(null!=a&&null!=a.bh)a=a.bh(a,"Content-Type");else{var b=Pt[$APP.pa(null==a?null:a)];if(null!=b)a=b.h?b.h(a,"Content-Type"):b.call(null,a,"Content-Type");else if(b=Pt._,null!=b)a=b.h?b.h(a,"Content-Type"):b.call(null,a,"Content-Type");else throw $APP.Rb("AjaxResponse.-get-response-header",a);}return a},Qt=function(a){if(null!=a&&null!=a.fh)a=a.fh(a);else{var b=Qt[$APP.pa(null==a?null:a)];if(null!=
|
||||||
|
b)a=b.g?b.g(a):b.call(null,a);else if(b=Qt._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("AjaxResponse.-was-aborted",a);}return a},Rt=function(a,b){if(null!=a&&null!=a.xg)a=a.xg(a,b);else{var c=Rt[$APP.pa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=Rt._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Rb("Interceptor.-process-request",a);}return a},Ut=function(a,b){if(null!=a&&null!=a.yg)a=a.yg(a,b);else{var c=Ut[$APP.pa(null==a?null:a)];if(null!=c)a=c.h?
|
||||||
|
c.h(a,b):c.call(null,a,b);else if(c=Ut._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Rb("Interceptor.-process-response",a);}return a},Wt=function(a){throw Error($APP.q.g(a));},Xt=function(a){a=Pt(a);return $APP.n(a)?a:""},Zt=function(a){return a instanceof $APP.ee?$APP.Wh(a):a},bu=function(a){var b=$APP.B.Lf(a,0,null);a=$APP.B.Lf(a,1,null);return[$APP.q.g(Zt(b)),"\x3d",$APP.q.g(au.g?au.g(a):au.call(null,a))].join("")},eu=function(a,b,c){return new $APP.O(null,2,5,$APP.P,[a.g?a.g(b):a.call(null,
|
||||||
|
b),c],null)},nu=function(a){var b=function(){var c=$APP.n(a)?a:lu;c=c instanceof $APP.ee?c.fb:null;switch(c){case "java":return function(){return null};case "rails":return function(){return""};case "indexed":return $APP.gg;default:throw Error(["No matching clause: ",$APP.q.g(c)].join(""));}}();return $APP.hj.h(eu,b)},tu=function(a,b){return $APP.eT.h("\x26",$APP.Yi.h(bu,pu(nu(a),null,new $APP.O(null,2,5,$APP.P,[null,b],null))))},zu=function(a){a=$APP.Ai(a);a=$APP.ce.h(a,uu);return new $APP.m(null,
|
||||||
|
2,[vu,$APP.hj.h(tu,a),wu,"application/x-www-form-urlencoded; charset\x3dutf-8"],null)},Eu=function(){return Math.round(15*Math.random()).toString(16)},Ju=function(a,b){if(3<a.length){if(b)return!0;b=a.charAt(1);return"~"===a.charAt(0)?":"===b||"$"===b||"#"===b:!1}return!1},Ku=function(a){var b=Math.floor(a/44);a=String.fromCharCode(a%44+48);return 0===b?"^"+a:"^"+String.fromCharCode(b+48)+a},Lu=function(){this.Sh=this.Eg=this.Vf=0;this.cache={}},Mu=function(){this.Vf=0;this.cache=[]},Ru=function(a,
|
||||||
|
b){if(null==a)return null==b;if(a===b)return!0;if("object"===typeof a){if(Ou(a)){if(Ou(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!Ru(a[c],b[c]))return!1;return!0}return!1}if(a.$f)return a.$f(b);if(null!=b&&"object"===typeof b){if(b.$f)return b.$f(a);c=0;var d=Tu(b).length,e;for(e in a)if(a.hasOwnProperty(e)&&(c++,!b.hasOwnProperty(e)||!Ru(a[e],b[e])))return!1;return c===d}}return!1},Vu=function(a,b){return a^b+2654435769+(a<<6)+(a>>2)},cy=function(a){var b=0;if(null!=a.forEach)a.forEach(function(l,
|
||||||
|
g){b=(b+(Zx(g)^Zx(l)))%4503599627370496});else for(var c=Tu(a),d=0;d<c.length;d++){var e=c[d],f=a[e];b=(b+(Zx(e)^Zx(f)))%4503599627370496}return b},dy=function(a){var b=0;if(Ou(a))for(var c=0;c<a.length;c++)b=Vu(b,Zx(a[c]));else a.forEach&&a.forEach(function(d){b=Vu(b,Zx(d))});return b},Zx=function(a){if(null==a)return 0;switch(typeof a){case "number":return a;case "boolean":return!0===a?1:0;case "string":var b=my[a];if(null!=b)a=b;else{for(var c=b=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;
|
||||||
|
ry++;256<=ry&&(my={},ry=1);a=my[a]=b}return a;case "function":return b=a.transit$hashCode$,b||(b=uy,"undefined"!=typeof Object.defineProperty?Object.defineProperty(a,"transit$hashCode$",{value:b,enumerable:!1}):a.transit$hashCode$=b,uy++),b;default:return a instanceof Date?a.valueOf():Ou(a)?dy(a):a.cg?a.cg():cy(a)}},vy=function(a,b){this.tag=a;this.rep=b;this.Tf=-1},xy=function(a,b){return new vy(a,b)},yy=function(a){this.Wf=a;this.Tf=-1},Ay=function(a){this.Wf=a;this.Tf=-1},Ey=function(a,b,c){var d=
|
||||||
|
"";c=c||b+1;for(var e=8*(7-b),f=(new $APP.vh(255,0)).shiftLeft(e);b<c;b++,e-=8,f=Vs(f,8)){var l=Vs(a.and(f),e).toString(16);1==l.length&&(l="0"+l);d+=l}return d},Fy=function(a,b){this.high=a;this.low=b;this.Tf=-1},Gy=function(a,b){this.entries=a;this.type=b||0;this.Vf=0},Jy=function(a,b){this.map=a;this.type=b||0;this.keys=this.map.ag();this.Vf=0;this.mg=null;this.kg=0},Sy=function(a,b){if(a instanceof Ly&&(b instanceof My||b instanceof Ly)){if(a.size!==b.size)return!1;for(var c in a.map)for(var d=
|
||||||
|
a.map[c],e=0;e<d.length;e+=2)if(!Ru(d[e+1],b.get(d[e])))return!1;return!0}if(a instanceof My&&(b instanceof My||b instanceof Ly)){if(a.size!==b.size)return!1;a=a.Sf;for(e=0;e<a.length;e+=2)if(!Ru(a[e+1],b.get(a[e])))return!1;return!0}if(null!=b&&"object"===typeof b&&(e=Tu(b),c=e.length,a.size===c)){for(d=0;d<c;d++){var f=e[d];if(!a.has(f)||!Ru(b[f],a.get(f)))return!1}return!0}return!1},Xy=function(a){return null==a?"null":"array"===$APP.pa(a)?"["+a.toString()+"]":"string"===$APP.pa(a)?'"'+a+'"':a.toString()},
|
||||||
|
Zy=function(a){var b=0,c="TransitMap {";a.forEach(function(d,e){c+=Xy(e)+" \x3d\x3e "+Xy(d);b<a.size-1&&(c+=", ");b++});return c+"}"},$y=function(a){var b=0,c="TransitSet {";a.forEach(function(d){c+=Xy(d);b<a.size-1&&(c+=", ");b++});return c+"}"},My=function(a){this.Sf=a;this.Rf=null;this.Tf=-1;this.size=a.length/2;this.wh=0},fz=function(a){if(a.Rf)throw Error("Invalid operation, already converted");if(8>a.size)return!1;a.wh++;return 32<a.wh?(a.Rf=bz(a.Sf,!1,!0),a.Sf=[],!0):!1},Ly=function(a,b,c){this.map=
|
||||||
|
b||{};this.rg=a||[];this.size=c||0;this.Tf=-1},bz=function(a,b,c){a=a||[];b=!1===b?b:!0;if((!0!==c||!c)&&64>=a.length){if(b){var d=a;a=[];for(b=0;b<d.length;b+=2){var e=!1;for(c=0;c<a.length;c+=2)if(Ru(a[c],d[b])){a[c+1]=d[b+1];e=!0;break}e||(a.push(d[b]),a.push(d[b+1]))}}return new My(a)}d={};e=[];var f=0;for(b=0;b<a.length;b+=2){c=Zx(a[b]);var l=d[c];if(null==l)e.push(c),d[c]=[a[b],a[b+1]],f++;else{var g=!0;for(c=0;c<l.length;c+=2)if(Ru(l[c],a[b])){l[c+1]=a[b+1];g=!1;break}g&&(l.push(a[b]),l.push(a[b+
|
||||||
|
1]),f++)}}return new Ly(e,d,f)},gz=function(a){this.map=a;this.size=a.size},hz=function(a){a=a||[];for(var b={},c=[],d=0,e=0;e<a.length;e++){var f=Zx(a[e]),l=b[f];if(null==l)c.push(f),b[f]=[a[e],a[e]],d++;else{f=!0;for(var g=0;g<l.length;g+=2)if(Ru(l[g],a[e])){f=!1;break}f&&(l.push(a[e]),l.push(a[e]),d++)}}return new gz(new Ly(c,b,d))},jz=function(a){this.Kb=a},kz=function(a){this.options=a||{};this.Xf={};for(var b in this.zg.Xf)this.Xf[b]=this.zg.Xf[b];for(b in this.options.handlers){a:{switch(b){case "_":case "s":case "?":case "i":case "d":case "b":case "'":case "array":case "map":a=
|
||||||
|
!0;break a}a=!1}if(a)throw Error('Cannot override handler for ground type "'+b+'"');this.Xf[b]=this.options.handlers[b]}this.Rg=null!=this.options.preferStrings?this.options.preferStrings:this.zg.Rg;this.rh=null!=this.options.preferBuffers?this.options.preferBuffers:this.zg.rh;this.ih=this.options.defaultHandler||this.zg.ih;this.bg=this.options.mapBuilder;this.sg=this.options.arrayBuilder},tz=function(a,b,c,d,e){if(e){var f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return f}f=c&&c.Vf;
|
||||||
|
if(2===b.length&&"string"===typeof b[0]&&(e=a.decode(b[0],c,!1,!1))&&e instanceof jz)return b=b[1],f=a.Xf[e.Kb],null!=f?f=f(a.decode(b,c,d,!0),a):xy(e.Kb,a.decode(b,c,d,!1));c&&f!=c.Vf&&(c.Vf=f);if(a.sg){if(32>=b.length&&a.sg.fromArray){f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return a.sg.fromArray(f,b)}f=a.sg.init(b);for(e=0;e<b.length;e++)f=a.sg.add(f,a.decode(b[e],c,d,!1),b);return a.sg.finalize(f,b)}f=[];for(e=0;e<b.length;e++)f.push(a.decode(b[e],c,d,!1));return f},xz=function(a,
|
||||||
|
b){if("~"===b.charAt(0)){var c=b.charAt(1);if("~"===c||"^"===c||"`"===c)return b.substring(1);if("#"===c)return new jz(b.substring(2));var d=a.Xf[c];return null==d?a.ih(c,b.substring(2)):d(b.substring(2),a)}return b},zz=function(a){this.Uh=new kz(a)},Az=function(a,b){this.Zh=a;this.options=b||{};this.cache=this.options.cache?this.options.cache:new Mu},Jz=function(a){if(null==a)return"null";if(a===String)return"string";if(a===Boolean)return"boolean";if(a===Number)return"number";if(a===Array)return"array";
|
||||||
|
if(a===Object)return"map";var b=a[Bz];null==b&&("undefined"!=typeof Object.defineProperty?(b=++Hz,Object.defineProperty(a,Bz,{value:b,enumerable:!1})):a[Bz]=b=++Hz);return b},Kz=function(a,b){a=a.toString();for(var c=a.length;c<b;c++)a="0"+a;return a},Lz=function(){},Nz=function(){},Sz=function(){},Vz=function(){},Wz=function(){},Yz=function(){},aA=function(){},eA=function(){},hA=function(){},iA=function(){},jA=function(){},kA=function(){},lA=function(){},nA=function(){},qA=function(){},wA=function(){},
|
||||||
|
xA=function(){},yA=function(){},BA=function(){this.Xf={};this.set(null,new Lz);this.set(String,new Nz);this.set(Number,new Sz);this.set($APP.vh,new Vz);this.set(Boolean,new Wz);this.set(Array,new Yz);this.set(Object,new aA);this.set(Date,new hA);this.set(Fy,new iA);this.set(yy,new jA);this.set(Ay,new kA);this.set(vy,new lA);this.set(gz,new nA);this.set(My,new qA);this.set(Ly,new wA);"undefined"!=typeof $APP.kX.Xg&&this.set($APP.kX.Xg,new xA);"undefined"!=typeof Uint8Array&&this.set(Uint8Array,new yA)},
|
||||||
|
FA=function(a){this.Hf=a||{};this.Rg=null!=this.Hf.preferStrings?this.Hf.preferStrings:!0;this.Fh=this.Hf.objectBuilder||null;this.transform=this.Hf.transform||null;this.Xf=new BA;if(a=this.Hf.handlers){if(Ou(a)||!a.forEach)throw Error('transit writer "handlers" option must be a map');var b=this;a.forEach(function(c,d){if(void 0!==d)b.Xf.set(d,c);else throw Error("Cannot create handler for JavaScript undefined");})}this.Gg=this.Hf.handlerForForeign;this.Ug=this.Hf.unpack||function(c){return c instanceof
|
||||||
|
My&&null===c.Rf?c.Sf:!1};this.Mg=this.Hf&&this.Hf.verbose||!1},HA=function(a,b,c,d,e){a=a+b+c;return e?e.write(a,d):a},JA=function(a,b,c){var d=[];if(Ou(b))for(var e=0;e<b.length;e++)d.push(IA(a,b[e],!1,c));else b.forEach(function(f){d.push(IA(a,f,!1,c))});return d},QA=function(a,b){return"string"!==typeof b?(a=a.lg(b))&&1===a.tag(b).length:!0},RA=function(a,b){var c=a.Ug(b),d=!0;if(c){for(b=0;b<c.length&&(d=QA(a,c[b]),d);b+=2);return d}if(b.keys){c=b.keys();var e=null;if(c.next){for(e=c.next();!e.done;){d=
|
||||||
|
QA(a,e.value);if(!d)break;e=c.next()}return d}}if(b.forEach)return b.forEach(function(f,l){d=d&&QA(a,l)}),d;throw Error("Cannot walk keys of object type "+(null==b?null:b.constructor).name);},TA=function(a){if(a.constructor.transit$isObject)return!0;var b=a.constructor.toString();b=b.substr(9);b=b.substr(0,b.indexOf("("));b="Object"==b;"undefined"!=typeof Object.defineProperty?Object.defineProperty(a.constructor,"transit$isObject",{value:b,enumerable:!1}):a.constructor.transit$isObject=b;return b},
|
||||||
|
UA=function(a,b,c){var d=null,e=null,f=null;d=null;var l=0;if(b.constructor===Object||null!=b.forEach||a.Gg&&TA(b)){if(a.Mg){if(null!=b.forEach)if(RA(a,b)){var g={};b.forEach(function(p,w){g[IA(a,w,!0,!1)]=IA(a,p,!1,c)})}else{d=a.Ug(b);e=[];f=HA("~#","cmap","",!0,c);if(d)for(;l<d.length;l+=2)e.push(IA(a,d[l],!1,!1)),e.push(IA(a,d[l+1],!1,c));else b.forEach(function(p,w){e.push(IA(a,w,!1,!1));e.push(IA(a,p,!1,c))});g={};g[f]=e}else for(d=Tu(b),g={};l<d.length;l++)g[IA(a,d[l],!0,!1)]=IA(a,b[d[l]],!1,
|
||||||
|
c);return g}if(null!=b.forEach){if(RA(a,b)){d=a.Ug(b);g=["^ "];if(d)for(;l<d.length;l+=2)g.push(IA(a,d[l],!0,c)),g.push(IA(a,d[l+1],!1,c));else b.forEach(function(p,w){g.push(IA(a,w,!0,c));g.push(IA(a,p,!1,c))});return g}d=a.Ug(b);e=[];f=HA("~#","cmap","",!0,c);if(d)for(;l<d.length;l+=2)e.push(IA(a,d[l],!1,c)),e.push(IA(a,d[l+1],!1,c));else b.forEach(function(p,w){e.push(IA(a,w,!1,c));e.push(IA(a,p,!1,c))});return[f,e]}g=["^ "];for(d=Tu(b);l<d.length;l++)g.push(IA(a,d[l],!0,c)),g.push(IA(a,b[d[l]],
|
||||||
|
!1,c));return g}if(null!=a.Fh)return a.Fh(b,function(p){return IA(a,p,!0,c)},function(p){return IA(a,p,!1,c)});l=(null==b?null:b.constructor).name;d=Error("Cannot write "+l);d.data={ph:b,type:l};throw d;},IA=function(a,b,c,d){null!==a.transform&&(b=a.transform(b));var e=a.lg(b)||(a.Gg?a.Gg(b,a.Xf):null),f=e?e.tag(b):null,l=e?e.rep(b):null;if(null!=e&&null!=f)switch(f){case "_":return c?HA("~","_","",c,d):null;case "s":return 0<l.length?(a=l.charAt(0),a="~"===a||"^"===a||"`"===a?"~"+l:l):a=l,HA("",
|
||||||
|
"",a,c,d);case "?":return c?HA("~","?",l.toString()[0],c,d):l;case "i":return Infinity===l?HA("~","z","INF",c,d):-Infinity===l?HA("~","z","-INF",c,d):isNaN(l)?HA("~","z","NaN",c,d):c||"string"===typeof l||l instanceof $APP.vh?HA("~","i",l.toString(),c,d):l;case "d":return c?HA(l.$h,"d",l,c,d):l;case "b":return HA("~","b",l,c,d);case "'":return a.Mg?(c={},b=HA("~#","'","",!0,d),c[b]=IA(a,l,!1,d),d=c):d=[HA("~#","'","",!0,d),IA(a,l,!1,d)],d;case "array":return JA(a,l,d);case "map":return UA(a,l,d);
|
||||||
|
default:a:{if(1===f.length){if("string"===typeof l){d=HA("~",f,l,c,d);break a}if(c||a.Rg){(a=a.Mg&&e.getVerboseHandler())?(f=a.tag(b),l=a.stringRep(b,a)):l=e.stringRep(b,e);if(null!==l){d=HA("~",f,l,c,d);break a}d=Error('Tag "'+f+'" cannot be encoded as string');d.data={tag:f,rep:l,ph:b};throw d;}}c=f;b=l;a.Mg?(e={},e[HA("~#",c,"",!0,d)]=IA(a,b,!1,d),d=e):d=[HA("~#",c,"",!0,d),IA(a,b,!1,d)]}return d}else throw d=(null==b?null:b.constructor).name,a=Error("Cannot write "+d),a.data={ph:b,type:d},a;},
|
||||||
|
WA=function(a,b){this.wg=a;this.options=b||{};this.cache=!1===this.options.cache?null:this.options.cache?this.options.cache:new Lu},$A=function(a,b){if("json"===a||"json-verbose"===a||null==a)return a=new zz(b),new Az(a,b);throw Error("Cannot create reader of type "+a);},aB=function(a,b){if("json"===a||"json-verbose"===a||null==a)return"json-verbose"===a&&(null==b&&(b={}),b.verbose=!0),a=new FA(b),new WA(a,b);b=Error('Type must be "json"');b.data={type:a};throw b;},dB=function(a,b){for(var c=$APP.z($APP.xa(b)),
|
||||||
|
d=null,e=0,f=0;;)if(f<e){var l=d.S(null,f);a[l]=b[l];f+=1}else if(c=$APP.z(c))d=c,$APP.yf(d)?(c=$APP.Dd(d),f=$APP.Ed(d),d=c,e=$APP.Je(c),c=f):(c=$APP.r(d),a[c]=b[c],c=$APP.t(d),d=null,e=0),f=0;else break;return a},fB=function(){},hB=function(){},pB=function(a){return $A($APP.Wh(lB),dB({handlers:$APP.Un($APP.em.j($APP.Pe([new $APP.m(null,6,["$",function(b){return $APP.y.g(b)},":",function(b){return $APP.Vh.g(b)},"set",function(b){return $APP.Uj.h($APP.nm,b)},"list",function(b){return $APP.Uj.h($APP.je,
|
||||||
|
b.reverse())},"cmap",function(b){for(var c=0,d=$APP.vd($APP.Hi);;)if(c<b.length){var e=c+2;d=$APP.si.Lf(d,b[c],b[c+1]);c=e}else return $APP.xd(d)},"with-meta",function(b){return $APP.lf(b[0],b[1])}],null),$APP.hf.h(oB.g(a),$APP.Nu)]))),defaultHandler:$APP.Nu.g(oB.g(a)),mapBuilder:new fB,arrayBuilder:new hB,prefersStrings:!1},$APP.Un($APP.hf.h(a,oB))))},qB=function(){},rB=function(){},sB=function(){},uB=function(){},wB=function(){},xB=function(){},BB=function(){},CB=function(a,b){this.value=a;this.D=
|
||||||
|
b},HB=function(){},KB=function(a,b){var c=new sB,d=new uB,e=new wB,f=new xB,l=$APP.em.j($APP.Pe([$APP.Hl([$APP.Fl,$APP.Ih,$APP.m,$APP.Al,$APP.Nk,$APP.Xb,$APP.ee,$APP.Eh,$APP.Xh,$APP.Fk,$APP.Mk,$APP.Cl,$APP.dm,CB,$APP.Wk,$APP.O,$APP.C,$APP.Me,$APP.lm,$APP.Xl,$APP.cm,$APP.Dk,$APP.om,$APP.bi,$APP.x,$APP.No,$APP.Jm,$APP.Kl],[d,c,d,c,c,c,new qB,c,c,f,c,c,c,new HB,c,f,c,c,e,d,c,c,e,c,new rB,new BB,c,c]),"undefined"!==typeof $APP.Ra&&"undefined"!==typeof $APP.Sa&&"undefined"!==typeof $APP.On?$APP.gf([$APP.On,
|
||||||
|
c]):null,"undefined"!==typeof $APP.Ra&&"undefined"!==typeof $APP.Sa&&"undefined"!==typeof $APP.Gj?$APP.gf([$APP.Gj,c]):null,"undefined"!==typeof $APP.Ra&&"undefined"!==typeof $APP.Sa&&"undefined"!==typeof $APP.Rf?$APP.gf([$APP.Rf,f]):null,oB.g(b)]));return aB($APP.Wh(a),dB({objectBuilder:function(g,p,w){return $APP.fg(function(A,D,G){A.push(p.g?p.g(D):p.call(null,D),w.g?w.g(G):w.call(null,G));return A},["^ "],g)},handlers:function(){var g=Ct(l);g.forEach=function(p){for(var w=$APP.z(this),A=null,
|
||||||
|
D=0,G=0;;)if(G<D){var J=A.S(null,G),R=$APP.B.Lf(J,0,null);J=$APP.B.Lf(J,1,null);$APP.fe.h($APP.Nu,R)?p.h?p.h(J,"default"):p.call(null,J,"default"):p.h?p.h(J,R):p.call(null,J,R);G+=1}else if(w=$APP.z(w))$APP.yf(w)?(A=$APP.Dd(w),w=$APP.Ed(w),R=A,D=$APP.Je(A),A=R):(A=$APP.r(w),R=$APP.B.Lf(A,0,null),J=$APP.B.Lf(A,1,null),$APP.fe.h($APP.Nu,R)?p.h?p.h(J,"default"):p.call(null,J,"default"):p.h?p.h(J,R):p.call(null,J,R),w=$APP.t(w),A=null,D=0),G=0;else return null};return g}(),unpack:function(g){return g instanceof
|
||||||
|
$APP.m?g.v:!1}},$APP.Un($APP.hf.h(b,oB))))},RB=function(a){return $APP.eT.h(", ","string"===typeof a?new $APP.O(null,1,5,$APP.P,[a],null):a)},VB=function(a,b,c,d,e,f){this.read=a;this.description=b;this.dg=c;this.Nf=d;this.N=e;this.H=f;this.C=2230716170;this.J=139264},fC=function(a){var b=$APP.hf.j(a,$B,$APP.Pe([eC,wu]));b=$APP.wf(a)?$APP.Uj.h($APP.Hi,b):b;return new VB($B.g(a),eC.g(a),wu.g(a),null,$APP.Ei(b),null)},kC=function(a,b,c){this.Nf=a;this.N=b;this.H=c;this.C=2230716170;this.J=139264},yC=
|
||||||
|
function(a,b){var c=$APP.Ai(a);a=$APP.ce.h(c,uu);var d=$APP.ce.h(c,$APP.Cz),e=$APP.ce.h(c,vC);c=$APP.ce.h(c,xC);d=$APP.fe.h(e,"GET")&&null==c?d:c;return $APP.n(d)?[$APP.q.g(b),$APP.n($APP.Vm(/\?/,b))?"\x26":"?",tu(a,d)].join(""):b},zC=function(a,b,c){this.Nf=a;this.N=b;this.H=c;this.C=2230716170;this.J=139264},BC=function(a,b,c){this.Nf=a;this.N=b;this.H=c;this.C=2230716170;this.J=139264},GC=function(a){var b=EC;a=$APP.Ai(a);var c=$APP.ce.h(a,FC);return c instanceof VB?c:$APP.xf(c)?b.g?b.g(a):b.call(null,
|
||||||
|
a):$APP.vf(c)?fC(c):c instanceof $APP.ee?Wt(new $APP.O(null,2,5,$APP.P,["keywords are not allowed as response formats in ajax calls: ",c],null)):$APP.If(c)?fC(new $APP.m(null,3,[$B,c,eC,"custom",wu,"*/*"],null)):Wt(new $APP.O(null,2,5,$APP.P,["unrecognized response format: ",c],null))},IC=function(a){a=$APP.Ai(a);a=$APP.ce.h(a,$APP.Ws);return $APP.n(a)?a:lB},PC=function(a,b){var c=function(){var d=JC.g(b);return $APP.n(d)?d:KB(a,b)}();return function(d){return c.write(d)}},aD=function(a){var b=IC(a),
|
||||||
|
c=$APP.fe.h(b,lB)||$APP.fe.h(b,QC)?"json":"msgpack";return new $APP.m(null,2,[vu,PC(b,a),wu,["application/transit+",c].join("")],null)},cD=function(a){var b=function(){var c=bD.g(a);return $APP.n(c)?c:pB(a)}();return function(c){c=Ot(c);return b.read(c)}},fD=function(a,b){a=$APP.xf(b)?$APP.r(b):wu.g(dD(a,b));return null==a?new $APP.O(null,1,5,$APP.P,["*/*"],null):"string"===typeof a?new $APP.O(null,1,5,$APP.P,[a],null):a},iD=function(a,b,c){b=fD(b,c);return $APP.aj(function(d){return $APP.fe.h(d,
|
||||||
|
"*/*")||0<=a.indexOf(d)},b)},mD=function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,FC);var d=Xt(a);return dD(c,$APP.r($APP.Qj.h(function(e){return iD(d,c,e)},b)))},nD=function(a){return function(b){var c=mD(b,a);c=$B.g(c);return c.g?c.g(b):c.call(null,b)}},oD=function(a){var b=$APP.Ai(a);a=$APP.ce.h(b,FC);return $APP.Oj.j(function(c){return fD(b,c)},$APP.Pe([$APP.xf(a)?a:new $APP.O(null,1,5,$APP.P,[a],null)]))},EC=function(a){var b=oD(a);return fC(new $APP.m(null,3,[$B,nD(a),qD,["(from ",$APP.q.g(b),")"].join(""),
|
||||||
|
wu,b],null))},tD=function(a){return function(b){return new $APP.m(null,3,[$APP.En,Ht(b),rD,Nt(b),$APP.FD,a.g?a.g(b):a.call(null,b)],null)}},yD=function(){return kt("iPhone")&&!kt("iPod")&&!kt("iPad")},zD=function(){var a=$APP.kX.document;return a?a.documentMode:void 0},RD=function(a){return dt(JD,a,function(){let b=0;const c=(0,$APP.Fa)(String(KD)).split("."),d=(0,$APP.Fa)(String(a)).split("."),e=Math.max(c.length,d.length);for(let g=0;0==b&&g<e;g++){var f=c[g]||"",l=d[g]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||
|
||||||
|
["","","",""];l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""];if(0==f[0].length&&0==l[0].length)break;b=jt(0==f[1].length?0:parseInt(f[1],10),0==l[1].length?0:parseInt(l[1],10))||jt(0==f[2].length,0==l[2].length)||jt(f[2],l[2]);f=f[3];l=l[3]}while(0==b)}return 0<=b})},aE=function(){0!=TD&&($D[$APP.qa(this)]=this);this.Ag=this.Ag;this.ug=this.ug},fE=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.qg=!1},iE=function(a,b){fE.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=
|
||||||
|
this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.Bg=null;a&&this.init(a,b)},pE=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.lg=e;this.key=++jE;this.vg=this.Og=!1},sE=function(a){a.vg=!0;a.listener=null;a.proxy=null;a.src=null;a.lg=null},
|
||||||
|
vE=function(a){this.src=a;this.Zf={};this.Lg=0},wE=function(a,b){var c=b.type;if(c in a.Zf){var d=a.Zf[c],e=(0,$APP.Aj)(d,b),f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);f&&(sE(b),0==a.Zf[c].length&&(delete a.Zf[c],a.Lg--))}},xE=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.vg&&f.listener==b&&f.capture==!!c&&f.lg==d)return e}return-1},yE=function(a,b){aE.call(this);this.Ah=this.hh=null;this.Eh=b;this.Dg=[];if(a>this.Eh)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");
|
||||||
|
for(b=0;b<a;b++)this.Dg.push(this.gh())},AE=function(a,b){a.hh=b},LE=function(a,b){a.Dg.length<a.Eh?a.Dg.push(b):JE(a,b)},JE=function(a,b){if(a.Ah)a.Ah(b);else if(Us(b))if("function"===typeof b.zh)b.zh();else for(var c in b)delete b[c]},PE=function(){this.Cg=[];this.Hg=new xt;this.Oh=this.Ph=this.Qh=this.Kh=0;this.Ig=new xt;this.yh=this.Nh=0;this.Wh=1;this.kh=new yE(0,4E3);this.kh.gh=function(){return new ME};this.Lh=new yE(0,50);this.Lh.gh=function(){return new OE};var a=this;this.Ch=new yE(0,2E3);
|
||||||
|
AE(this.Ch,function(){return a.Wh++});this.sh={}},OE=function(){this.uh=this.time=this.count=0},ME=function(){},XE=function(a,b,c,d){var e=[];-1==c?e.push(" "):e.push(UE(a.Bh-c));e.push(" ",VE(a.Bh-b));0==a.lh?e.push(" Start "):1==a.lh?(e.push(" Done "),e.push(UE(a.bi-a.startTime)," ms ")):e.push(" Comment ");e.push(d,a);0<a.Yh&&e.push("[VarAlloc ",a.Yh,"] ");return e.join("")},$E=function(a){a.sh.stop&&ut(a.Hg,function(b){this.sh.stop(b.id,YE)},a);a.Hg.clear()},UE=function(a){a=Math.round(a);
|
||||||
|
var b="";1E3>a&&(b=" ");100>a&&(b=" ");10>a&&(b=" ");return b+a},VE=function(a){a=Math.round(a);return String(100+a/1E3%60).substring(1,3)+"."+String(1E3+a%1E3).substring(1,4)},cF=function(a,b,c,d,e){if(d&&d.once)aF(a,b,c,d,e);else if(Array.isArray(b))for(var f=0;f<b.length;f++)cF(a,b[f],c,d,e);else c=dF(c),a&&a[eF]?a.ig.add(String(b),c,!1,Us(d)?!!d.capture:!!d,e):iF(a,b,c,!1,d,e)},iF=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var l=Us(e)?!!e.capture:!!e,g=lF(a);g||(a[mF]=g=
|
||||||
|
new vE(a));c=g.add(b,c,d,l,f);if(!c.proxy){d=qF();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)rF||(e=l),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(xF(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");AF++}},qF=function(){var a=DF,b=GF?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},
|
||||||
|
aF=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)aF(a,b[f],c,d,e);else c=dF(c),a&&a[eF]?a.ig.add(String(b),c,!0,Us(d)?!!d.capture:!!d,e):iF(a,b,c,!0,d,e)},IF=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)IF(a,b[f],c,d,e);else d=Us(d)?!!d.capture:!!d,c=dF(c),a&&a[eF]?a.ig.remove(String(b),c,d,e):a&&(a=lF(a))&&(b=a.mh(b,c,d,e))&&LF(b)},LF=function(a){if("number"!==typeof a&&a&&!a.vg){var b=a.src;if(b&&b[eF])wE(b.ig,a);else{var c=a.type,d=a.proxy;b.removeEventListener?
|
||||||
|
b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(xF(c),d):b.addListener&&b.removeListener&&b.removeListener(d);AF--;(c=lF(b))?(wE(c,a),0==c.Lg&&(c.src=null,b[mF]=null)):sE(a)}}},xF=function(a){return a in UF?UF[a]:UF[a]="on"+a},XF=function(a,b,c,d){var e=!0;if(a=lF(a))if(b=a.Zf[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.vg&&(f=WF(f,d),e=e&&!1!==f)}return e},WF=function(a,b){var c=a.listener,d=a.lg||a.src;a.Og&&LF(a);return c.call(d,b)},DF=function(a,
|
||||||
|
b){if(a.vg)return!0;if(!GF){if(!b)a:{b=["window","event"];for(var c=$APP.kX,d=0;d<b.length;d++)if(c=c[b[d]],null==c){b=null;break a}b=c}d=b;b=new iE(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(l){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.qg&&0<=e;e--){b.currentTarget=d[e];var f=XF(d[e],a,!0,b);c=c&&f}for(e=0;!b.qg&&e<d.length;e++)b.currentTarget=
|
||||||
|
d[e],f=XF(d[e],a,!1,b),c=c&&f}return c}return WF(a,new iE(b,this))},lF=function(a){a=a[mF];return a instanceof vE?a:null},dF=function(a){if("function"===typeof a)return a;a[$F]||(a[$F]=function(b){return a.handleEvent(b)});return a[$F]},aG=function(){aE.call(this);this.ig=new vE(this);this.Rh=this;this.qh=null},dG=function(a,b,c,d){b=a.ig.Zf[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var l=b[f];if(l&&!l.vg&&l.capture==c){var g=l.listener,p=l.lg||l.src;l.Og&&wE(a.ig,l);
|
||||||
|
e=!1!==g.call(p,d)&&e}}return e&&!d.defaultPrevented},eG=function(a,b,c){if("function"===typeof a)c&&(a=$s(a,c));else if(a&&"function"==typeof a.handleEvent)a=$s(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:$APP.kX.setTimeout(a,b||0)},fG=function(){},uG=function(a){var b;(b=a.xh)||(b={},pG(a)&&(b[0]=!0,b[1]=!0),b=a.xh=b);return b},wG=function(){},yG=function(a){return(a=pG(a))?new ActiveXObject(a):new XMLHttpRequest},pG=function(a){if(!a.Dh&&"undefined"==
|
||||||
|
typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){const b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(let c=0;c<b.length;c++){const d=b[c];try{return new ActiveXObject(d),a.Dh=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Dh},JG=function(a){aG.call(this);this.headers=new xt;this.Wg=a||null;this.jg=!1;this.Vg=this.Of=null;this.oh="";this.tg=0;this.Qg="";this.og=this.nh=
|
||||||
|
this.Pg=this.jh=!1;this.Kg=0;this.Tg=null;this.Sg=DG;this.th=this.Ih=this.vh=!1},PG=function(a){return LG&&RD(9)&&"number"===typeof a.timeout&&void 0!==a.ontimeout},et=function(a){return"content-type"==a.toLowerCase()},TG=function(a,b){a.jg=!1;a.Of&&(a.og=!0,a.Of.abort(),a.og=!1);a.Qg=b;a.tg=5;QG(a);RG(a)},QG=function(a){a.jh||(a.jh=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))},$G=function(a){if(a.jg&&"undefined"!=typeof $APP.rj)if(a.Vg[1]&&4==VG(a)&&2==a.getStatus())a.getStatus();else if(a.Pg&&
|
||||||
|
4==VG(a))eG(a.Hh,0,a);else if(a.dispatchEvent("readystatechange"),4==VG(a)){a.getStatus();a.jg=!1;try{const l=a.getStatus();a:switch(l){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var b=!0;break a;default:b=!1}var c;if(!(c=b)){var d;if(d=0===l){var e=String(a.oh).match(WG)[1]||null;if(!e&&$APP.kX.self&&$APP.kX.self.location){var f=$APP.kX.self.location.protocol;e=f.substr(0,f.length-1)}d=!XG.test(e?e.toLowerCase():"")}c=d}c?(a.dispatchEvent("complete"),a.dispatchEvent("success")):
|
||||||
|
(a.tg=6,a.Qg=a.getStatusText()+" ["+a.getStatus()+"]",QG(a))}finally{RG(a)}}},gH=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},RG=function(a,b){if(a.Of){kH(a);const c=a.Of,d=a.Vg[0]?$APP.sh:null;a.Of=null;a.Vg=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){}}},kH=function(a){a.Of&&a.th&&(a.Of.ontimeout=null);a.Tg&&($APP.kX.clearTimeout(a.Tg),a.Tg=null)},VG=function(a){return a.Of?a.Of.readyState:0},rH=function(a){return a instanceof
|
||||||
|
$APP.ee?$APP.fT($APP.Wh(a)):a},sH=function(a,b){return Ut(b,a)},tH=function(a,b){return function(c){c=$APP.dc.Lf(sH,c,b);return a.g?a.g(c):a.call(null,c)}},JH=function(a){var b=GC(a);return $APP.bk.Lf($APP.bk.Lf(a,vC,rH),wH,function(c){return $APP.K.j(new $APP.O(null,1,5,$APP.P,[b],null),$APP.n(c)?c:$APP.Oc(AH),$APP.Pe([HH]))})},NH=function(a,b){return Rt(b,a)},SH=function(a,b){if($APP.vf(a))return a;if($APP.jf(a))return new $APP.m(null,1,[vu,a],null);if(null==a)return aD(b);switch(a instanceof $APP.ee?
|
||||||
|
a.fb:null){case "transit":return aD(b);case "json":return QH();case "text":return new $APP.m(null,2,[vu,$APP.gg,wu,"text/plain; charset\x3dutf-8"],null);case "raw":return zu(b);case "url":return zu(b);default:return null}},VH=function(a,b){return $APP.xf(a)?$APP.Yb.h($APP.Ck,$APP.Yi.h(function(c){return UH(c,b)},a)):UH(a,b)},vI=function(a){a=$APP.Ai(a);var b=$APP.ce.h(a,WH),c=$APP.ce.h(a,aI),d=$APP.ce.h(a,fI),e=$APP.n(b)?b:$APP.Oc(iI),f=$APP.n(c)?c:$APP.Oc(uI);return function(l){var g=$APP.B.Lf(l,
|
||||||
|
0,null);l=$APP.B.Lf(l,1,null);g=$APP.n(g)?e:f;g.g?g.g(l):g.call(null,l);return $APP.jf(d)?d.s?d.s():d.call(null):null}},LI=function(a,b,c){a=$APP.E.j(c,xI,a,$APP.Pe([vC,b]));a=$APP.Ai(a);var d=$APP.ce.h(a,vC);c=$APP.ce.h(a,qD);b=$APP.ce.h(a,FC);$APP.ce.h(a,$APP.Cz);d=null==$APP.ce.h(a,$APP.FD)&&$APP.Di.h(d,"GET");c=$APP.n($APP.n(c)?c:d)?SH(c,a):null;a=$APP.E.j(a,WH,vI(a),$APP.Pe([qD,c,FC,VH(b,a)]));a=JH(a);a=$APP.Ai(a);b=$APP.ce.h(a,wH);a=$APP.dc.Lf(NH,a,b);b=$APP.Hh(b);c=$APP.Ai(a);c=$APP.ce.h(c,
|
||||||
|
WH);b=$APP.n(c)?tH(c,b):Wt("No ajax handler provided.");c=BI.g(a);c=$APP.n(c)?c:new JG;return Et(c,a,b)},TI=function(a,b){return $APP.n(a)?[$APP.q.g(a),", ",$APP.q.g(b)].join(""):b},WI=function(a){return $APP.n(a)?$APP.dc.Lf(function(b,c){if($APP.n($APP.qi(c)))return b;c=lt(c,": ",2);return $APP.bk.B(b,c[0],TI,c[1])},$APP.Hi,a.split("\r\n")):$APP.Hi};$APP.Xb.prototype.Pf=Ts(17,function(){return new $APP.Xb(this.v,this.G,this.D)});
|
||||||
|
$APP.Me.prototype.Pf=Ts(16,function(){return new $APP.Me(this.Zc,this.G,this.D)});$APP.C.prototype.Pf=Ts(15,function(){return new $APP.C(this.D,this.first,this.Xb,this.count,this.H)});$APP.Eh.prototype.Pf=Ts(14,function(){return new $APP.Eh(this.D)});$APP.Ih.prototype.Pf=Ts(13,function(){return new $APP.Ih(this.D,this.first,this.Xb,this.H)});$APP.O.prototype.Pf=Ts(12,function(){return new $APP.O(this.D,this.F,this.shift,this.root,this.gb,this.H)});
|
||||||
|
$APP.Fk.prototype.Pf=Ts(11,function(){return new $APP.Fk(this.D,this.Sa,this.start,this.end,this.H)});$APP.Nk.prototype.Pf=Ts(10,function(){return new $APP.Nk(this.D,this.count,this.lb,this.nb,this.H)});$APP.m.prototype.Pf=Ts(9,function(){return new $APP.m(this.D,this.F,this.v,this.H)});$APP.Fl.prototype.Pf=Ts(8,function(){return new $APP.Fl(this.D,this.F,this.root,this.Za,this.$a,this.H)});$APP.Xl.prototype.Pf=Ts(7,function(){return new $APP.Xl(this.kb,this.Cb,this.F,this.D,this.H)});
|
||||||
|
$APP.lm.prototype.Pf=Ts(6,function(){return new $APP.lm(this.D,this.Vb,this.H)});$APP.om.prototype.Pf=Ts(5,function(){return new $APP.om(this.D,this.pb,this.H)});$APP.Im.prototype.Pf=Ts(4,function(){return new $APP.Im(this.D,this.start,this.end,this.step,this.Xa,this.Mb,this.H)});$APP.Jm.prototype.Pf=Ts(3,function(){return new $APP.Jm(this.D,this.start,this.end,this.step,this.Xa,this.Mb,this.H)});$APP.wT.prototype.Pf=Ts(2,function(){return new $APP.wT(this.Jb,this.form,this.Nf,this.N,this.H)});
|
||||||
|
$APP.b_.prototype.Pf=Ts(1,function(){return new $APP.b_(this.Ib,this.fd,this.Nf,this.N,this.H)});$APP.K3.prototype.Pf=Ts(0,function(){return new $APP.K3(this.Da,this.deref,this.Oa,this.Pa,this.Qa,this.quote,this.ha,this.Ua,this.Ja,this.Ka,this.La,this.Ca,this.Ga,this.Ea,this.source,this.Na,this.Ia,this.Ha,this.Fa,this.Ma,this.Nf,this.N,this.H)});rt.prototype.next=function(){throw $APP.An;};rt.prototype.Yg=function(){return this};$APP.k=xt.prototype;
|
||||||
|
$APP.k.Fg=function(){zt(this);for(var a=[],b=0;b<this.Yf.length;b++)a.push(this.eg[this.Yf[b]]);return a};$APP.k.ag=function(){zt(this);return this.Yf.concat()};$APP.k.hg=function(a){if(this===a)return!0;if(this.gg!=a.gg)return!1;zt(this);for(var b,c=0;b=this.Yf[c];c++){var d=this.get(b);b=a.get(b);if(d!==b)return!1}return!0};$APP.k.yc=function(){return 0==this.gg};$APP.k.clear=function(){this.eg={};this.Ng=this.gg=this.Yf.length=0};
|
||||||
|
$APP.k.remove=function(a){return wt(this.eg,a)?(delete this.eg[a],this.gg--,this.Ng++,this.Yf.length>2*this.gg&&zt(this),!0):!1};$APP.k.get=function(a,b){return wt(this.eg,a)?this.eg[a]:b};$APP.k.set=function(a,b){wt(this.eg,a)||(this.gg++,this.Yf.push(a),this.Ng++);this.eg[a]=b};$APP.k.addAll=function(a){if(a instanceof xt)for(var b=a.ag(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};
|
||||||
|
$APP.k.forEach=function(a,b){for(var c=this.ag(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};$APP.k.clone=function(){return new xt(this)};$APP.k.Yg=function(a){zt(this);var b=0,c=this.Ng,d=this,e=new rt;e.next=function(){if(c!=d.Ng)throw Error("The map has changed since the iterator was created");if(b>=d.Yf.length)throw $APP.An;var f=d.Yf[b++];return a?f:d.eg[f]};return e};
|
||||||
|
var WG=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,XI=new $APP.x(null,"ajax.core","ajax.core",-1363316958,null),wu=new $APP.ee(null,"content-type","content-type",-508222634),ZI=new $APP.x(null,"uri","uri",865819680,null),rD=new $APP.ee(null,"headers","headers",-835030129),oB=new $APP.ee(null,"handlers","handlers",79528781),eC=new $APP.ee(null,"description","description",-1428560544),$I=new $APP.x(null,"POST","POST",1750988384,
|
||||||
|
null),bJ=new $APP.ee(null,"parse-error","parse-error",255902478),dJ=new $APP.ee(null,"exception","exception",-335277064),eJ=new $APP.ee(null,"prefix","prefix",-265908465),xC=new $APP.ee(null,"url-params","url-params",-697567619),fJ=new $APP.ee(null,"keywords?","keywords?",764949733),qD=new $APP.ee(null,"format","format",-1306924766),uu=new $APP.ee(null,"vec-strategy","vec-strategy",1843221372),hJ=new $APP.x(null,"GET","GET",-917844743,null),WH=new $APP.ee(null,"handler","handler",-195596612),kJ=new $APP.ee(null,
|
||||||
|
"failure","failure",720415879),lJ=new $APP.ee(null,"with-credentials","with-credentials",-1163127235),mJ=new $APP.ee(null,"request-received","request-received",2110590540),BI=new $APP.ee(null,"api","api",-899839580),lB=new $APP.ee(null,"json","json",1279968570),oJ=new $APP.ee(null,"response","response",-1068424192),aI=new $APP.ee(null,"error-handler","error-handler",-484945776),QC=new $APP.ee(null,"json-verbose","json-verbose",-542533531),JC=new $APP.ee(null,"writer","writer",-277568236),FC=new $APP.ee(null,
|
||||||
|
"response-format","response-format",1664465322),pJ=new $APP.ee(null,"timeout","timeout",-318625318),sJ=new $APP.ee(null,"original-text","original-text",744448452),vC=new $APP.ee(null,"method","method",55703592),vu=new $APP.ee(null,"write","write",-1857649168),uJ=new $APP.ee(null,"status-text","status-text",-1834235478),fI=new $APP.ee(null,"finally","finally",1589088705),yJ=new $APP.x("ajax.core","GET","ajax.core/GET",-580027892,null),zJ=new $APP.ee(null,"raw","raw",1604651272),wH=new $APP.ee(null,
|
||||||
|
"interceptors","interceptors",-1546782951),bD=new $APP.ee(null,"reader","reader",169660853),AJ=new $APP.ee(null,"failed","failed",-1397425762),BJ=new $APP.x("ajax.core","POST","ajax.core/POST",1572763855,null),CJ=new $APP.ee(null,"not-initialized","not-initialized",-1937378906),$B=new $APP.ee(null,"read","read",1140058661),xI=new $APP.ee(null,"uri","uri",-774711847),lu=new $APP.ee(null,"java","java",1958249105),EJ=new $APP.ee(null,"processing-request","processing-request",-264947221),HJ=new $APP.ee(null,
|
||||||
|
"aborted","aborted",1775972619),JJ=new $APP.ee(null,"connection-established","connection-established",-1403749733),KJ=new $APP.ee(null,"progress-handler","progress-handler",333585589),NJ=new $APP.ee(null,"response-ready","response-ready",245208276);var QJ=new $APP.lm(null,new $APP.m(null,7,[206,null,204,null,304,null,1223,null,201,null,202,null,200,null],null),null);var au=encodeURIComponent,pu=function pu(a,b,c){var e=$APP.B.Lf(c,0,null);c=$APP.B.Lf(c,1,null);var f=Zt(e);b=$APP.n(b)?$APP.n(e)?[$APP.q.g(b),"[",$APP.q.g(f),"]"].join(""):b:f;e=$APP.hj.Lf(pu,a,b);return"string"===typeof c?new $APP.O(null,1,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[b,c],null)],null):c instanceof $APP.ee?new $APP.O(null,1,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[b,$APP.Wh(c)],null)],null):$APP.vf(c)?$APP.Oj.j(e,$APP.Pe([$APP.z(c)])):$APP.tf(c)||$APP.rf(c)?$APP.Oj.j(e,$APP.Pe([$APP.jj.h(a,
|
||||||
|
$APP.z(c))])):new $APP.O(null,1,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[b,c],null)],null)};var Tu="undefined"!=typeof Object.keys?function(a){return Object.keys(a)}:function(a){return $APP.xa(a)},Ou="undefined"!=typeof Array.isArray?function(a){return Array.isArray(a)}:function(a){return"array"===$APP.pa(a)};Lu.prototype.write=function(a,b){return Ju(a,b)?(4096===this.Sh?(this.clear(),this.Eg=0,this.cache={}):1936===this.Vf&&this.clear(),b=this.cache[a],null==b?(this.cache[a]=[Ku(this.Vf),this.Eg],this.Vf++,a):b[1]!=this.Eg?(b[1]=this.Eg,b[0]=Ku(this.Vf),this.Vf++,a):b[0]):a};Lu.prototype.clear=function(){this.Vf=0;this.Eg++};Mu.prototype.write=function(a){1936==this.Vf&&(this.Vf=0);this.cache[this.Vf]=a;this.Vf++;return a};
|
||||||
|
Mu.prototype.read=function(a){return this.cache[2===a.length?a.charCodeAt(1)-48:44*(a.charCodeAt(1)-48)+(a.charCodeAt(2)-48)]};Mu.prototype.clear=function(){this.Vf=0};var uy=1,my={},ry=0;var RJ="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";vy.prototype.toString=function(){return"[TaggedValue: "+this.tag+", "+this.rep+"]"};vy.prototype.equiv=function(a){return Ru(this,a)};vy.prototype.equiv=vy.prototype.equiv;vy.prototype.$f=function(a){return a instanceof vy?this.tag===a.tag&&Ru(this.rep,a.rep):!1};vy.prototype.cg=function(){-1===this.Tf&&(this.Tf=Vu(Zx(this.tag),Zx(this.rep)));return this.Tf};var WJ=Dt("9007199254740991"),$J=Dt("-9007199254740991");
|
||||||
|
$APP.vh.prototype.equiv=function(a){return Ru(this,a)};$APP.vh.prototype.equiv=$APP.vh.prototype.equiv;$APP.vh.prototype.$f=function(a){return a instanceof $APP.vh&&this.hg(a)};$APP.vh.prototype.cg=function(){return this.Uf};yy.prototype.toString=function(){return":"+this.Wf};yy.prototype.namespace=function(){var a=this.Wf.indexOf("/");return-1!=a?this.Wf.substring(0,a):null};yy.prototype.name=function(){var a=this.Wf.indexOf("/");return-1!=a?this.Wf.substring(a+1,this.Wf.length):this.Wf};
|
||||||
|
yy.prototype.equiv=function(a){return Ru(this,a)};yy.prototype.equiv=yy.prototype.equiv;yy.prototype.$f=function(a){return a instanceof yy&&this.Wf==a.Wf};yy.prototype.cg=function(){-1===this.Tf&&(this.Tf=Zx(this.Wf));return this.Tf};Ay.prototype.namespace=function(){var a=this.Wf.indexOf("/");return-1!=a?this.Wf.substring(0,a):null};Ay.prototype.name=function(){var a=this.Wf.indexOf("/");return-1!=a?this.Wf.substring(a+1,this.Wf.length):this.Wf};Ay.prototype.toString=function(){return this.Wf};
|
||||||
|
Ay.prototype.equiv=function(a){return Ru(this,a)};Ay.prototype.equiv=Ay.prototype.equiv;Ay.prototype.$f=function(a){return a instanceof Ay&&this.Wf==a.Wf};Ay.prototype.cg=function(){-1===this.Tf&&(this.Tf=Zx(this.Wf));return this.Tf};Fy.prototype.toString=function(){var a=this.high,b=this.low;var c=Ey(a,0,4)+"-";c+=Ey(a,4,6)+"-";c+=Ey(a,6,8)+"-";c+=Ey(b,0,2)+"-";return c+=Ey(b,2,8)};Fy.prototype.equiv=function(a){return Ru(this,a)};Fy.prototype.equiv=Fy.prototype.equiv;
|
||||||
|
Fy.prototype.$f=function(a){return a instanceof Fy&&this.high.hg(a.high)&&this.low.hg(a.low)};Fy.prototype.cg=function(){-1===this.Tf&&(this.Tf=Zx(this.toString()));return this.Tf};Date.prototype.$f=function(a){return a instanceof Date?this.valueOf()===a.valueOf():!1};Date.prototype.cg=function(){return this.valueOf()};
|
||||||
|
Gy.prototype.next=function(){if(this.Vf<this.entries.length){var a={value:0===this.type?this.entries[this.Vf]:1===this.type?this.entries[this.Vf+1]:[this.entries[this.Vf],this.entries[this.Vf+1]],done:!1};this.Vf+=2;return a}return{value:null,done:!0}};Gy.prototype.next=Gy.prototype.next;Gy.prototype[RJ]=function(){return this};
|
||||||
|
Jy.prototype.next=function(){if(this.Vf<this.map.size){null!=this.mg&&this.kg<this.mg.length||(this.mg=this.map.map[this.keys[this.Vf]],this.kg=0);var a={value:0===this.type?this.mg[this.kg]:1===this.type?this.mg[this.kg+1]:[this.mg[this.kg],this.mg[this.kg+1]],done:!1};this.Vf++;this.kg+=2;return a}return{value:null,done:!0}};Jy.prototype.next=Jy.prototype.next;Jy.prototype[RJ]=function(){return this};My.prototype.toString=function(){return Zy(this)};My.prototype.inspect=function(){return this.toString()};
|
||||||
|
My.prototype.clear=function(){this.Tf=-1;this.Rf?this.Rf.clear():this.Sf=[];this.size=0};My.prototype.clear=My.prototype.clear;My.prototype.keys=function(){return this.Rf?this.Rf.keys():new Gy(this.Sf,0)};My.prototype.keys=My.prototype.keys;My.prototype.pg=function(){if(this.Rf)return this.Rf.pg();for(var a=[],b=0,c=0;c<this.Sf.length;b++,c+=2)a[b]=this.Sf[c];return a};My.prototype.keySet=My.prototype.pg;My.prototype.entries=function(){return this.Rf?this.Rf.entries():new Gy(this.Sf,2)};
|
||||||
|
My.prototype.entries=My.prototype.entries;My.prototype.values=function(){return this.Rf?this.Rf.values():new Gy(this.Sf,1)};My.prototype.values=My.prototype.values;My.prototype.forEach=function(a){if(this.Rf)this.Rf.forEach(a);else for(var b=0;b<this.Sf.length;b+=2)a(this.Sf[b+1],this.Sf[b])};My.prototype.forEach=My.prototype.forEach;
|
||||||
|
My.prototype.get=function(a,b){if(this.Rf)return this.Rf.get(a);if(fz(this))return this.get(a);for(var c=0;c<this.Sf.length;c+=2)if(Ru(this.Sf[c],a))return this.Sf[c+1];return b};My.prototype.get=My.prototype.get;My.prototype.has=function(a){if(this.Rf)return this.Rf.has(a);if(fz(this))return this.has(a);for(var b=0;b<this.Sf.length;b+=2)if(Ru(this.Sf[b],a))return!0;return!1};My.prototype.has=My.prototype.has;
|
||||||
|
My.prototype.set=function(a,b){this.Tf=-1;if(this.Rf)this.Rf.set(a,b),this.size=this.Rf.size;else{for(var c=0;c<this.Sf.length;c+=2)if(Ru(this.Sf[c],a)){this.Sf[c+1]=b;return}this.Sf.push(a);this.Sf.push(b);this.size++;32<this.size&&(this.Rf=bz(this.Sf,!1,!0),this.Sf=null)}};My.prototype.set=My.prototype.set;
|
||||||
|
My.prototype["delete"]=function(a){this.Tf=-1;if(this.Rf)return a=this.Rf.delete(a),this.size=this.Rf.size,a;for(var b=0;b<this.Sf.length;b+=2)if(Ru(this.Sf[b],a))return a=this.Sf[b+1],this.Sf.splice(b,2),this.size--,a};My.prototype.clone=function(){var a=bz();this.forEach(function(b,c){a.set(c,b)});return a};My.prototype.clone=My.prototype.clone;My.prototype[RJ]=function(){return this.entries()};My.prototype.cg=function(){if(this.Rf)return this.Rf.cg();-1===this.Tf&&(this.Tf=cy(this));return this.Tf};
|
||||||
|
My.prototype.$f=function(a){return this.Rf?Sy(this.Rf,a):Sy(this,a)};Ly.prototype.toString=function(){return Zy(this)};Ly.prototype.inspect=function(){return this.toString()};Ly.prototype.clear=function(){this.Tf=-1;this.map={};this.rg=[];this.size=0};Ly.prototype.clear=Ly.prototype.clear;Ly.prototype.ag=function(){return null!=this.rg?this.rg:Tu(this.map)};
|
||||||
|
Ly.prototype["delete"]=function(a){this.Tf=-1;this.rg=null;for(var b=Zx(a),c=this.map[b],d=0;d<c.length;d+=2)if(Ru(a,c[d]))return a=c[d+1],c.splice(d,2),0===c.length&&delete this.map[b],this.size--,a};Ly.prototype.entries=function(){return new Jy(this,2)};Ly.prototype.entries=Ly.prototype.entries;Ly.prototype.forEach=function(a){for(var b=this.ag(),c=0;c<b.length;c++)for(var d=this.map[b[c]],e=0;e<d.length;e+=2)a(d[e+1],d[e],this)};Ly.prototype.forEach=Ly.prototype.forEach;
|
||||||
|
Ly.prototype.get=function(a,b){var c=Zx(a);c=this.map[c];if(null!=c)for(b=0;b<c.length;b+=2){if(Ru(a,c[b]))return c[b+1]}else return b};Ly.prototype.get=Ly.prototype.get;Ly.prototype.has=function(a){var b=Zx(a);b=this.map[b];if(null!=b)for(var c=0;c<b.length;c+=2)if(Ru(a,b[c]))return!0;return!1};Ly.prototype.has=Ly.prototype.has;Ly.prototype.keys=function(){return new Jy(this,0)};Ly.prototype.keys=Ly.prototype.keys;
|
||||||
|
Ly.prototype.pg=function(){for(var a=this.ag(),b=[],c=0;c<a.length;c++)for(var d=this.map[a[c]],e=0;e<d.length;e+=2)b.push(d[e]);return b};Ly.prototype.keySet=Ly.prototype.pg;Ly.prototype.set=function(a,b){this.Tf=-1;var c=Zx(a),d=this.map[c];if(null==d)this.rg&&this.rg.push(c),this.map[c]=[a,b],this.size++;else{c=!0;for(var e=0;e<d.length;e+=2)if(Ru(b,d[e])){c=!1;d[e]=b;break}c&&(d.push(a),d.push(b),this.size++)}};Ly.prototype.set=Ly.prototype.set;
|
||||||
|
Ly.prototype.values=function(){return new Jy(this,1)};Ly.prototype.values=Ly.prototype.values;Ly.prototype.clone=function(){var a=bz();this.forEach(function(b,c){a.set(c,b)});return a};Ly.prototype.clone=Ly.prototype.clone;Ly.prototype[RJ]=function(){return this.entries()};Ly.prototype.cg=function(){-1===this.Tf&&(this.Tf=cy(this));return this.Tf};Ly.prototype.$f=function(a){return Sy(this,a)};gz.prototype.toString=function(){return $y(this)};gz.prototype.inspect=function(){return this.toString()};
|
||||||
|
gz.prototype.add=function(a){this.map.set(a,a);this.size=this.map.size};gz.prototype.add=gz.prototype.add;gz.prototype.clear=function(){this.map=new Ly;this.size=0};gz.prototype.clear=gz.prototype.clear;gz.prototype["delete"]=function(a){a=this.map.delete(a);this.size=this.map.size;return a};gz.prototype.entries=function(){return this.map.entries()};gz.prototype.entries=gz.prototype.entries;gz.prototype.forEach=function(a){var b=this;this.map.forEach(function(c,d){a(d,b)})};gz.prototype.forEach=gz.prototype.forEach;
|
||||||
|
gz.prototype.has=function(a){return this.map.has(a)};gz.prototype.has=gz.prototype.has;gz.prototype.keys=function(){return this.map.keys()};gz.prototype.keys=gz.prototype.keys;gz.prototype.pg=function(){return this.map.pg()};gz.prototype.keySet=gz.prototype.pg;gz.prototype.values=function(){return this.map.values()};gz.prototype.values=gz.prototype.values;gz.prototype.clone=function(){var a=hz();this.forEach(function(b){a.add(b)});return a};gz.prototype.clone=gz.prototype.clone;gz.prototype[RJ]=function(){return this.values()};
|
||||||
|
gz.prototype.$f=function(a){if(a instanceof gz){if(this.size===a.size)return Ru(this.map,a.map)}else return!1};gz.prototype.cg=function(){return Zx(this.map)};kz.prototype.zg={Xf:{_:function(){return null},"?":function(a){return"t"===a},b:function(a,b){if(b&&!1===b.rh||"undefined"==typeof $APP.kX.Xg)if("undefined"!=typeof Uint8Array){if("undefined"!=typeof atob)var c=atob(a);else{a=String(a).replace(/=+$/,"");if(1==a.length%4)throw Error("'atob' failed: The string to be decoded is not correctly encoded.");b=0;for(var d,e=0,f="";d=a.charAt(e++);~d&&(c=b%4?64*c+d:d,b++%4)?f+=String.fromCharCode(255&c>>(-2*b&6)):0)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".indexOf(d);
|
||||||
|
c=f}a=c.length;b=new Uint8Array(a);for(d=0;d<a;d++)b[d]=c.charCodeAt(d);c=b}else c=xy("b",a);else c=new $APP.kX.Xg(a,"base64");return c},i:function(a){"number"===typeof a||a instanceof $APP.vh||(a=Dt(a,10),a=0<a.compare(WJ)||0>a.compare($J)?a:$APP.Ph(a));return a},n:function(a){return xy("n",a)},d:function(a){return parseFloat(a)},f:function(a){return xy("f",a)},c:function(a){return a},":":function(a){return new yy(a)},$:function(a){return new Ay(a)},r:function(a){return xy("r",a)},z:function(a){a:switch(a){case "-INF":a=
|
||||||
|
-Infinity;break a;case "INF":a=Infinity;break a;case "NaN":a=NaN;break a;default:throw Error("Invalid special double value "+a);}return a},"'":function(a){return a},m:function(a){a="number"===typeof a?a:parseInt(a,10);return new Date(a)},t:function(a){return new Date(a)},u:function(a){a=a.replace(/-/g,"");var b,c;var d=b=0;for(c=24;8>d;d+=2,c-=8)b|=parseInt(a.substring(d,d+2),16)<<c;var e=0;d=8;for(c=24;16>d;d+=2,c-=8)e|=parseInt(a.substring(d,d+2),16)<<c;var f=$APP.yh(e,b);b=0;d=16;for(c=24;24>d;d+=
|
||||||
|
2,c-=8)b|=parseInt(a.substring(d,d+2),16)<<c;e=0;for(c=d=24;32>d;d+=2,c-=8)e|=parseInt(a.substring(d,d+2),16)<<c;return new Fy(f,$APP.yh(e,b))},set:function(a){return hz(a)},list:function(a){return xy("list",a)},link:function(a){return xy("link",a)},cmap:function(a){return bz(a,!1)}},ih:function(a,b){return xy(a,b)},Rg:!0,rh:!0};
|
||||||
|
kz.prototype.decode=function(a,b,c,d){if(null==a)return null;switch(typeof a){case "string":return Ju(a,c)?(a=xz(this,a),b&&b.write(a,c),b=a):b="^"===a.charAt(0)&&" "!==a.charAt(1)?b.read(a,c):xz(this,a),b;case "object":if(Ou(a))if("^ "===a[0])if(this.bg)if(17>a.length&&this.bg.fromArray){d=[];for(c=1;c<a.length;c+=2)d.push(this.decode(a[c],b,!0,!1)),d.push(this.decode(a[c+1],b,!1,!1));b=this.bg.fromArray(d,a)}else{d=this.bg.init(a);for(c=1;c<a.length;c+=2)d=this.bg.add(d,this.decode(a[c],b,!0,!1),
|
||||||
|
this.decode(a[c+1],b,!1,!1),a);b=this.bg.finalize(d,a)}else{d=[];for(c=1;c<a.length;c+=2)d.push(this.decode(a[c],b,!0,!1)),d.push(this.decode(a[c+1],b,!1,!1));b=bz(d,!1)}else b=tz(this,a,b,c,d);else{c=Tu(a);var e=c[0];if((d=1==c.length?this.decode(e,b,!1,!1):null)&&d instanceof jz)a=a[e],c=this.Xf[d.Kb],b=null!=c?c(this.decode(a,b,!1,!0),this):xy(d.Kb,this.decode(a,b,!1,!1));else if(this.bg)if(16>c.length&&this.bg.fromArray){var f=[];for(d=0;d<c.length;d++)e=c[d],f.push(this.decode(e,b,!0,!1)),f.push(this.decode(a[e],
|
||||||
|
b,!1,!1));b=this.bg.fromArray(f,a)}else{f=this.bg.init(a);for(d=0;d<c.length;d++)e=c[d],f=this.bg.add(f,this.decode(e,b,!0,!1),this.decode(a[e],b,!1,!1),a);b=this.bg.finalize(f,a)}else{f=[];for(d=0;d<c.length;d++)e=c[d],f.push(this.decode(e,b,!0,!1)),f.push(this.decode(a[e],b,!1,!1));b=bz(f,!1)}}return b}return a};kz.prototype.decode=kz.prototype.decode;Az.prototype.read=function(a){var b=this.cache;a=this.Zh.Uh.decode(JSON.parse(a),b);this.cache.clear();return a};Az.prototype.read=Az.prototype.read;var Hz=0,aK=(8|3&Math.round(14*Math.random())).toString(16),Bz="transit$guid$"+(Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+"-"+Eu()+Eu()+Eu()+Eu()+"-4"+Eu()+Eu()+Eu()+"-"+aK+Eu()+Eu()+Eu()+"-"+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu()+Eu());Lz.prototype.tag=function(){return"_"};Lz.prototype.rep=function(){return null};Lz.prototype.stringRep=function(){return"null"};Nz.prototype.tag=function(){return"s"};Nz.prototype.rep=function(a){return a};Nz.prototype.stringRep=function(a){return a};
|
||||||
|
Sz.prototype.tag=function(){return"i"};Sz.prototype.rep=function(a){return a};Sz.prototype.stringRep=function(a){return a.toString()};Vz.prototype.tag=function(){return"i"};Vz.prototype.rep=function(a){return a.toString()};Vz.prototype.stringRep=function(a){return a.toString()};Wz.prototype.tag=function(){return"?"};Wz.prototype.rep=function(a){return a};Wz.prototype.stringRep=function(a){return a.toString()};Yz.prototype.tag=function(){return"array"};Yz.prototype.rep=function(a){return a};
|
||||||
|
Yz.prototype.stringRep=function(){return null};aA.prototype.tag=function(){return"map"};aA.prototype.rep=function(a){return a};aA.prototype.stringRep=function(){return null};eA.prototype.tag=function(){return"t"};eA.prototype.rep=function(a){return a.getUTCFullYear()+"-"+Kz(a.getUTCMonth()+1,2)+"-"+Kz(a.getUTCDate(),2)+"T"+Kz(a.getUTCHours(),2)+":"+Kz(a.getUTCMinutes(),2)+":"+Kz(a.getUTCSeconds(),2)+"."+Kz(a.getUTCMilliseconds(),3)+"Z"};eA.prototype.stringRep=function(a,b){return b.rep(a)};
|
||||||
|
hA.prototype.tag=function(){return"m"};hA.prototype.rep=function(a){return a.valueOf()};hA.prototype.stringRep=function(a){return a.valueOf().toString()};hA.prototype.getVerboseHandler=function(){return new eA};iA.prototype.tag=function(){return"u"};iA.prototype.rep=function(a){return a.toString()};iA.prototype.stringRep=function(a){return a.toString()};jA.prototype.tag=function(){return":"};jA.prototype.rep=function(a){return a.Wf};jA.prototype.stringRep=function(a,b){return b.rep(a)};
|
||||||
|
kA.prototype.tag=function(){return"$"};kA.prototype.rep=function(a){return a.Wf};kA.prototype.stringRep=function(a,b){return b.rep(a)};lA.prototype.tag=function(a){return a.tag};lA.prototype.rep=function(a){return a.rep};lA.prototype.stringRep=function(){return null};nA.prototype.tag=function(){return"set"};nA.prototype.rep=function(a){var b=[];a.forEach(function(c){b.push(c)});return xy("array",b)};nA.prototype.stringRep=function(){return null};qA.prototype.tag=function(){return"map"};
|
||||||
|
qA.prototype.rep=function(a){return a};qA.prototype.stringRep=function(){return null};wA.prototype.tag=function(){return"map"};wA.prototype.rep=function(a){return a};wA.prototype.stringRep=function(){return null};xA.prototype.tag=function(){return"b"};xA.prototype.rep=function(a){return a.toString("base64")};xA.prototype.stringRep=function(){return null};yA.prototype.tag=function(){return"b"};
|
||||||
|
yA.prototype.rep=function(a){for(var b,c=0,d=a.length,e="",f;c<d;)f=a.subarray(c,Math.min(c+32768,d)),e+=String.fromCharCode.apply(null,f),c+=32768;if("undefined"!=typeof btoa)b=btoa(e);else{a=String(e);d=0;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d";for(f="";a.charAt(d|0)||(e="\x3d",d%1);f+=e.charAt(63&b>>8-d%1*8)){c=a.charCodeAt(d+=.75);if(255<c)throw Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");b=b<<8|c}b=f}return b};
|
||||||
|
yA.prototype.stringRep=function(){return null};BA.prototype.get=function(a){a="string"===typeof a?this.Xf[a]:this.Xf[Jz(a)];return null!=a?a:this.Xf["default"]};BA.prototype.get=BA.prototype.get;BA.prototype.set=function(a,b){var c;if(c="string"===typeof a)a:{switch(a){case "null":case "string":case "boolean":case "number":case "array":case "map":c=!1;break a}c=!0}c?this.Xf[a]=b:this.Xf[Jz(a)]=b};FA.prototype.lg=function(a){var b=this.Xf.get(null==a?null:a.constructor);return null!=b?b:(a=a&&a.transitTag)?this.Xf.get(a):null};WA.prototype.Vh=function(){return this.wg};WA.prototype.marshaller=WA.prototype.Vh;
|
||||||
|
WA.prototype.write=function(a,b){var c=b||{};b=c.asMapKey||!1;var d=this.wg.Mg?!1:this.cache;if(!1===c.marshalTop)a=IA(this.wg,a,b,d);else{c=this.wg;var e=JSON,f=e.stringify,l=IA;var g=c.lg(a)||(c.Gg?c.Gg(a,c.Xf):null);if(null!=g)a=1===g.tag(a).length?xy("'",a):a;else throw b=(null==a?null:a.constructor).name,d=Error("Cannot write "+b),d.data={ph:a,type:b},d;a=f.call(e,l(c,a,b,d))}null!=this.cache&&this.cache.clear();return a};WA.prototype.write=WA.prototype.write;
|
||||||
|
WA.prototype.register=function(a,b){this.wg.Xf.set(a,b)};WA.prototype.register=WA.prototype.register;$APP.No.prototype.W=function(a,b){return b instanceof $APP.No?this.nc===b.nc:b instanceof Fy?this.nc===b.toString():!1};$APP.No.prototype.ac=$APP.Ua;$APP.No.prototype.Eb=function(a,b){if(b instanceof $APP.No||b instanceof Fy)return $APP.Uf(this.toString(),b.toString());throw Error(["Cannot compare ",$APP.q.g(this)," to ",$APP.q.g(b)].join(""));};Fy.prototype.ac=$APP.Ua;
|
||||||
|
Fy.prototype.Eb=function(a,b){if(b instanceof $APP.No||b instanceof Fy)return $APP.Uf(this.toString(),b.toString());throw Error(["Cannot compare ",$APP.q.g(this)," to ",$APP.q.g(b)].join(""));};$APP.vh.prototype.W=function(a,b){return this.equiv(b)};Fy.prototype.W=function(a,b){return b instanceof $APP.No?b.W(null,this):this.equiv(b)};vy.prototype.W=function(a,b){return this.equiv(b)};$APP.vh.prototype.Ne=$APP.Ua;$APP.vh.prototype.X=function(){return Zx(this)};Fy.prototype.Ne=$APP.Ua;
|
||||||
|
Fy.prototype.X=function(){return $APP.Zd(this.toString())};vy.prototype.Ne=$APP.Ua;vy.prototype.X=function(){return Zx(this)};Fy.prototype.ba=$APP.Ua;Fy.prototype.O=function(a,b){return $APP.od(b,['#uuid "',$APP.q.g(this.toString()),'"'].join(""))};fB.prototype.init=function(){return $APP.vd($APP.Hi)};fB.prototype.add=function(a,b,c){return $APP.si.Lf(a,b,c)};fB.prototype.finalize=function(a){return $APP.xd(a)};
|
||||||
|
fB.prototype.fromArray=function(a){return $APP.$i.Lf?$APP.$i.Lf(a,!0,!0):$APP.$i.call(null,a,!0,!0)};hB.prototype.init=function(){return $APP.vd($APP.$e)};hB.prototype.add=function(a,b){return $APP.ri.h(a,b)};hB.prototype.finalize=function(a){return $APP.xd(a)};hB.prototype.fromArray=function(a){return $APP.yk.h?$APP.yk.h(a,!0):$APP.yk.call(null,a,!0)};qB.prototype.tag=function(){return":"};qB.prototype.rep=function(a){return a.fb};qB.prototype.stringRep=function(a){return a.fb};
|
||||||
|
rB.prototype.tag=function(){return"$"};rB.prototype.rep=function(a){return a.Kb};rB.prototype.stringRep=function(a){return a.Kb};sB.prototype.tag=function(){return"list"};sB.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.yf(c)?(a=$APP.Dd(c),e=$APP.Ed(c),c=a,d=$APP.Je(a),a=e):(a=$APP.r(c),b.push(a),a=$APP.t(c),c=null,d=0),e=0;else break;return xy("array",b)};sB.prototype.stringRep=function(){return null};
|
||||||
|
uB.prototype.tag=function(){return"map"};uB.prototype.rep=function(a){return a};uB.prototype.stringRep=function(){return null};wB.prototype.tag=function(){return"set"};wB.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.yf(c)?(a=$APP.Dd(c),e=$APP.Ed(c),c=a,d=$APP.Je(a),a=e):(a=$APP.r(c),b.push(a),a=$APP.t(c),c=null,d=0),e=0;else break;return xy("array",b)};wB.prototype.stringRep=function(){return null};
|
||||||
|
xB.prototype.tag=function(){return"array"};xB.prototype.rep=function(a){var b=[];a=$APP.z(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);b.push(f);e+=1}else if(a=$APP.z(a))c=a,$APP.yf(c)?(a=$APP.Dd(c),e=$APP.Ed(c),c=a,d=$APP.Je(a),a=e):(a=$APP.r(c),b.push(a),a=$APP.t(c),c=null,d=0),e=0;else break;return b};xB.prototype.stringRep=function(){return null};BB.prototype.tag=function(){return"u"};BB.prototype.rep=function(a){return a.nc};BB.prototype.stringRep=function(a){return this.rep(a)};
|
||||||
|
HB.prototype.tag=function(){return"with-meta"};HB.prototype.rep=function(a){return xy("array",[a.value,a.D])};HB.prototype.stringRep=function(){return null};var bK=function bK(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return bK.j(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.Xb(c.slice(3),0,null):null)};bK.j=function(a,b,c,d){return new $APP.O(null,2,5,$APP.P,[!1,$APP.dc.Lf($APP.Ze,new $APP.m(null,3,[$APP.En,a,uJ,b,kJ,c],null),$APP.Yi.h($APP.ag,$APP.Xj.h(2,d)))],null)};bK.o=3;bK.Mf=function(a){var b=$APP.r(a),c=$APP.t(a);a=$APP.r(c);var d=$APP.t(c);c=$APP.r(d);d=$APP.t(d);return this.j(b,a,c,d)};
|
||||||
|
$APP.k=VB.prototype;$APP.k.Ba=function(a,b){return this.P(null,b,null)};$APP.k.P=function(a,b,c){switch(b instanceof $APP.ee?b.fb:null){case "read":return this.read;case "description":return this.description;case "content-type":return this.dg;default:return $APP.ce.Lf(this.N,b,c)}};$APP.k.Pb=function(a,b,c){return $APP.dc.Lf(function(d,e){var f=$APP.B.Lf(e,0,null);e=$APP.B.Lf(e,1,null);return b.Lf?b.Lf(d,f,e):b.call(null,d,f,e)},c,this)};
|
||||||
|
$APP.k.xg=function(a,b){a=$APP.Ai(a);$APP.ce.h(a,wu);a=$APP.Ai(this);var c=$APP.ce.h(a,wu);return $APP.bk.Lf(b,rD,function(d){return $APP.em.j($APP.Pe([new $APP.m(null,1,["Accept",RB(c)],null),$APP.n(d)?d:$APP.Hi]))})};
|
||||||
|
$APP.k.yg=function(a,b){a=$APP.Ai(a);$APP.ce.h(a,$B);a=$APP.Ai(this);var c=$APP.ce.h(a,$B);try{var d=Ht(b),e=$APP.hj.h(bK,d);switch(d){case 0:return e("Request failed.",AJ);case -1:return $APP.n(Qt(b))?e("Request aborted by client.",HJ):e("Request timed out.",pJ);case 204:return new $APP.O(null,2,5,$APP.P,[!0,null],null);case 205:return new $APP.O(null,2,5,$APP.P,[!0,null],null);default:try{var f=c.g?c.g(b):c.call(null,b);return $APP.H(QJ,d)?new $APP.O(null,2,5,$APP.P,[!0,f],null):e(Kt(b),$APP.Jn,
|
||||||
|
oJ,f)}catch(G){if(G instanceof Object){f=G;e=$APP.P;var l=$APP.Ai(a),g=$APP.ce.h(l,eC),p=new $APP.m(null,3,[$APP.En,d,kJ,$APP.Jn,oJ,null],null),w=[$APP.q.g(f.message)," Format should have been ",$APP.q.g(g)].join(""),A=$APP.E.j(p,uJ,w,$APP.Pe([kJ,$APP.zr,sJ,Ot(b)]));var D=$APP.H(QJ,d)?A:$APP.E.j(p,uJ,Kt(b),$APP.Pe([bJ,A]));return new $APP.O(null,2,5,e,[!1,D],null)}throw G;}}}catch(G){if(G instanceof Object)return f=G,bK.j(0,f.message,dJ,$APP.Pe([dJ,f]));throw G;}};
|
||||||
|
$APP.k.O=function(a,b,c){return $APP.Zm(b,function(d){return $APP.Zm(b,$APP.gn,""," ","",c,d)},"#ajax.interceptors.ResponseFormat{",", ","}",c,$APP.K.h(new $APP.O(null,3,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[$B,this.read],null),new $APP.O(null,2,5,$APP.P,[eC,this.description],null),new $APP.O(null,2,5,$APP.P,[wu,this.dg],null)],null),this.N))};$APP.k.cb=function(){return new $APP.Sk(this,3,new $APP.O(null,3,5,$APP.P,[$B,eC,wu],null),$APP.n(this.N)?$APP.Pd(this.N):$APP.Fi())};$APP.k.T=function(){return this.Nf};
|
||||||
|
$APP.k.Pf=function(){return new VB(this.read,this.description,this.dg,this.Nf,this.N,this.H)};$APP.k.aa=function(){return 3+$APP.Je(this.N)};$APP.k.X=function(){var a=this.H;return null!=a?a:this.H=a=-2103965186^$APP.pe(this)};$APP.k.W=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.fe.h(this.read,b.read)&&$APP.fe.h(this.description,b.description)&&$APP.fe.h(this.dg,b.dg)&&$APP.fe.h(this.N,b.N)};
|
||||||
|
$APP.k.hc=function(a,b){return $APP.H(new $APP.lm(null,new $APP.m(null,3,[eC,null,$B,null,wu,null],null),null),b)?$APP.hf.h($APP.Sc($APP.Uj.h($APP.Hi,this),this.Nf),b):new VB(this.read,this.description,this.dg,this.Nf,$APP.Ei($APP.hf.h(this.N,b)),null)};$APP.k.Gb=function(a,b){switch(b instanceof $APP.ee?b.fb:null){case "read":case "description":case "content-type":return!0;default:return $APP.H(this.N,b)}};
|
||||||
|
$APP.k.bb=function(a,b,c){return $APP.n($APP.Lh.h?$APP.Lh.h($B,b):$APP.Lh.call(null,$B,b))?new VB(c,this.description,this.dg,this.Nf,this.N,null):$APP.n($APP.Lh.h?$APP.Lh.h(eC,b):$APP.Lh.call(null,eC,b))?new VB(this.read,c,this.dg,this.Nf,this.N,null):$APP.n($APP.Lh.h?$APP.Lh.h(wu,b):$APP.Lh.call(null,wu,b))?new VB(this.read,this.description,c,this.Nf,this.N,null):new VB(this.read,this.description,this.dg,this.Nf,$APP.E.Lf(this.N,b,c),null)};
|
||||||
|
$APP.k.V=function(){return $APP.z($APP.K.h(new $APP.O(null,3,5,$APP.P,[new $APP.Rf($B,this.read,null),new $APP.Rf(eC,this.description,null),new $APP.Rf(wu,this.dg,null)],null),this.N))};$APP.k.Z=function(a,b){return new VB(this.read,this.description,this.dg,b,this.N,this.H)};$APP.k.da=function(a,b){return $APP.xf(b)?this.bb(null,$APP.u(b,0),$APP.u(b,1)):$APP.dc.Lf($APP.lc,this,b)};$APP.k=kC.prototype;$APP.k.Ba=function(a,b){return this.P(null,b,null)};
|
||||||
|
$APP.k.P=function(a,b,c){return $APP.ce.Lf(this.N,b,c)};$APP.k.Pb=function(a,b,c){return $APP.dc.Lf(function(d,e){var f=$APP.B.Lf(e,0,null);e=$APP.B.Lf(e,1,null);return b.Lf?b.Lf(d,f,e):b.call(null,d,f,e)},c,this)};
|
||||||
|
$APP.k.xg=function(a,b){a=$APP.Ai(b);$APP.ce.h(a,xI);$APP.ce.h(a,vC);var c=$APP.ce.h(a,qD),d=$APP.ce.h(a,$APP.Cz);b=$APP.ce.h(a,rD);var e=$APP.vf(c)?c:c instanceof $APP.ee?Wt(new $APP.O(null,2,5,$APP.P,["keywords are not allowed as request formats in ajax calls: ",c],null)):$APP.If(c)?new $APP.m(null,2,[vu,c,wu,"text/plain"],null):$APP.Hi;e=$APP.Ai(e);var f=$APP.ce.h(e,vu);e=$APP.ce.h(e,wu);c=null!=f?f.g?f.g(d):f.call(null,d):Wt(new $APP.O(null,2,5,$APP.P,["unrecognized request format: ",c],null));
|
||||||
|
b=$APP.n(b)?b:$APP.Hi;return $APP.E.j(a,$APP.FD,c,$APP.Pe([rD,$APP.n(e)?$APP.E.Lf(b,"Content-Type",RB(e)):b]))};$APP.k.yg=function(a,b){return b};$APP.k.O=function(a,b,c){return $APP.Zm(b,function(d){return $APP.Zm(b,$APP.gn,""," ","",c,d)},"#ajax.interceptors.ApplyRequestFormat{",", ","}",c,$APP.K.h($APP.$e,this.N))};$APP.k.cb=function(){return new $APP.Sk(this,0,$APP.$e,$APP.n(this.N)?$APP.Pd(this.N):$APP.Fi())};$APP.k.T=function(){return this.Nf};
|
||||||
|
$APP.k.Pf=function(){return new kC(this.Nf,this.N,this.H)};$APP.k.aa=function(){return 0+$APP.Je(this.N)};$APP.k.X=function(){var a=this.H;return null!=a?a:this.H=a=1698259290^$APP.pe(this)};$APP.k.W=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.fe.h(this.N,b.N)};$APP.k.hc=function(a,b){return $APP.H($APP.nm,b)?$APP.hf.h($APP.Sc($APP.Uj.h($APP.Hi,this),this.Nf),b):new kC(this.Nf,$APP.Ei($APP.hf.h(this.N,b)),null)};$APP.k.Gb=function(a,b){return $APP.H(this.N,b)};
|
||||||
|
$APP.k.bb=function(a,b,c){return new kC(this.Nf,$APP.E.Lf(this.N,b,c),null)};$APP.k.V=function(){return $APP.z($APP.K.h($APP.$e,this.N))};$APP.k.Z=function(a,b){return new kC(b,this.N,this.H)};$APP.k.da=function(a,b){return $APP.xf(b)?this.bb(null,$APP.u(b,0),$APP.u(b,1)):$APP.dc.Lf($APP.lc,this,b)};$APP.k=zC.prototype;$APP.k.Ba=function(a,b){return this.P(null,b,null)};$APP.k.P=function(a,b,c){return $APP.ce.Lf(this.N,b,c)};
|
||||||
|
$APP.k.Pb=function(a,b,c){return $APP.dc.Lf(function(d,e){var f=$APP.B.Lf(e,0,null);e=$APP.B.Lf(e,1,null);return b.Lf?b.Lf(d,f,e):b.call(null,d,f,e)},c,this)};$APP.k.xg=function(a,b){b=$APP.Ai(b);a=$APP.ce.h(b,vC);b=$APP.bk.Lf(b,xI,$APP.hj.h(yC,b));return $APP.fe.h(a,"GET")?$APP.we(b):b};$APP.k.yg=function(a,b){return b};$APP.k.O=function(a,b,c){return $APP.Zm(b,function(d){return $APP.Zm(b,$APP.gn,""," ","",c,d)},"#ajax.interceptors.ProcessUrlParameters{",", ","}",c,$APP.K.h($APP.$e,this.N))};
|
||||||
|
$APP.k.cb=function(){return new $APP.Sk(this,0,$APP.$e,$APP.n(this.N)?$APP.Pd(this.N):$APP.Fi())};$APP.k.T=function(){return this.Nf};$APP.k.Pf=function(){return new zC(this.Nf,this.N,this.H)};$APP.k.aa=function(){return 0+$APP.Je(this.N)};$APP.k.X=function(){var a=this.H;return null!=a?a:this.H=a=-516728758^$APP.pe(this)};$APP.k.W=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.fe.h(this.N,b.N)};
|
||||||
|
$APP.k.hc=function(a,b){return $APP.H($APP.nm,b)?$APP.hf.h($APP.Sc($APP.Uj.h($APP.Hi,this),this.Nf),b):new zC(this.Nf,$APP.Ei($APP.hf.h(this.N,b)),null)};$APP.k.Gb=function(a,b){return $APP.H(this.N,b)};$APP.k.bb=function(a,b,c){return new zC(this.Nf,$APP.E.Lf(this.N,b,c),null)};$APP.k.V=function(){return $APP.z($APP.K.h($APP.$e,this.N))};$APP.k.Z=function(a,b){return new zC(b,this.N,this.H)};$APP.k.da=function(a,b){return $APP.xf(b)?this.bb(null,$APP.u(b,0),$APP.u(b,1)):$APP.dc.Lf($APP.lc,this,b)};
|
||||||
|
$APP.k=BC.prototype;$APP.k.Ba=function(a,b){return this.P(null,b,null)};$APP.k.P=function(a,b,c){return $APP.ce.Lf(this.N,b,c)};$APP.k.Pb=function(a,b,c){return $APP.dc.Lf(function(d,e){var f=$APP.B.Lf(e,0,null);e=$APP.B.Lf(e,1,null);return b.Lf?b.Lf(d,f,e):b.call(null,d,f,e)},c,this)};$APP.k.xg=function(a,b){a=$APP.Ai(b);return null==$APP.ce.h(a,$APP.FD)?a:$APP.we(a)};$APP.k.yg=function(a,b){return b};
|
||||||
|
$APP.k.O=function(a,b,c){return $APP.Zm(b,function(d){return $APP.Zm(b,$APP.gn,""," ","",c,d)},"#ajax.interceptors.DirectSubmission{",", ","}",c,$APP.K.h($APP.$e,this.N))};$APP.k.cb=function(){return new $APP.Sk(this,0,$APP.$e,$APP.n(this.N)?$APP.Pd(this.N):$APP.Fi())};$APP.k.T=function(){return this.Nf};$APP.k.Pf=function(){return new BC(this.Nf,this.N,this.H)};$APP.k.aa=function(){return 0+$APP.Je(this.N)};$APP.k.X=function(){var a=this.H;return null!=a?a:this.H=a=-1077152635^$APP.pe(this)};
|
||||||
|
$APP.k.W=function(a,b){return null!=b&&this.constructor===b.constructor&&$APP.fe.h(this.N,b.N)};$APP.k.hc=function(a,b){return $APP.H($APP.nm,b)?$APP.hf.h($APP.Sc($APP.Uj.h($APP.Hi,this),this.Nf),b):new BC(this.Nf,$APP.Ei($APP.hf.h(this.N,b)),null)};$APP.k.Gb=function(a,b){return $APP.H(this.N,b)};$APP.k.bb=function(a,b,c){return new BC(this.Nf,$APP.E.Lf(this.N,b,c),null)};$APP.k.V=function(){return $APP.z($APP.K.h($APP.$e,this.N))};$APP.k.Z=function(a,b){return new BC(b,this.N,this.H)};
|
||||||
|
$APP.k.da=function(a,b){return $APP.xf(b)?this.bb(null,$APP.u(b,0),$APP.u(b,1)):$APP.dc.Lf($APP.lc,this,b)};var HH=new $APP.O(null,3,5,$APP.P,[new zC(null,null,null),new BC(null,null,null),new kC(null,null,null)],null);var eK=function(a){return function(){function b(e){e=$APP.Ai(e);var f=$APP.ce.h(e,eJ),l=$APP.ce.h(e,fJ),g=$APP.ce.h(e,zJ);return fC(new $APP.m(null,3,[$B,function(p){p=Ot(p);p=$APP.n($APP.n(f)?$APP.fe.h(0,p.indexOf(f)):f)?p.substring(f.length):p;return a.Lf?a.Lf(g,l,p):a.call(null,g,l,p)},eC,["JSON",$APP.n(f)?[" prefix '",$APP.q.g(f),"'"].join(""):null,$APP.n(l)?" keywordize":null].join(""),wu,new $APP.O(null,1,5,$APP.P,["application/json"],null)],null))}function c(){return d.g($APP.Hi)}var d=null;
|
||||||
|
d=function(e){switch(arguments.length){case 0:return c.call(this);case 1:return b.call(this,e)}throw Error("Invalid arity: "+arguments.length);};d.s=c;d.g=b;return d}()}(function(a,b,c){c=JSON.parse(c);return $APP.n(a)?c:$APP.Yn.j(c,$APP.Pe([$APP.Zn,b]))}),QH=function(a){return function(){return new $APP.m(null,2,[vu,a,wu,"application/json"],null)}}(function(a){return JSON.stringify($APP.Un(a))});var fK=function fK(a){switch(arguments.length){case 0:return fK.s();case 1:return fK.g(arguments[0]);case 2:return fK.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};fK.s=function(){return fK.g($APP.Hi)};fK.g=function(a){return fK.h(IC(a),a)};fK.h=function(a,b){return fC(new $APP.m(null,3,[$B,cD(b),eC,"Transit",wu,new $APP.O(null,1,5,$APP.P,["application/transit+json"],null)],null))};fK.o=2;var gK=function gK(a){switch(arguments.length){case 0:return gK.s();case 1:return gK.g(arguments[0]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};gK.s=function(){return fC(new $APP.m(null,3,[$B,Ot,eC,"raw text",wu,new $APP.O(null,1,5,$APP.P,["*/*"],null)],null))};gK.g=function(){return gK.s()};gK.o=1;var dD=function dD(a,b){return null==b||$APP.vf(b)?b:$APP.xf(b)?(b=$APP.Te(b),dD.h?dD.h(a,b):dD.call(null,a,b)):b.g?b.g(a):b.call(null,a)};/*
|
||||||
|
|
||||||
|
Copyright The Closure Library Authors.
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
var jK=kt("Opera"),LG=kt("Trident")||kt("MSIE"),kK=kt("Edge"),mK=kt("Gecko")&&!(-1!=$APP.Xm.toLowerCase().indexOf("webkit")&&!kt("Edge"))&&!(kt("Trident")||kt("MSIE"))&&!kt("Edge"),nK=-1!=$APP.Xm.toLowerCase().indexOf("webkit")&&!kt("Edge");nK&&kt("Mobile");kt("Macintosh");kt("Windows");kt("Linux")||kt("CrOS");var oK=$APP.kX.navigator||null;oK&&(oK.appVersion||"").indexOf("X11");kt("Android");yD();kt("iPad");kt("iPod");yD()||kt("iPad")||kt("iPod");$APP.Xm.toLowerCase().indexOf("kaios");var KD;
|
||||||
|
a:{var yK="",AK=function(){var a=$APP.Xm;if(mK)return/rv:([^\);]+)(\)|;)/.exec(a);if(kK)return/Edge\/([\d\.]+)/.exec(a);if(LG)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(nK)return/WebKit\/(\S+)/.exec(a);if(jK)return/(?:Version)[ \/]?(\S+)/.exec(a)}();AK&&(yK=AK?AK[1]:"");if(LG){var BK=zD();if(null!=BK&&BK>parseFloat(yK)){KD=String(BK);break a}}KD=yK}var JD={},HK;if($APP.kX.document&&LG){var IK=zD();HK=IK?IK:parseInt(KD,10)||void 0}else HK=void 0;var JK=HK;var TD=0,$D={};aE.prototype.Ag=!1;aE.prototype.zh=function(){if(!this.Ag&&(this.Ag=!0,this.ng(),0!=TD)){var a=$APP.qa(this);if(0!=TD&&this.ug&&0<this.ug.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete $D[a]}};aE.prototype.ng=function(){if(this.ug)for(;this.ug.length;)this.ug.shift()()};var LK;(LK=!LG)||(LK=9<=Number(JK));var GF=LK,QK=LG&&!RD("9"),rF=function(){if(!$APP.kX.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{$APP.kX.addEventListener("test",$APP.sh,b),$APP.kX.removeEventListener("test",$APP.sh,b)}catch(c){}return a}();fE.prototype.stopPropagation=function(){this.qg=!0};fE.prototype.preventDefault=function(){this.defaultPrevented=!0};bt(iE,fE);var TK={2:"touch",3:"pen",4:"mouse"};
|
||||||
|
iE.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(mK){a:{try{$APP.uh(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=
|
||||||
|
d.screenY||0):(this.offsetX=nK||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=nK||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=
|
||||||
|
a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:TK[a.pointerType]||"";this.state=a.state;this.Bg=a;a.defaultPrevented&&this.preventDefault()};iE.prototype.stopPropagation=function(){iE.Jg.stopPropagation.call(this);this.Bg.stopPropagation?this.Bg.stopPropagation():this.Bg.cancelBubble=!0};
|
||||||
|
iE.prototype.preventDefault=function(){iE.Jg.preventDefault.call(this);var a=this.Bg;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,QK)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var eF="closure_listenable_"+(1E6*Math.random()|0),jE=0;vE.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.Zf[f];a||(a=this.Zf[f]=[],this.Lg++);var l=xE(a,b,d,e);-1<l?(b=a[l],c||(b.Og=!1)):(b=new pE(b,this.src,f,!!d,e),b.Og=c,a.push(b));return b};vE.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.Zf))return!1;var e=this.Zf[a];b=xE(e,b,c,d);return-1<b?(sE(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.Zf[a],this.Lg--),!0):!1};
|
||||||
|
vE.prototype.mh=function(a,b,c,d){a=this.Zf[a.toString()];var e=-1;a&&(e=xE(a,b,c,d));return-1<e?a[e]:null};bt(yE,aE);yE.prototype.gh=function(){return this.hh?this.hh():{}};yE.prototype.ng=function(){yE.Jg.ng.call(this);for(var a=this.Dg;a.length;)JE(this,a.pop());delete this.Dg};OE.prototype.toString=function(){var a=[];a.push(this.type," ",this.count," (",Math.round(10*this.time)/10," ms)");this.uh&&a.push(" [VarAlloc \x3d ",this.uh,"]");return a.join("")};ME.prototype.toString=function(){return null==this.type?this.Th:"["+this.type+"] "+this.Th};var YE={ci:!0};PE.prototype.Jh=function(){this.sh={}};
|
||||||
|
PE.prototype.reset=function(){$E(this);for(var a=0;a<this.Cg.length;a++){var b=this.Cg[a];b.id?wt(this.Hg.eg,b.id)||(LE(this.Ch,b.id),LE(this.kh,b)):LE(this.kh,b)}this.Cg.length=0;this.Kh=Date.now();this.yh=this.Nh=this.Oh=this.Ph=this.Qh=0;a=this.Ig.ag();for(b=0;b<a.length;b++){var c=this.Ig.get(a[b]);c.count=0;c.time=0;c.uh=0;LE(this.Lh,c)}this.Ig.clear()};
|
||||||
|
PE.prototype.toString=function(){for(var a=[],b=-1,c=[],d=0;d<this.Cg.length;d++){var e=this.Cg[d];1==e.lh&&c.pop();a.push(" ",XE(e,this.Kh,b,c.join("")));b=e.Bh;a.push("\n");0==e.lh&&c.push("| ")}if(0!=this.Hg.gg){var f=Date.now();a.push(" Unstopped timers:\n");ut(this.Hg,function(l){a.push(" ",l," (",f-l.startTime," ms, started at ",VE(l.startTime),")\n")})}b=this.Ig.ag();for(d=0;d<b.length;d++)c=this.Ig.get(b[d]),1<c.count&&a.push(" TOTAL ",c,"\n");a.push("Total tracers created ",this.Nh,"\n",
|
||||||
|
"Total comments created ",this.yh,"\n","Overhead start: ",this.Qh," ms\n","Overhead end: ",this.Ph," ms\n","Overhead comment: ",this.Oh," ms\n");return a.join("")};new PE;var mF="closure_lm_"+(1E6*Math.random()|0),UF={},AF=0,$F="__closure_events_fn_"+(1E9*Math.random()>>>0);bt(aG,aE);aG.prototype[eF]=!0;$APP.k=aG.prototype;$APP.k.addEventListener=function(a,b,c,d){cF(this,a,b,c,d)};$APP.k.removeEventListener=function(a,b,c,d){IF(this,a,b,c,d)};
|
||||||
|
$APP.k.dispatchEvent=function(a){var b,c=this.qh;if(c)for(b=[];c;c=c.qh)b.push(c);c=this.Rh;var d=a.type||a;if("string"===typeof a)a=new fE(a,c);else if(a instanceof fE)a.target=a.target||c;else{var e=a;a=new fE(d,c);$APP.v8(a,e)}e=!0;if(b)for(var f=b.length-1;!a.qg&&0<=f;f--){var l=a.currentTarget=b[f];e=dG(l,d,!0,a)&&e}a.qg||(l=a.currentTarget=c,e=dG(l,d,!0,a)&&e,a.qg||(e=dG(l,d,!1,a)&&e));if(b)for(f=0;!a.qg&&f<b.length;f++)l=a.currentTarget=b[f],e=dG(l,d,!1,a)&&e;return e};
|
||||||
|
$APP.k.ng=function(){aG.Jg.ng.call(this);this.Jh();this.qh=null};$APP.k.Jh=function(){if(this.ig){var a=this.ig,b=0,c;for(c in a.Zf){for(var d=a.Zf[c],e=0;e<d.length;e++)++b,sE(d[e]);delete a.Zf[c];a.Lg--}}};$APP.k.mh=function(a,b,c,d){return this.ig.mh(String(a),b,c,d)};fG.prototype.xh=null;var VK;bt(wG,fG);VK=new wG;bt(JG,aG);var DG="",XG=/^https?$/i,bL=["POST","PUT"];$APP.k=JG.prototype;$APP.k.setTimeoutInterval=function(a){this.Kg=Math.max(0,a)};$APP.k.setResponseType=function(a){this.Sg=a};$APP.k.setWithCredentials=function(a){this.vh=a};$APP.k.setProgressEventsEnabled=function(a){this.Ih=a};
|
||||||
|
$APP.k.send=function(a,b,c,d){if(this.Of)throw Error("[goog.net.XhrIo] Object is active with another request\x3d"+this.oh+"; newUri\x3d"+a);b=b?b.toUpperCase():"GET";this.oh=a;this.Qg="";this.tg=0;this.jh=!1;this.jg=!0;this.Of=this.Wg?yG(this.Wg):yG(VK);this.Vg=this.Wg?uG(this.Wg):uG(VK);this.Of.onreadystatechange=$s(this.Hh,this);this.Ih&&"onprogress"in this.Of&&(this.Of.onprogress=$s(function(f){this.Gh(f,!0)},this),this.Of.upload&&(this.Of.upload.onprogress=$s(this.Gh,this)));try{this.getStatus(),
|
||||||
|
this.nh=!0,this.Of.open(b,String(a),!0),this.nh=!1}catch(f){this.getStatus();TG(this,f);return}a=c||"";const e=this.headers.clone();d&&ot(d,function(f,l){e.set(l,f)});d=gt(e.ag());c=$APP.kX.FormData&&a instanceof $APP.kX.FormData;!(0<=(0,$APP.Aj)(bL,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset\x3dutf-8");e.forEach(function(f,l){this.Of.setRequestHeader(l,f)},this);this.Sg&&(this.Of.responseType=this.Sg);"withCredentials"in this.Of&&this.Of.withCredentials!==this.vh&&
|
||||||
|
(this.Of.withCredentials=this.vh);try{kH(this),0<this.Kg&&(this.th=PG(this.Of),this.getStatus(),this.th?(this.Of.timeout=this.Kg,this.Of.ontimeout=$s(this.Mh,this)):this.Tg=eG(this.Mh,this.Kg,this)),this.getStatus(),this.Pg=!0,this.Of.send(a),this.Pg=!1}catch(f){this.getStatus(),TG(this,f)}};$APP.k.Mh=function(){"undefined"!=typeof $APP.rj&&this.Of&&(this.Qg="Timed out after "+this.Kg+"ms, aborting",this.tg=8,this.getStatus(),this.dispatchEvent("timeout"),this.abort(8))};
|
||||||
|
$APP.k.abort=function(a){this.Of&&this.jg&&(this.getStatus(),this.jg=!1,this.og=!0,this.Of.abort(),this.og=!1,this.tg=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),RG(this))};$APP.k.ng=function(){this.Of&&(this.jg&&(this.jg=!1,this.og=!0,this.Of.abort(),this.og=!1),RG(this,!0));JG.Jg.ng.call(this)};$APP.k.Hh=function(){this.Ag||(this.nh||this.Pg||this.og?$G(this):this.Xh())};$APP.k.Xh=function(){$G(this)};
|
||||||
|
$APP.k.Gh=function(a,b){this.dispatchEvent(gH(a,"progress"));this.dispatchEvent(gH(a,b?"downloadprogress":"uploadprogress"))};$APP.k.getStatus=function(){try{return 2<VG(this)?this.Of.status:-1}catch(a){return-1}};$APP.k.getStatusText=function(){try{return 2<VG(this)?this.Of.statusText:""}catch(a){return""}};
|
||||||
|
$APP.k.getResponse=function(){try{if(!this.Of)return null;if("response"in this.Of)return this.Of.response;switch(this.Sg){case DG:case "text":return this.Of.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in this.Of)return this.Of.mozResponseArrayBuffer}return null}catch(a){return null}};$APP.k.getResponseHeader=function(a){if(this.Of&&4==VG(this))return a=this.Of.getResponseHeader(a),null===a?void 0:a};
|
||||||
|
$APP.k.getAllResponseHeaders=function(){return this.Of&&4==VG(this)?this.Of.getAllResponseHeaders()||"":""};$APP.k.getResponseHeaders=function(){const a={},b=this.getAllResponseHeaders().split("\r\n");for(let d=0;d<b.length;d++){if($APP.qi(b[d]))continue;var c=lt(b[d],":",1);const e=c[0];c=c[1];if("string"!==typeof c)continue;c=c.trim();const f=a[e]||[];a[e]=f;f.push(c)}return ht(a,function(d){return d.join(", ")})};$APP.k.getLastErrorCode=function(){return this.tg};var AH=$APP.nj.g($APP.$e);var fL=$APP.nj.g(new $APP.O(null,6,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["application/transit+json",fK],null),new $APP.O(null,2,5,$APP.P,["application/transit+transit",fK],null),new $APP.O(null,2,5,$APP.P,["application/json",eK],null),new $APP.O(null,2,5,$APP.P,["text/plain",gK],null),new $APP.O(null,2,5,$APP.P,["text/html",gK],null),new $APP.O(null,2,5,$APP.P,["*/*",gK],null)],null)),UH=function UH(a,b){if($APP.xf(a)){var d=$APP.P,e=$APP.r(a);a=$APP.Te(a);b=UH.h?UH.h(a,b):UH.call(null,a,b);return new $APP.O(null,
|
||||||
|
2,5,d,[e,b],null)}if($APP.vf(a))return a;if($APP.jf(a))return new $APP.m(null,2,[$B,a,eC,"custom"],null);if(null==a)return EC(new $APP.m(null,1,[FC,$APP.Oc(fL)],null));switch(a instanceof $APP.ee?a.fb:null){case "transit":return fK.g(b);case "json":return eK(b);case "text":return gK.s?gK.s():gK.call(null);case "ring":return d=new $APP.m(null,1,[qD,gK.s()],null),d=$APP.Ai(d),d=$APP.ce.h(d,qD),b=$APP.Ai(d),d=$APP.ce.h(b,$B),e=$APP.ce.h(b,eC),b=$APP.ce.h(b,wu),fC(new $APP.m(null,3,[$B,tD(d),eC,["ring/",
|
||||||
|
$APP.q.g(e)].join(""),wu,b],null));case "raw":return gK.s();case "detect":return EC(new $APP.m(null,1,[FC,$APP.Oc(fL)],null));default:return null}},iI=$APP.nj.g(function(a){return $APP.rn.j($APP.Pe(["CLJS-AJAX response:",a]))}),uI=$APP.nj.g(function(a){return"undefined"!==typeof console?console.error(a):"undefined"!==typeof window?window.alert($APP.q.g(a)):$APP.rn.j($APP.Pe(["CLJS-AJAX ERROR:",a]))});$APP.k=JG.prototype;
|
||||||
|
$APP.k.Zg=function(a,b,c){var d=$APP.Ai(b);a=$APP.ce.h(d,xI);b=$APP.ce.h(d,vC);var e=$APP.ce.h(d,$APP.FD),f=$APP.ce.h(d,rD),l=$APP.ce.Lf(d,pJ,0),g=$APP.ce.Lf(d,lJ,!1),p=$APP.ce.h(d,FC);d=$APP.ce.h(d,KJ);p=$APP.Ws.g(p);$APP.n(p)&&this.setResponseType($APP.Wh(p));$APP.jf(d)&&(this.setProgressEventsEnabled(!0),cF(this,"uploadprogress",d));cF(this,"complete",function(w){w=w.target;return c.g?c.g(w):c.call(null,w)});this.setTimeoutInterval(l);this.setWithCredentials(g);this.send(a,b,e,$APP.Un(f));return this};
|
||||||
|
$APP.k.$g=function(){return this.getResponse()};$APP.k.dh=function(){return this.getStatus()};$APP.k.eh=function(){return this.getStatusText()};$APP.k.ah=function(){return $APP.Yn.g(this.getResponseHeaders())};$APP.k.bh=function(a,b){return this.getResponseHeader(b)};$APP.k.fh=function(){return $APP.fe.h(this.getLastErrorCode(),7)};var gL;if("undefined"!==typeof $APP.rj&&"undefined"!==typeof $APP.kX&&"undefined"!==typeof $APP.kX.XMLHttpRequest)gL=$APP.kX.XMLHttpRequest;else{var hL;if("undefined"!==typeof require){var iL=require;hL=(iL.g?iL.g("xmlhttprequest"):iL.call(null,"xmlhttprequest")).XMLHttpRequest}else hL=null;gL=hL}var nL=gL;$APP.k=nL.prototype;
|
||||||
|
$APP.k.Zg=function(a,b,c){var d=$APP.Ai(b),e=$APP.ce.h(d,xI),f=$APP.ce.h(d,vC);a=$APP.ce.h(d,$APP.FD);b=$APP.ce.h(d,rD);var l=$APP.ce.Lf(d,pJ,0),g=$APP.ce.Lf(d,lJ,!1);d=$APP.ce.h(d,FC);var p=this;p.withCredentials=g;p.onreadystatechange=function(w){var A=$APP.fe,D=A.h;w=w.target.readyState;var G=new $APP.m(null,5,[0,CJ,1,JJ,2,mJ,3,EJ,4,NJ],null);w=G.g?G.g(w):G.call(null,w);return D.call(A,NJ,w)?c.g?c.g(p):c.call(null,p):null};p.open(f,e,!0);p.timeout=l;e=$APP.Ws.g(d);$APP.n(e)&&(p.responseType=$APP.Wh(e));
|
||||||
|
b=$APP.z(b);e=null;for(l=f=0;;)if(l<f)d=e.S(null,l),g=$APP.B.Lf(d,0,null),d=$APP.B.Lf(d,1,null),p.setRequestHeader(g,d),l+=1;else if(b=$APP.z(b))$APP.yf(b)?(f=$APP.Dd(b),b=$APP.Ed(b),e=f,f=$APP.Je(f)):(f=$APP.r(b),e=$APP.B.Lf(f,0,null),f=$APP.B.Lf(f,1,null),p.setRequestHeader(e,f),b=$APP.t(b),e=null,f=0),l=0;else break;p.send($APP.n(a)?a:"");return p};$APP.k.$g=function(){return this.response};$APP.k.dh=function(){return this.status};$APP.k.eh=function(){return this.statusText};$APP.k.ah=function(){return WI(this.getAllResponseHeaders())};
|
||||||
|
$APP.k.bh=function(a,b){return this.getResponseHeader(b)};$APP.k.fh=function(){return $APP.fe.h(0,this.readyState)};var oL=function oL(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return oL.j(arguments[0],1<c.length?new $APP.Xb(c.slice(1),0,null):null)};oL.j=function(a,b){var c=$APP.r(b);return LI(a,"GET",c instanceof $APP.ee?$APP.Yb.h($APP.Bi,b):c)};oL.o=1;oL.Mf=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};
|
||||||
|
var pL=function pL(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return pL.j(arguments[0],1<c.length?new $APP.Xb(c.slice(1),0,null):null)};pL.j=function(a,b){var c=$APP.r(b);return LI(a,"POST",c instanceof $APP.ee?$APP.Yb.h($APP.Bi,b):c)};pL.o=1;pL.Mf=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};var sL=$APP.gU(XI,null),wL=new $APP.m(null,2,[hJ,function(){var a=new $APP.de(function(){return oL},yJ,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[XI,hJ,"ajax/core.cljc",16,new $APP.m(null,6,[$APP.aO,!0,$APP.Cs,1,$APP.Mt,1,$APP.hu,new $APP.O(null,1,5,$APP.P,[$APP.I(ZI,$APP.Ko)],null),$APP.V,$APP.I(new $APP.O(null,3,5,$APP.P,[ZI,$APP.Wo,$APP.Ko],null)),$APP.tC,$APP.I(null)],null),1,74,74,$APP.I(new $APP.O(null,3,5,$APP.P,[ZI,$APP.Wo,$APP.Ko],null)),
|
||||||
|
"accepts the URI and an optional map of options, options include:\n :handler - the handler function for successful operation\n should accept a single parameter which is the\n deserialized response\n :progress-handler - the handler function for progress events.\n this handler is only available when using the goog.net.XhrIo API\n :error-handler - the handler function for errors, should accept a\n map with keys :status and :status-text\n :format - the format for the request\n :response-format - the format for the response\n :params - a map of parameters that will be sent with the request",
|
||||||
|
$APP.n(oL)?oL.fg:null])),b=$APP.Oc(a);a=$APP.F(a);var c=sL.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,sL,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.bj(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}(),$I,function(){var a=new $APP.de(function(){return pL},BJ,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[XI,$I,"ajax/core.cljc",17,new $APP.m(null,6,[$APP.aO,
|
||||||
|
!0,$APP.Cs,1,$APP.Mt,1,$APP.hu,new $APP.O(null,1,5,$APP.P,[$APP.I(ZI,$APP.Ko)],null),$APP.V,$APP.I(new $APP.O(null,3,5,$APP.P,[ZI,$APP.Wo,$APP.Ko],null)),$APP.tC,$APP.I(null)],null),1,76,76,$APP.I(new $APP.O(null,3,5,$APP.P,[ZI,$APP.Wo,$APP.Ko],null)),"accepts the URI and an optional map of options, options include:\n :handler - the handler function for successful operation\n should accept a single parameter which is the\n deserialized response\n :progress-handler - the handler function for progress events.\n this handler is only available when using the goog.net.XhrIo API\n :error-handler - the handler function for errors, should accept a\n map with keys :status and :status-text\n :format - the format for the request\n :response-format - the format for the response\n :params - a map of parameters that will be sent with the request",
|
||||||
|
$APP.n(pL)?pL.fg:null])),b=$APP.Oc(a);a=$APP.F(a);var c=sL.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,sL,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.bj(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null);$APP.qj.Lf($APP.nc,$APP.dj,new $APP.m(null,1,[$APP.Cr,new $APP.m(null,1,[XI,wL],null)],null));
|
||||||
|
}).call(this);
|
1613
js/scittle.js
Normal file
1613
js/scittle.js
Normal file
File diff suppressed because it is too large
Load diff
64
js/scittle.reagent.js
Normal file
64
js/scittle.reagent.js
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
(function(){
|
||||||
|
shadow$provide[0]=function(b,c,a,d){a.exports=React};
|
||||||
|
shadow$provide[1]=function(b,c,a,d){a.exports=ReactDOM};
|
||||||
|
'use strict';var z8=function(a,b){var c=w8[a];if(void 0!==c)return c;try{x8.push(a);var d=y8[a],e=shadow$provide[a];if(void 0===d){if(void 0===e)throw"Module not provided: "+a;d={exports:{}};y8[a]=d}if(e){delete shadow$provide[a];try{e.call(d,$APP.kX,z8,d,d.exports)}catch(l){throw console.warn("shadow-cljs - failed to load",a),l;}if(b){var f=b.globals;if(f)for(a=0;a<f.length;a++)window[f[a]]=d.exports}}}finally{x8.pop()}return d.exports},A8=function(a){return 2>$APP.Je(a)?$APP.fT(a):[$APP.fT($APP.Ch.Lf(a,
|
||||||
|
0,1)),$APP.Ch.h(a,1)].join("")},C8=function(a){if("string"===typeof a)return a;a=$APP.Wh(a);var b=$APP.jT.h(a,/-/),c=$APP.z(b);b=$APP.r(c);c=$APP.t(c);return $APP.n(B8.g?B8.g(b):B8.call(null,b))?a:$APP.Yb.Lf($APP.q,b,$APP.Yi.h(A8,c))},D8=function(a){var b=function(){var c=function(){var d=$APP.jf(a);if(d){d=a.displayName;if($APP.n(d))return d;d=a.name;return"string"===typeof d&&$APP.z(d)?d:null}return d}();if($APP.n(c))return c;c=function(){var d=null!=a?a.J&4096||$APP.Ua===a.Nd?!0:!1:!1;return d?
|
||||||
|
$APP.Wh(a):d}();if($APP.n(c))return c;c=$APP.F(a);return $APP.vf(c)?$APP.T.g(c):null}();return $APP.n(b)?$APP.cT($APP.q.g(b),"$","."):null},E8=function(a){return a instanceof $APP.ee||a instanceof $APP.x},G8=function(a){if($APP.vf(a))try{var b=$APP.ce.h(a,F8)}catch(c){b=null}else b=null;return b},H8=function(a){var b=F8.g($APP.F(a));if($APP.n(b))return b;b=G8($APP.B.Lf(a,1,null));if($APP.n(b))return b;b=$APP.B.Lf(a,0,null);switch(b instanceof $APP.ee?b.fb:null){case "\x3e":case "f\x3e":return G8($APP.B.Lf(a,
|
||||||
|
2,null));case "r\x3e":return a=$APP.B.Lf(a,2,null),null==a?null:a.key;default:return null}},I8=function(a){return setTimeout(a,16)},J8=function(a,b){return a.pf-b.pf},K8=function(){return null},L8=function(a){for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.s?d.s():d.call(null);c+=1}else return null},M8=function(a,b,c){b.push(c);return a.schedule()},N8=function(){this.jf=!1},P8=function(a){if($APP.n(a.cljsIsDirty))return null;a.cljsIsDirty=!0;return O8.queue_render(a)},Q8=function(a){if(null!=a&&null!=
|
||||||
|
a.If)a=a.id;else{var b=Q8[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=Q8._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("Compiler.get-id",a);}return a},R8=function(a,b){if(null!=a&&null!=a.xf)a=a.xf(a,b);else{var c=R8[$APP.pa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=R8._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Rb("Compiler.as-element",a);}return a},S8=function(a,b,c,d,e){if(null!=a&&null!=a.yf)a=a.yf(a,b,c,d,e);else{var f=
|
||||||
|
S8[$APP.pa(null==a?null:a)];if(null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else if(f=S8._,null!=f)a=f.I?f.I(a,b,c,d,e):f.call(null,a,b,c,d,e);else throw $APP.Rb("Compiler.make-element",a);}return a},U8=function(a,b){b.kf=null;a:{var c=T8;T8=b;try{var d=a.s?a.s():a.call(null);break a}finally{T8=c}d=void 0}a=b.kf;b.bf=!1;a:{c=b.df;var e=null==a?0:a.length,f=e===(null==c?0:c.length);if(f)for(f=0;;){var l=f===e;if(l){c=l;break a}if(a[f]===c[f])f+=1;else{c=!1;break a}}else c=f}c||b._update_watching(a);
|
||||||
|
return d},V8=function(a){var b=T8;if(null!=b){var c=b.kf;null==c?b.kf=[a]:c.push(a)}},W8=function(a,b,c){a.Bc=$APP.E.Lf(a.Bc,b,c);return a.sf=null},X8=function(a,b){a.Bc=$APP.hf.h(a.Bc,b);return a.sf=null},Y8=function(a,b,c){var d=a.sf;d=null==d?a.sf=$APP.fg(function(p,w,A){p.push(w);p.push(A);return p},[],a.Bc):d;for(var e=d.length,f=0;;)if(f<e){var l=d[f],g=d[f+1];g.B?g.B(l,a,b,c):g.call(null,l,a,b,c);f=2+f}else break},Z8=function(a,b,c,d){$APP.od(a,["#object[reagent.ratom.",$APP.q.g(c)," "].join(""));
|
||||||
|
a:{c=T8;T8=null;try{var e=d;break a}finally{T8=c}e=void 0}$APP.gn(e,a,b);return $APP.od(a,"]")},$8=function(a,b,c,d){this.state=a;this.D=b;this.Fe=c;this.Bc=d;this.C=2154201088;this.J=114690},a9=function(a){if(null!=a&&null!=a.rf)a=a.rf(a);else{var b=a9[$APP.pa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=a9._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Rb("IDisposable.dispose!",a);}return a},b9=function(a,b,c,d){return a._handle_change(b,c,d)},c9=function(a){this.f=a;
|
||||||
|
this.state=null;this.bf=!0;this.vf=!1;this.lf=this.af=this.Bc=this.df=null;this.C=2153807872;this.J=114690},e9=function(){for(;;){var a=d9;if(null==a)return null;d9=null;for(var b=a.length,c=0;;)if(c<b)a[c]._queued_run(),c+=1;else break}},i9=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),d+=1;else break;c=arguments[0];var e=$APP.Ai(1<b.length?new $APP.Xb(b.slice(1),0,null):null);b=$APP.ce.h(e,f9);d=$APP.ce.h(e,g9);e=$APP.ce.h(e,h9);c=new c9(c);c._set_opts(new $APP.m(null,
|
||||||
|
3,[f9,b,g9,d,h9,e],null));return c},l9=function(a,b){var c=j9,d=k9,e=U8(a,d);null!=d.df&&(k9=i9(null),d._set_opts(c),d.f=a,d.af=function(){return P8.g?P8.g(b):P8.call(null,b)},b.cljsRatom=d);return e},m9=function(a,b){var c=b.argv;if(null==c){c=$APP.P;a=a.constructor;a:for(var d=$APP.xa(b),e=d.length,f=$APP.Hi,l=0;;)if(l<e){var g=d[l];f=$APP.E.Lf(f,$APP.Vh.g(g),$APP.Aa(b,g));l+=1}else break a;b=new $APP.O(null,2,5,c,[a,f],null)}else b=c;return b},n9=function(a){var b;if(b=$APP.jf(a))a=null==a?null:
|
||||||
|
a.prototype,b=null!=(null==a?null:a.cf);return b},o9=function(a,b){for(;;){var c=a.cf,d=!0===a.Af?c.call(a,a):function(){var e=m9(a,a.props);switch($APP.Je(e)){case 1:return c.call(a);case 2:return c.call(a,$APP.B.h(e,1));case 3:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2));case 4:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2),$APP.B.h(e,3));case 5:return c.call(a,$APP.B.h(e,1),$APP.B.h(e,2),$APP.B.h(e,3),$APP.B.h(e,4));default:return c.apply(a,$APP.cc.g(e).slice(1))}}();if($APP.xf(d))return R8(b,d);
|
||||||
|
if($APP.If(d))a.cf=n9(d)?function(e,f,l,g,p){return function(){function w(D){var G=null;if(0<arguments.length){G=0;for(var J=Array(arguments.length-0);G<J.length;)J[G]=arguments[G+0],++G;G=new $APP.Xb(J,0,null)}return A.call(this,G)}function A(D){return R8(f,$APP.Yb.Lf($APP.Ck,p,D))}w.o=0;w.Mf=function(D){D=$APP.z(D);return A(D)};w.j=A;return w}()}(a,b,c,null,d):d;else return d}},r9=function(a,b){switch(a instanceof $APP.ee?a.fb:null){case "getDefaultProps":throw Error("getDefaultProps not supported");
|
||||||
|
case "getDerivedStateFromProps":return function(c,d){var e=b.call,f=c.argv;null!=f&&(c=$APP.B.Lf(f,1,null),c=$APP.vf(c)?c:null);return e.call(b,null,c,d)};case "getInitialState":return function(c){var d=c.Cf;d=null!=d?d:c.Cf=p9.g(null);return $APP.pj(d,b.call(c,c))};case "getSnapshotBeforeUpdate":return function(c,d){return b.call(this,this,m9(this,c),d)};case "componentWillReceiveProps":return function(c){return b.call(this,this,m9(this,c))};case "UNSAFE_componentWillReceiveProps":return function(c){return b.call(this,
|
||||||
|
this,m9(this,c))};case "shouldComponentUpdate":return function(c){var d=q9;if($APP.n(d))return d;d=this.props.argv;var e=c.argv,f=null==d||null==e;if(null==b){if(f)return f;try{return $APP.Di.h(d,e)}catch(l){return!1}}else return f?b.call(this,this,m9(this,this.props),m9(this,c)):b.call(this,this,d,e)};case "componentWillUpdate":return function(c,d){return b.call(this,this,m9(this,c),d)};case "UNSAFE_componentWillUpdate":return function(c,d){return b.call(this,this,m9(this,c),d)};case "componentDidUpdate":return function(c,
|
||||||
|
d,e){return b.call(this,this,m9(this,c),d,e)};case "componentWillMount":return function(){return b.call(this,this)};case "UNSAFE_componentWillMount":return function(){return b.call(this,this)};case "componentDidMount":return function(){return b.call(this,this)};case "componentWillUnmount":return function(){var c=$APP.Aa(this,"cljsRatom");null!=c&&a9(c);this.cljsIsDirty=!1;return null==b?null:b.call(this,this)};case "componentDidCatch":return function(c,d){return b.call(this,this,c,d)};default:return null}},
|
||||||
|
t9=function(a){return $APP.fg(function(b,c,d){return $APP.E.Lf(b,$APP.Vh.g(s9(c)),d)},$APP.Hi,a)},z9=function(a,b){var c=function(){var l=u9.g(a);return $APP.n(l)?l:v9.g(a)}(),d=null==u9.g(a),e=function(){var l=w9.g(a);if($APP.n(l))return l;l=D8(c);return $APP.n(l)?l:$APP.q.g($APP.Cn.g("reagent"))}(),f=$APP.fg(function(l,g,p){var w=$APP.E.Lf,A=r9(g,p);return w.call($APP.E,l,g,$APP.n(A)?A:p)},$APP.Hi,a);return $APP.E.j(f,w9,e,$APP.Pe([x9,d,u9,c,v9,function(){var l=this,g=$APP.Aa(l,"cljsRatom");l.cljsIsDirty=
|
||||||
|
!1;return null==g?l9(function(){a:{var p=y9;y9=l;try{var w=o9(l,b);break a}finally{y9=p}w=void 0}return w},l):g._run(!1)}]))},A9=function(a){return $APP.fg(function(b,c,d){c=$APP.Wh(c);b[c]=d;return b},{},a)},C9=function(a,b){return z9($APP.em.j($APP.Pe([B9,t9(a)])),b)},H9=function(a,b){function c(g,p,w){e8.Component.call(this,g,p,w);$APP.n(l)&&(l.h?l.h(this,g):l.call(null,this,g));$APP.n(f)&&(this.state=f.g?f.g(this):f.call(null,this));this.pf=E9+=1;return this}a=C9(a,b);b=A9($APP.Yb.j($APP.hf,a,
|
||||||
|
w9,F9,$APP.sA,$APP.Pe([v9,u9,G9])));var d=A9($APP.im(a,G9)),e=w9.g(a),f=F9.g(a),l=$APP.sA.g(a);$APP.v8(c.prototype,e8.Component.prototype,b);$APP.n(v9.g(a))&&(c.prototype.render=v9.g(a));$APP.n(u9.g(a))&&(c.prototype.cf=u9.g(a));$APP.n(x9.g(a))&&(c.prototype.Af=x9.g(a));$APP.v8(c,e8.Component,d);$APP.n(e)&&(c.displayName=e,c.$c=e,c.ue=function(g){return $APP.od(g,e)});c.Td=!0;return c.prototype.constructor=c},I9=function(a,b,c){a=Q8(a);return b[a]=c},J9=function(a,b){for(;;){var c=b.cf,d=b.argv,e=
|
||||||
|
$APP.Yb.h(c,d);if($APP.xf(e))return R8(a,e);if($APP.If(e))b.cf=n9(e)?function(f,l,g,p,w,A){return function(){function D(J){var R=null;if(0<arguments.length){R=0;for(var W=Array(arguments.length-0);R<W.length;)W[R]=arguments[R+0],++R;R=new $APP.Xb(W,0,null)}return G.call(this,R)}function G(J){return R8(f,$APP.Yb.Lf($APP.Ck,A,J))}D.o=0;D.Mf=function(J){J=$APP.z(J);return G(J)};D.j=G;return D}()}(a,b,c,null,d,e):e;else return e}},K9=function(a,b){var c=b.argv,d=b.cf;b=e8.useState(0);$APP.B.Lf(b,0,null);
|
||||||
|
var e=$APP.B.Lf(b,1,null),f=e8.useRef();$APP.n(f.current)||function(){var g={forceUpdate:function(){return e.g?e.g($APP.te):e.call(null,$APP.te)}};g.pf=E9+=1;g.constructor=d;g.cf=d;return f.current=g}();var l=f.current;b=$APP.Aa(l,"cljsRatom");e8.useEffect(function(){return function(){var g=$APP.Aa(l,"cljsRatom");return null==g?null:a9(g)}},[]);l.argv=c;l.cljsIsDirty=!1;return null==b?l9(function(){a:{var g=y9;y9=l;try{var p=J9(a,l);break a}finally{y9=g}p=void 0}return p},l):b._run(!1)},L9=function(a,
|
||||||
|
b){a=a.argv;b=b.argv;var c=!1===q9;if(c)try{return $APP.fe.h(a,b)}catch(d){return!1}else return c},M9=function(a,b){function c(e){return K9(a,e)}var d=$APP.Aa(b,Q8(a));if($APP.n(d))return d;c.displayName=D8(b);d=e8.memo(c,L9);I9(a,b,d);return d},Q9=function(a,b,c,d){var e=$APP.Ai($APP.Hi);e=$APP.ce.h(e,N9);if(a===document.activeElement&&$APP.H(O9,a.type)&&"string"===typeof b&&"string"===typeof c){var f=a.value;if($APP.Di.h(f,c))return O8.add_after_render(function(){return P9.g?P9.g(d):P9.call(null,
|
||||||
|
d)});c=$APP.Je(f)-a.selectionStart;c=$APP.Je(b)-c;d.gf=b;a.value=b;$APP.jf(e)&&(e.g?e.g(b):e.call(null,b));a.selectionStart=c;return a.selectionEnd=c}d.gf=b;a.value=b;return $APP.jf(e)?e.g?e.g(b):e.call(null,b):null},P9=function(a){if($APP.n(a.nf)){a.tf=!1;var b=a.Bf,c=a.gf,d=a.qf;return $APP.Di.h(b,c)?Q9(d,b,c,a):null}return null},R9=function(a,b,c){a.gf=c.target.value;$APP.n(a.tf)||(a.tf=!0,O8.add_after_render(function(){return P9(a)}));return b.g?b.g(c):b.call(null,c)},S9=function(a){var b=y9;
|
||||||
|
if($APP.n(function(){var f=null!=a;return f?(f=a.hasOwnProperty("onChange"),$APP.n(f)?a.hasOwnProperty("value"):f):f}())){var c=a.value;c=null==c?"":c;var d=a.onChange,e=a.ref;$APP.n(b.nf)||(b.nf=!0,b.gf=c);$APP.n(b.zf)||(b.zf=$APP.jf(e)?function(f){b.qf=f;return e.g?e.g(f):e.call(null,f)}:$APP.n($APP.n(e)?e.hasOwnProperty("current"):e)?function(f){b.qf=f;return e.current=f}:function(f){return b.qf=f});b.Bf=c;delete a.value;a.defaultValue=c;a.onChange=function(f){return R9(b,d,f)};a.ref=b.zf}},T9=
|
||||||
|
function(a,b){return a.hasOwnProperty(b)?$APP.Aa(a,b):null},W9=function(a,b,c){if(E8(b)){var d=T9(U9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=U9[b]=d):b=d}c=V9.g?V9.g(c):V9.call(null,c);a[b]=c;return a},V9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(W9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,0,null)}return c.call(this,
|
||||||
|
e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.Mf=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},Y9=function(a,b,c){if(E8(b)){var d=T9(X9,$APP.Wh(b));null==d?(d=C8(b),b=$APP.Wh(b),b=X9[b]=d):b=d}c=V9(c);a[b]=c;return a},Z9=function(a){return"object"!==$APP.pa(a)?a:E8(a)?$APP.Wh(a):$APP.vf(a)?$APP.fg(Y9,{},a):$APP.qf(a)?$APP.Un(a):$APP.If(a)?function(){function b(d){var e=null;if(0<arguments.length){e=0;for(var f=Array(arguments.length-0);e<f.length;)f[e]=arguments[e+0],++e;e=new $APP.Xb(f,
|
||||||
|
0,null)}return c.call(this,e)}function c(d){return $APP.Yb.h(a,d)}b.o=0;b.Mf=function(d){d=$APP.z(d);return c(d)};b.j=c;return b}():$APP.Un(a)},$9=function(a,b,c,d,e){switch($APP.Je(b)-e){case 0:return e8.createElement(c,d);case 1:return e8.createElement(c,d,R8(a,$APP.B.Lf(b,e,null)));default:return e8.createElement.apply(null,$APP.fg(function(f,l,g){l>=e&&f.push(R8(a,g));return f},[c,d],b))}},a$=function(a,b,c,d){this.tag=a;this.id=b;this.className=c;this.Df=d},c$=function(a,b,c){var d=$APP.Aa(a,
|
||||||
|
Q8(c));null==d?n9(a)?a=I9(c,a,a):(d=$APP.F(a),d=$APP.E.Lf(d,b$,a),d=H9(d,c),a=I9(c,a,d)):a=d;c={};c.argv=b;b=H8(b);null!=b&&(c.key=b);return e8.createElement(a,c)},d$=function(a,b,c,d){var e={};e.cf=a;e.argv=$APP.Hk.h(b,c);b=H8(b);null!=b&&(e.key=b);return e8.createElement(M9(d,a),e)},e$=function(a,b,c){var d;if(d=$APP.jf(a))d=null==a?null:a.prototype,d=null!=(null==d?null:d.render);return d?c$(a,b,c):d$(a,b,1,c)},i$=function(a,b,c,d){var e=a.tag,f=$APP.B.Lf(b,c,null),l=null==f||$APP.vf(f),g=function(){var w=
|
||||||
|
l?f:null;var A=$APP.NQ.g(w);A=$APP.n(A)?$APP.E.Lf(w,$APP.NQ,f$.g(A)):w;var D=a.id;w=a.className;D=null!=D&&null==$APP.BS.g(A)?$APP.E.Lf(A,$APP.BS,D):A;if($APP.n(w)){var G=$APP.E.Lf,J=f$.h,R=$APP.NQ.g(A);A=$APP.n(R)?R:g$.g(A);w=G.call($APP.E,D,$APP.NQ,J.call(f$,w,A))}else w=D;w=$APP.n(a.Df)?Z9(w):V9(w);return $APP.n(w)?w:{}}();c+=l?1:0;a:switch(e){case "input":case "textarea":var p=!0;break a;default:p=!1}if(p)return p=function(){var w=d.Jf;if($APP.n(w))return w;w=H9(h$,d);return d.Jf=w}(),R8(d,$APP.lf(new $APP.O(null,
|
||||||
|
6,5,$APP.P,[p,b,e,g,c,d],null),$APP.F(b)));p=G8($APP.F(b));null!=p&&(g.key=p);return S8(d,b,e,g,c)},j$=function(a,b){return $APP.cc.g($APP.Yi.h(function(c){return R8(b,c)},a))},m$=function(a,b,c){null==b&&console.error("vec-to-elem",$APP.on.j($APP.Pe([a])));var d=$APP.B.Lf(a,0,null);switch(d instanceof $APP.ee?d.fb:null){case "\x3e":return c=$APP.B.Lf(a,1,null),i$(new a$(c,null,null,null),a,2,b);case "r\x3e":c=$APP.B.Lf(a,1,null);d=$APP.B.Lf(a,2,null);d=$APP.n(d)?d:{};var e=G8($APP.F(a));null!=e&&
|
||||||
|
(d.key=e);return S8(b,a,c,d,3);case "f\x3e":return d$($APP.B.Lf(a,1,null),a,2,b);case "\x3c\x3e":return d=$APP.B.Lf(a,1,null),c=null==d||$APP.vf(d),d=V9(c?d:null),d=$APP.n(d)?d:{},c=1+(c?1:0),e=H8(a),null!=e&&(d.key=e),S8(b,a,e8.Fragment,d,c);default:if(E8(d)||"string"===typeof d)a:for(;;)switch(c=$APP.B.Lf(a,0,null),c=$APP.Wh(c),d=c.indexOf("\x3e"),d){case -1:d=T9(k$,c);if(null==d){var f=$APP.t($APP.Um(l$,$APP.Wh(c)));d=$APP.B.Lf(f,0,null);e=$APP.B.Lf(f,1,null);f=$APP.B.Lf(f,2,null);f=null==f?null:
|
||||||
|
$APP.cT(f,/\./," ");var l=$APP.Di.h(-1,d.indexOf("-"));d=new a$(d,e,f,l);c=k$[c]=d}else c=d;a=i$(c,a,1,b);break a;case 0:a=null;break a;default:a=$APP.lf(new $APP.O(null,2,5,$APP.P,[$APP.Ch.Lf(c,0,d),$APP.E.Lf($APP.lf(a,null),0,$APP.Ch.h(c,d+1))],null),$APP.F(a))}else a=c.Lf?c.Lf(d,a,b):c.call(null,d,a,b);return a}},p$=function(a,b,c){var d=q9;q9=!0;try{return f8.render(a.s?a.s():a.call(null),b,function(){var e=q9;q9=!1;try{return $APP.qj.B(o$,$APP.E,b,a),O8.flush_after_render(),null!=c?c.s?c.s():
|
||||||
|
c.call(null):null}finally{q9=e}})}finally{q9=d}},x$=new $APP.x(null,"reagent.core","reagent.core",1841519592,null),Ls=new $APP.x(null,"compiler","compiler",1372604796,null),h9=new $APP.ee(null,"on-dispose","on-dispose",2105306360),F9=new $APP.ee(null,"getInitialState","getInitialState",1541760916),y$=new $APP.ee(null,"no-cache","no-cache",1588056370),z$=new $APP.ee(null,"function-components","function-components",1492814963),A$=new $APP.x(null,"reagent.dom","reagent.dom",-2138920962,null),q$=new $APP.ee(null,
|
||||||
|
"component-will-unmount","component-will-unmount",-2058314698),B$=new $APP.ee(null,"callback","callback",-705136228),ct=new $APP.x(null,"x","x",-555367584,null),x9=new $APP.ee(null,"cljsLegacyRender","cljsLegacyRender",-1527295613),u9=new $APP.ee(null,"reagentRender","reagentRender",-358306383),r$=new $APP.x(null,"container","container",-96406180,null),N9=new $APP.ee(null,"on-write","on-write",31519475),C$=new $APP.ee(null,"contextTypes","contextTypes",-2023853910),D$=new $APP.x(null,"render","render",
|
||||||
|
232498073,null),v9=new $APP.ee(null,"render","render",-1408033454),f9=new $APP.ee(null,"auto-run","auto-run",1958400437),E$=new $APP.ee(null,"childContextTypes","childContextTypes",578717991),b$=new $APP.ee(null,"reagent-render","reagent-render",-985383853),F$=new $APP.x("reagent.core","atom","reagent.core/atom",1748890217,null),Ns=new $APP.x("reagent.core","as-element","reagent.core/as-element",-1369748434,null),G$=new $APP.ee(null,"componentWillUnmount","componentWillUnmount",1573788814),s$=new $APP.ee(null,
|
||||||
|
"contextType","contextType",1033066077),Rs=new $APP.x(null,"as-element","as-element",-2139409597,null),t$=new $APP.ee(null,"getDerivedStateFromProps","getDerivedStateFromProps",-991834739),u$=new $APP.ee(null,"display-name","display-name",694513143),g$=new $APP.ee(null,"className","className",-1983287057),w9=new $APP.ee(null,"displayName","displayName",-809144601),H$=new $APP.ee(null,"getDerivedStateFromError","getDerivedStateFromError",166658477),v$=new $APP.x("reagent.dom","render","reagent.dom/render",
|
||||||
|
-1216356973,null),g9=new $APP.ee(null,"on-set","on-set",-140953470),I$=new $APP.ee(null,"component-did-update","component-did-update",-1468549173),F8=new $APP.ee(null,"key","key",-1516042587),J$=new $APP.ee(null,"shouldComponentUpdate","shouldComponentUpdate",1795750960),w$=new $APP.x(null,"callback-or-compiler","callback-or-compiler",90200066,null);var y8={},w8={},x8=[];z8.cache={};z8.resolve=function(a){return a};var e8=z8(0,{});var K$={};$APP.nj.g(null);var L$={},M$="undefined"!==typeof window&&null!=window.document,B8=new $APP.lm(null,new $APP.m(null,2,["aria",null,"data",null],null),null),f$=function f$(a){switch(arguments.length){case 0:return f$.s();case 1:return f$.g(arguments[0]);case 2:return f$.h(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return f$.j(arguments[0],arguments[1],new $APP.Xb(c.slice(2),0,null))}};f$.s=function(){return null};
|
||||||
|
f$.g=function(a){return $APP.qf(a)?(a=$APP.lj.h(function(b){return $APP.n(b)?E8(b)?$APP.Wh(b):b:null},a),$APP.z(a)?$APP.eT.h(" ",a):null):E8(a)?$APP.Wh(a):a};f$.h=function(a,b){return $APP.n(a)?$APP.n(b)?[$APP.q.g(f$.g(a))," ",$APP.q.g(f$.g(b))].join(""):f$.g(a):f$.g(b)};f$.j=function(a,b,c){return $APP.dc.Lf(f$,f$.h(a,b),c)};f$.Mf=function(a){var b=$APP.r(a),c=$APP.t(a);a=$APP.r(c);c=$APP.t(c);return this.j(b,a,c)};f$.o=2;var q9=!1;var E9=0,N$=M$?function(){var a=window;return function(){var b=a.requestAnimationFrame;if($APP.n(b))return b;b=a.webkitRequestAnimationFrame;if($APP.n(b))return b;b=a.mozRequestAnimationFrame;if($APP.n(b))return b;b=a.msRequestAnimationFrame;return $APP.n(b)?b:I8}().bind(a)}():I8;$APP.k=N8.prototype;$APP.k.flush_after_render=function(){var a=this.ef;if(null==a)return null;this.ef=null;return L8(a)};$APP.k.queue_render=function(a){null==this.hf&&(this.hf=[]);return M8(this,this.hf,a)};
|
||||||
|
$APP.k.schedule=function(){function a(){return b.run_queues()}var b=this;if(this.jf)return null;this.jf=!0;return N$.g?N$.g(a):N$.call(null,a)};$APP.k.flush_before_flush=function(){var a=this.ff;if(null==a)return null;this.ff=null;return L8(a)};$APP.k.flush_queues=function(){this.flush_before_flush();K8();this.flush_render();return this.flush_after_render()};$APP.k.run_queues=function(){this.jf=!1;return this.flush_queues()};
|
||||||
|
$APP.k.add_before_flush=function(a){null==this.ff&&(this.ff=[]);return M8(this,this.ff,a)};$APP.k.add_after_render=function(a){null==this.ef&&(this.ef=[]);return M8(this,this.ef,a)};$APP.k.flush_render=function(){var a=this.hf;if(null==a)return null;this.hf=null;a:{a.sort(J8);for(var b=a.length,c=0;;)if(c<b){var d=a[c];!0===d.cljsIsDirty&&d.forceUpdate();c+=1}else break a}return null};var O8=new N8;var T8;$APP.nj.g(0);var d9=null;$APP.k=$8.prototype;$APP.k.O=function(a,b,c){return Z8(b,c,"RAtom",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.T=function(){return this.D};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};$APP.k.ne=function(a,b){a=this.state;this.state=b;null!=this.Bc&&Y8(this,a,b);return b};$APP.k.oe=function(a,b){return this.ne(null,b.g?b.g(this.state):b.call(null,this.state))};
|
||||||
|
$APP.k.pe=function(a,b,c){return this.ne(null,b.h?b.h(this.state,c):b.call(null,this.state,c))};$APP.k.qe=function(a,b,c,d){return this.ne(null,b.Lf?b.Lf(this.state,c,d):b.call(null,this.state,c,d))};$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this.state,c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){return X8(this,b)};$APP.k.Z=function(a,b){return new $8(this.state,b,this.Fe,this.Bc)};
|
||||||
|
$APP.k.jb=function(){V8(this);return this.state};var p9=function p9(a){switch(arguments.length){case 1:return p9.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return p9.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};p9.g=function(a){return new $8(a,null,null,null)};p9.j=function(a,b){var c=$APP.Ai(b);b=$APP.ce.h(c,$APP.ub);c=$APP.ce.h(c,$APP.oj);return new $8(a,b,c,null)};p9.Mf=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};
|
||||||
|
p9.o=1;$APP.k=c9.prototype;$APP.k._peek_at=function(){var a=T8;T8=null;try{return this.jb(null)}finally{T8=a}};$APP.k._handle_change=function(a,b,c){return b===c||this.bf?null:null==this.af?(this.bf=!0,null==d9&&(d9=[],!1===O8.jf&&O8.schedule()),d9.push(this)):!0===this.af?this._run(!1):this.af.g?this.af.g(this):this.af.call(null,this)};
|
||||||
|
$APP.k._update_watching=function(a){var b=$APP.qm(a),c=$APP.qm(this.df);this.df=a;a=$APP.z($APP.yY.h(b,c));for(var d=null,e=0,f=0;;)if(f<e){var l=d.S(null,f);$APP.td(l,this,b9);f+=1}else if(a=$APP.z(a))d=a,$APP.yf(d)?(a=$APP.Dd(d),f=$APP.Ed(d),d=a,e=$APP.Je(a),a=f):(a=$APP.r(d),$APP.td(a,this,b9),a=$APP.t(d),d=null,e=0),f=0;else break;b=$APP.z($APP.yY.h(c,b));c=null;for(e=d=0;;)if(e<d)a=c.S(null,e),$APP.ud(a,this),e+=1;else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),d=$APP.Ed(c),c=b,a=$APP.Je(b),
|
||||||
|
b=d,d=a):(a=$APP.r(c),$APP.ud(a,this),b=$APP.t(c),c=null,d=0),e=0;else return null};$APP.k._queued_run=function(){return this.bf&&null!=this.df?this._run(!0):null};$APP.k._try_capture=function(a){try{return this.lf=null,U8(a,this)}catch(b){return this.lf=this.state=a=b,this.bf=!1}};$APP.k._run=function(a){var b=this.state;a=$APP.n(a)?this._try_capture(this.f):U8(this.f,this);this.vf||(this.state=a,null==this.Bc||$APP.fe.h(b,a)||Y8(this,b,a));return a};
|
||||||
|
$APP.k._set_opts=function(a){var b=$APP.Ai(a);a=$APP.ce.h(b,f9);var c=$APP.ce.h(b,g9),d=$APP.ce.h(b,h9);b=$APP.ce.h(b,y$);null!=a&&(this.af=a);null!=c&&(this.Gf=c);null!=d&&(this.wf=d);return null!=b?this.vf=b:null};$APP.k.O=function(a,b,c){return Z8(b,c,"Reaction",new $APP.m(null,1,[$APP.wn,this.jb(null)],null))};$APP.k.X=function(){return $APP.qa(this)};$APP.k.W=function(a,b){return this===b};
|
||||||
|
$APP.k.rf=function(){var a=this.state,b=this.df;this.af=this.state=this.df=null;this.bf=!0;b=$APP.z($APP.qm(b));for(var c=null,d=0,e=0;;)if(e<d){var f=c.S(null,e);$APP.ud(f,this);e+=1}else if(b=$APP.z(b))c=b,$APP.yf(c)?(b=$APP.Dd(c),e=$APP.Ed(c),c=b,d=$APP.Je(b),b=e):(b=$APP.r(c),$APP.ud(b,this),b=$APP.t(c),c=null,d=0),e=0;else break;null!=this.wf&&this.wf(a);a=this.Kf;if(null==a)return null;b=a.length;for(c=0;;)if(c<b)d=a[c],d.g?d.g(this):d.call(null,this),c+=1;else return null};
|
||||||
|
$APP.k.ne=function(a,b){a=this.state;this.state=b;this.Gf(a,b);Y8(this,a,b);return b};$APP.k.oe=function(a,b){a=this.ne;var c=this._peek_at();b=b.g?b.g(c):b.call(null,c);return a.call(this,null,b)};$APP.k.pe=function(a,b,c){a=this.ne;var d=this._peek_at();b=b.h?b.h(d,c):b.call(null,d,c);return a.call(this,null,b)};$APP.k.qe=function(a,b,c,d){a=this.ne;var e=this._peek_at();b=b.Lf?b.Lf(e,c,d):b.call(null,e,c,d);return a.call(this,null,b)};
|
||||||
|
$APP.k.re=function(a,b,c,d,e){return this.ne(null,$APP.Yb.I(b,this._peek_at(),c,d,e))};$APP.k.mf=function(a,b){Y8(this,a,b)};$APP.k.Qd=function(a,b,c){return W8(this,b,c)};$APP.k.Rd=function(a,b){a=$APP.pf(this.Bc);X8(this,b);return!a&&$APP.pf(this.Bc)&&null==this.af?this.rf(null):null};
|
||||||
|
$APP.k.jb=function(){var a=this.lf;if(null!=a)throw a;(a=null==T8)&&(e9.s?e9.s():e9.call(null));a&&null==this.af?this.bf&&(a=this.state,this.state=this.f.s?this.f.s():this.f.call(null),null==this.Bc||$APP.fe.h(a,this.state)||Y8(this,a,this.state)):(V8(this),this.bf&&this._run(!1));return this.state};K8=e9;var k9=i9(null);var y9,j9=new $APP.m(null,1,[y$,!0],null),B9=new $APP.m(null,2,[J$,null,G$,null],null),s9=function(a){var b=$APP.nj.g($APP.Hi);return function(c){var d=$APP.ce.h($APP.Oc(b),c);if(null!=d)return d;d=a.g?a.g(c):a.call(null,c);$APP.qj.B(b,$APP.E,c,d);return d}}(function(a){if("string"===typeof a)return a;a=$APP.Wh(a);a=$APP.cT(a,/(unsafe|UNSAFE)[-_]/,"UNSAFE_");a=$APP.jT.h(a,/-/);var b=$APP.z(a);a=$APP.r(b);b=$APP.t(b);return $APP.Yb.Lf($APP.q,a,$APP.Yi.h(A8,b))}),G9=new $APP.O(null,5,5,$APP.P,[E$,C$,
|
||||||
|
s$,t$,H$],null);var O9=new $APP.lm(null,new $APP.m(null,6,["url",null,"tel",null,"text",null,"textarea",null,"password",null,"search",null],null),null),h$=new $APP.m(null,4,[u$,"ReagentInput",I$,P9,q$,function(a){return a.nf=null},b$,function(a,b,c,d,e){S9(c);return S8(e,a,b,c,d)}],null);var O$={},g8,l$=/([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/,U9={"class":"className","for":"htmlFor",charset:"charSet"},X9={},k$={},R$=function(a){var b=$APP.Cn.s(),c=$APP.n(z$.g(a))?e$:c$;if("undefined"===typeof K$||"undefined"===typeof L$||"undefined"===typeof O$||"undefined"===typeof g8)g8=function(d,e,f,l){this.Hf=d;this.id=e;this.uf=f;this.Ff=l;this.C=393216;this.J=0},g8.prototype.Z=function(d,e){return new g8(this.Hf,this.id,this.uf,e)},g8.prototype.T=function(){return this.Ff},g8.prototype.If=
|
||||||
|
function(){return this.id},g8.prototype.xf=function(d,e){return"object"!==$APP.pa(e)?e:$APP.xf(e)?m$(e,this,this.uf):$APP.Ff(e)?j$(e,this):E8(e)?$APP.Wh(e):(null!=e?e.C&2147483648||$APP.Ua===e.ba||(e.C?0:$APP.Pb($APP.qd,e)):$APP.Pb($APP.qd,e))?$APP.on.j($APP.Pe([e])):e},g8.prototype.yf=function(d,e,f,l,g){return $9(this,e,f,l,g)},g8.Td=!0,g8.$c="reagent.impl.template/t_reagent$impl$template35072",g8.ue=function(d){return $APP.od(d,"reagent.impl.template/t_reagent$impl$template35072")};return new g8(a,
|
||||||
|
b,c,$APP.Hi)}($APP.Hi);var Ss=function Ss(a){switch(arguments.length){case 1:return Ss.g(arguments[0]);case 2:return Ss.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};Ss.g=function(a){return R8(R$,a)};Ss.h=function(a,b){return R8(b,a)};Ss.o=2;
|
||||||
|
var S$=function S$(a){switch(arguments.length){case 1:return S$.g(arguments[0]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return S$.j(arguments[0],new $APP.Xb(c.slice(1),0,null))}};S$.g=function(a){return p9.g(a)};S$.j=function(a,b){return $APP.Yb.Lf(p9,a,b)};S$.Mf=function(a){var b=$APP.r(a);a=$APP.t(a);return this.j(b,a)};S$.o=1;var f8=z8(1,{});var o$=$APP.nj.g($APP.Hi),T$=function T$(a){switch(arguments.length){case 2:return T$.h(arguments[0],arguments[1]);case 3:return T$.Lf(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.q.g(arguments.length)].join(""));}};T$.h=function(a,b){return T$.Lf(a,b,R$)};
|
||||||
|
T$.Lf=function(a,b,c){e9();c=$APP.jf(c)?new $APP.O(null,2,5,$APP.P,[R$,c],null):new $APP.O(null,2,5,$APP.P,[c,B$.g(c)],null);var d=$APP.B.Lf(c,0,null);c=$APP.B.Lf(c,1,null);return p$(function(){return R8(d,$APP.jf(a)?a.s?a.s():a.call(null):a)},b,c)};T$.o=3;var i8=$APP.gU(x$,null),j8=new $APP.m(null,2,[$APP.YI,function(){var a=new $APP.de(function(){return S$},F$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[x$,$APP.YI,"reagent/core.cljs",11,new $APP.m(null,6,[$APP.aO,!0,$APP.Cs,1,$APP.Mt,1,$APP.hu,new $APP.O(null,1,5,$APP.P,[new $APP.O(null,1,5,$APP.P,[ct],null)],null),$APP.V,$APP.I(new $APP.O(null,1,5,$APP.P,[ct],null),new $APP.O(null,3,5,$APP.P,[ct,$APP.Wo,$APP.xL],null)),$APP.tC,$APP.I(null,null)],
|
||||||
|
null),1,211,211,$APP.I(new $APP.O(null,1,5,$APP.P,[ct],null),new $APP.O(null,3,5,$APP.P,[ct,$APP.Wo,$APP.xL],null)),"Like clojure.core/atom, except that it keeps track of derefs.\n Reagent components that derefs one of these are automatically\n re-rendered.",$APP.n(S$)?S$.fg:null])),b=$APP.Oc(a);a=$APP.F(a);var c=i8.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,i8,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.bj(d,b,
|
||||||
|
c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}(),Rs,function(){var a=new $APP.de(function(){return Ss},Ns,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[x$,Rs,"reagent/core.cljs",17,new $APP.m(null,6,[$APP.aO,!1,$APP.Cs,2,$APP.Mt,2,$APP.hu,new $APP.O(null,2,5,$APP.P,[new $APP.O(null,1,5,$APP.P,[$APP.Ho],null),new $APP.O(null,2,5,$APP.P,[$APP.Ho,Ls],null)],null),$APP.V,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.Ho],null),new $APP.O(null,2,5,
|
||||||
|
$APP.P,[$APP.Ho,Ls],null)),$APP.tC,$APP.I(null,null)],null),1,46,46,$APP.I(new $APP.O(null,1,5,$APP.P,[$APP.Ho],null),new $APP.O(null,2,5,$APP.P,[$APP.Ho,Ls],null)),"Turns a vector of Hiccup syntax into a React element. Returns form\n unchanged if it is not a vector.",$APP.n(Ss)?Ss.fg:null])),b=$APP.Oc(a);a=$APP.F(a);var c=i8.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,i8,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.bj(d,
|
||||||
|
b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null),l8=$APP.gU(A$,null),m8=new $APP.m(null,1,[D$,function(){var a=new $APP.de(function(){return T$},v$,$APP.Hl([$APP.U,$APP.T,$APP.xM,$APP.Tq,$APP.By,$APP.oF,$APP.Xp,$APP.dH,$APP.V,$APP.S,$APP.WN],[A$,D$,"reagent/dom.cljs",13,new $APP.m(null,6,[$APP.aO,!1,$APP.Cs,3,$APP.Mt,3,$APP.hu,new $APP.O(null,2,5,$APP.P,[new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)],null),$APP.V,$APP.I(new $APP.O(null,
|
||||||
|
2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),$APP.tC,$APP.I(null,null)],null),1,29,29,$APP.I(new $APP.O(null,2,5,$APP.P,[$APP.wQ,r$],null),new $APP.O(null,3,5,$APP.P,[$APP.wQ,r$,w$],null)),"Render a Reagent component into the DOM. The first argument may be\n either a vector (using Reagent's Hiccup syntax), or a React element.\n The second argument should be a DOM node.\n\n Optionally takes a callback that is called when the component is in place.\n\n Returns the mounted component instance.",
|
||||||
|
$APP.n(T$)?T$.fg:null])),b=$APP.Oc(a);a=$APP.F(a);var c=l8.l(null),d=$APP.T.g(a);$APP.y.h($APP.q.g(c),$APP.q.g(d));c=new $APP.m(null,4,[$APP.U,l8,$APP.T,d,$APP.V,$APP.V.g(a),$APP.S,$APP.S.g(a)],null);return $APP.n($APP.yQ.g(a))?$APP.bj(d,b,c):$APP.n($APP.hq.g(a))?$APP.k8(d,b,c):new $APP.BU(b,d,c)}()],null);$APP.qj.Lf($APP.nc,$APP.dj,new $APP.m(null,1,[$APP.Cr,new $APP.m(null,2,[x$,j8,A$,m8],null)],null));
|
||||||
|
}).call(this);
|
133
package-lock.json
generated
133
package-lock.json
generated
|
@ -1,133 +0,0 @@
|
||||||
{
|
|
||||||
"name": "scittle",
|
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"devDependencies": {
|
|
||||||
"react": "17.0.1",
|
|
||||||
"react-dom": "17.0.1"
|
|
||||||
},
|
|
||||||
"version": "0.7.27"
|
|
||||||
},
|
|
||||||
"node_modules/js-tokens": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/loose-envify": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
|
||||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"loose-envify": "cli.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/object-assign": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react": {
|
|
||||||
"version": "17.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
|
|
||||||
"integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/react-dom": {
|
|
||||||
"version": "17.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
|
|
||||||
"integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1",
|
|
||||||
"scheduler": "^0.20.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "17.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/scheduler": {
|
|
||||||
"version": "0.20.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
|
||||||
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"js-tokens": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"loose-envify": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
|
||||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"object-assign": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"react": {
|
|
||||||
"version": "17.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
|
|
||||||
"integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"react-dom": {
|
|
||||||
"version": "17.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
|
|
||||||
"integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1",
|
|
||||||
"scheduler": "^0.20.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scheduler": {
|
|
||||||
"version": "0.20.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
|
|
||||||
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"loose-envify": "^1.1.0",
|
|
||||||
"object-assign": "^4.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "0.7.27"
|
|
||||||
}
|
|
11
package.json
11
package.json
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"name": "scittle",
|
|
||||||
"version": "0.7.27",
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"react": "17.0.1",
|
|
||||||
"react-dom": "17.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{:deps
|
|
||||||
{datascript/datascript {:mvn/version "1.3.12"}
|
|
||||||
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
|
||||||
:exclusions [org.babashka/sci]}}}
|
|
|
@ -1,9 +0,0 @@
|
||||||
(ns scittle.datascript
|
|
||||||
{:no-doc true}
|
|
||||||
(:require [sci.configs.tonsky.datascript :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(defn init []
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::datascript
|
|
||||||
config))
|
|
|
@ -1,12 +0,0 @@
|
||||||
[{:name scittle/datascript
|
|
||||||
:namespaces [datascript.core datascript.db]
|
|
||||||
:js "./scittle.datascript.js"
|
|
||||||
:shadow-config
|
|
||||||
{:compiler-options {:externs ["datascript/externs.js"]}
|
|
||||||
:modules
|
|
||||||
{:scittle.datascript
|
|
||||||
{:init-fn scittle.datascript/init
|
|
||||||
;; From https://github.com/tonsky/datascript/issues/298#issuecomment-813790783
|
|
||||||
:prepend "globalThis.datascript = {};"
|
|
||||||
:depends-on #{:scittle}
|
|
||||||
:entries [datascript.core]}}}}]
|
|
|
@ -1,8 +0,0 @@
|
||||||
{:deps
|
|
||||||
{no.cjohansen/dataspex {:git/url "https://github.com/cjohansen/dataspex"
|
|
||||||
:git/sha "02112200651c2bd932907bb69fba1ff50b881741"
|
|
||||||
:exclusions [ring/ring-core
|
|
||||||
ring/ring-jetty-adapter
|
|
||||||
com.cognitect/transit-clj]}
|
|
||||||
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
|
||||||
:exclusions [org.babashka/sci]}}}
|
|
|
@ -1,9 +0,0 @@
|
||||||
(ns scittle.dataspex
|
|
||||||
{:no-doc true}
|
|
||||||
(:require [sci.configs.cjohansen.dataspex :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(defn init []
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::dataspex
|
|
||||||
config))
|
|
|
@ -1,8 +0,0 @@
|
||||||
[{:name scittle/dataspex
|
|
||||||
:namespaces [dataspex.core]
|
|
||||||
:js "./scittle.dataspex.js"
|
|
||||||
:shadow-config
|
|
||||||
{:modules
|
|
||||||
{:scittle.dataspex {:init-fn scittle.dataspex/init
|
|
||||||
:depends-on #{:scittle :scittle.datascript}
|
|
||||||
:entries [dataspex.core]}}}}]
|
|
|
@ -1,29 +0,0 @@
|
||||||
# Demo
|
|
||||||
|
|
||||||
A demo project of a custom scittle build.
|
|
||||||
|
|
||||||
This demo project uses the `scittle.javelin` and `scittle.hoplon` plugins which aren't part of the normal scittle distribution.
|
|
||||||
|
|
||||||
To produce release `.js` files, run: `bb release`.
|
|
||||||
|
|
||||||
See:
|
|
||||||
|
|
||||||
- `bb.edn` with
|
|
||||||
- `:deps` which includes:
|
|
||||||
- a dependency on the `scittle.build` project to build scittle + custom features
|
|
||||||
- zero or more plugin dependencies
|
|
||||||
- helpers like static file server
|
|
||||||
- development `:tasks`. Run `bb dev` for development and `bb release` to produce release artifacts.
|
|
||||||
- `deps.edn`: this only contains a dependency on scittle itself
|
|
||||||
|
|
||||||
Available plugins are in the `plugins` directory inside the top level directory of this repo.
|
|
||||||
|
|
||||||
Writing a plugin involves writing
|
|
||||||
|
|
||||||
- SCI configuration (this can be shared via the [sci.configs](https://github.com/babashka/sci.configs) project too)
|
|
||||||
- Adding a `scittle_plugin.edn` file on the plugin's classpath (e.g. in the `src` directory). This EDN file contains:
|
|
||||||
- `:name`, name of the plugin
|
|
||||||
- `:namespaces`: the namespaces exposed to SCI
|
|
||||||
- `:js`: the name of the produced `.js` module file
|
|
||||||
- `:shadow-config`: the shadow-cljs configuration specific to this plugin
|
|
||||||
- A `.cljs` file with an `init` function which calls `scittle/register-plugin!`.
|
|
|
@ -1,22 +0,0 @@
|
||||||
{:deps {io.github.babashka/scittle.build {:local/root "../../build"}
|
|
||||||
;; datascript plugin
|
|
||||||
; io.github.babashka/scittle.datascript {:local/root "../../plugins/datascript"}
|
|
||||||
io.github.babashka/scittle.dataspex {:local/root "../../plugins/dataspex"}
|
|
||||||
io.github.babashka/scittle.javelin {:local/root "../../plugins/javelin"}
|
|
||||||
io.github.babashka/scittle.hoplon {:local/root "../../plugins/hoplon"}
|
|
||||||
io.github.babashka/http-server
|
|
||||||
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}
|
|
||||||
:tasks
|
|
||||||
{:requires ([scittle.build :as build])
|
|
||||||
watch {:doc "Watch build"
|
|
||||||
:task (build/build {:action "watch"})}
|
|
||||||
serve {:doc "Starts http server for serving static files"
|
|
||||||
:requires ([babashka.http-server :as http])
|
|
||||||
:task (do (http/serve {:port 1341 :dir "resources/public"})
|
|
||||||
(println "Serving static assets at http://localhost:1341"))}
|
|
||||||
-dev {:depends [watch serve]}
|
|
||||||
dev {:doc "Run compilation in watch mode and start http server"
|
|
||||||
:task (do (run '-dev {:parallel true})
|
|
||||||
(deref (promise)))}
|
|
||||||
release {:doc "Release build (advanced compiled JS)"
|
|
||||||
:task (build/build {})}}}
|
|
|
@ -1 +0,0 @@
|
||||||
{:deps {io.github.babashka/scittle {:local/root "../.."}}}
|
|
|
@ -1,21 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<!-- <link rel="stylesheet" href="/css/style.css"> -->
|
|
||||||
<script src="/js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script src="/js/scittle.javelin.js" type="application/javascript"></script>
|
|
||||||
<script src="/js/scittle.hoplon.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(require '[hoplon.core :as h])
|
|
||||||
(require '[javelin.core :as j])
|
|
||||||
|
|
||||||
(j/defc title "From Hoplon")
|
|
||||||
(h/body
|
|
||||||
(h/h1 (h/text "~{title}")))
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Hello Hoplon!</h1>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,32 +0,0 @@
|
||||||
{:deps
|
|
||||||
{:aliases [:dev]}
|
|
||||||
|
|
||||||
:dev-http
|
|
||||||
{8000 "classpath:public"}
|
|
||||||
|
|
||||||
:builds
|
|
||||||
{:main
|
|
||||||
{:target :browser
|
|
||||||
:js-options
|
|
||||||
{:resolve {"react" {:target :global
|
|
||||||
:global "React"}
|
|
||||||
"react-dom" {:target :global
|
|
||||||
:global "ReactDOM"}}}
|
|
||||||
:modules
|
|
||||||
{:scittle {:entries [scittle.core]}
|
|
||||||
:scittle.nrepl {:entries [scittle.nrepl]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.promesa {:entries [scittle.promesa]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.pprint {:entries [scittle.pprint]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.reagent {:entries [scittle.reagent]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.re-frame {:entries [scittle.re-frame]
|
|
||||||
:depends-on #{:scittle.reagent
|
|
||||||
:scittle}}
|
|
||||||
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
|
|
||||||
:depends-on #{:scittle}}}
|
|
||||||
:build-hooks [(shadow.cljs.build-report/hook)]
|
|
||||||
:output-dir "resources/public/js"
|
|
||||||
:devtools {:repl-pprint true}}}}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{:deps
|
|
||||||
{hoplon/hoplon {:mvn/version "7.5.0"}
|
|
||||||
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
|
||||||
:exclusions [org.babashka/sci]}}}
|
|
|
@ -1,9 +0,0 @@
|
||||||
(ns scittle.hoplon
|
|
||||||
{:no-doc true}
|
|
||||||
(:require [sci.configs.hoplon.hoplon :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(defn init []
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::hoplon
|
|
||||||
config))
|
|
|
@ -1,9 +0,0 @@
|
||||||
(ns scittle.javelin
|
|
||||||
{:no-doc true}
|
|
||||||
(:require [sci.configs.hoplon.javelin :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(defn init []
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::javelin
|
|
||||||
config))
|
|
|
@ -1,13 +0,0 @@
|
||||||
[{:name scittle/hoplon
|
|
||||||
:namespaces [javelin.core
|
|
||||||
hoplon.core
|
|
||||||
hoplon.dom]
|
|
||||||
:js "./scittle.hoplon.js"
|
|
||||||
:shadow-config
|
|
||||||
{:modules
|
|
||||||
{:scittle.hoplon {:init-fn scittle.hoplon/init
|
|
||||||
:depends-on #{:scittle :scittle.javelin}
|
|
||||||
:entries [hoplon.core hoplon.dom]}
|
|
||||||
:scittle.javelin {:init-fn scittle.javelin/init
|
|
||||||
:depends-on #{:scittle}
|
|
||||||
:entries [javelin.core]}}}}]
|
|
|
@ -1,4 +0,0 @@
|
||||||
{:deps
|
|
||||||
{hoplon/javelin {:mvn/version "3.9.3"}
|
|
||||||
io.github.babashka/sci.configs {:git/sha "aa84a1b4f1fe45735e5b748769309fc842f737c1"
|
|
||||||
:exclusions [org.babashka/sci]}}}
|
|
|
@ -1,9 +0,0 @@
|
||||||
(ns scittle.javelin
|
|
||||||
{:no-doc true}
|
|
||||||
(:require [sci.configs.hoplon.javelin :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(defn init []
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::javelin
|
|
||||||
config))
|
|
|
@ -1,8 +0,0 @@
|
||||||
[{:name scittle/javelin
|
|
||||||
:namespaces [javelin.core]
|
|
||||||
:js "./scittle.javelin.js"
|
|
||||||
:shadow-config
|
|
||||||
{:modules
|
|
||||||
{:scittle.javelin {:init-fn scittle.javelin/init
|
|
||||||
:depends-on #{:scittle}
|
|
||||||
:entries [javelin.core]}}}}]
|
|
743
report.html
Normal file
743
report.html
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,56 +0,0 @@
|
||||||
(require '[clojure.string :as str])
|
|
||||||
(declare cm)
|
|
||||||
|
|
||||||
(defn eval-me []
|
|
||||||
(js/scittle.core.eval_string (-> cm .-state .-doc .toString)))
|
|
||||||
|
|
||||||
(def extension
|
|
||||||
(.of js/cv.keymap
|
|
||||||
(clj->js [{:key "Mod-Enter"
|
|
||||||
:run (fn []
|
|
||||||
(eval-me))}
|
|
||||||
#_{:key (str modifier "-Enter")
|
|
||||||
:shift (partial eval-top-level on-result)
|
|
||||||
:run (partial eval-at-cursor on-result)}])))
|
|
||||||
(def cm
|
|
||||||
(let [doc (str/trim "
|
|
||||||
(require '[reagent.core :as r]
|
|
||||||
'[reagent.dom :as rdom]
|
|
||||||
'[re-frame.core :as rf])
|
|
||||||
|
|
||||||
(rf/reg-event-fx ::click (fn [{:keys [db]} _] {:db (update db :clicks (fnil inc 0))}))
|
|
||||||
(rf/reg-sub ::clicks (fn [db] (:clicks db)))
|
|
||||||
|
|
||||||
(defn my-component []
|
|
||||||
(let [clicks (rf/subscribe [::clicks])]
|
|
||||||
[:div
|
|
||||||
[:p \"Clicks: \" @clicks]
|
|
||||||
[:p [:button {:on-click #(rf/dispatch [::click])}
|
|
||||||
\"Click me!\"]]]))
|
|
||||||
|
|
||||||
(rdom/render [my-component] (.getElementById js/document \"reagent\"))
|
|
||||||
")]
|
|
||||||
(js/cm.EditorView. #js {:doc doc
|
|
||||||
:extensions #js [js/cm.basicSetup, (js/lc.clojure), (.highest js/cs.Prec extension)]
|
|
||||||
:parent (js/document.querySelector "#app")
|
|
||||||
#_#_:dispatch (fn [tr] (-> cm (.update #js [tr])) (eval-me))
|
|
||||||
})))
|
|
||||||
(set! (.-eval_me js/globalThis) eval-me)
|
|
||||||
(set! (.-cm_instance js/globalThis) cm)
|
|
||||||
|
|
||||||
(defn linux? []
|
|
||||||
(some? (re-find #"(Linux)|(X11)" js/navigator.userAgent)))
|
|
||||||
|
|
||||||
(defn mac? []
|
|
||||||
(and (not (linux?))
|
|
||||||
(some? (re-find #"(Mac)|(iPhone)|(iPad)|(iPod)" js/navigator.platform))))
|
|
||||||
|
|
||||||
(let [elt (js/document.getElementById "evalMe")
|
|
||||||
txt (.-innerText elt)
|
|
||||||
mod-symbol (if (mac?)
|
|
||||||
"⌘"
|
|
||||||
"⌃")
|
|
||||||
txt (str txt " " mod-symbol"-⏎")]
|
|
||||||
(set! (.-innerHTML elt) txt))
|
|
||||||
|
|
||||||
(eval-me)
|
|
|
@ -1,15 +0,0 @@
|
||||||
(ns nrepl-playground)
|
|
||||||
|
|
||||||
(+ 1 2 3)
|
|
||||||
|
|
||||||
(->
|
|
||||||
(js/document.getElementsByTagName "body")
|
|
||||||
first
|
|
||||||
(.append
|
|
||||||
(doto (js/document.createElement "p")
|
|
||||||
(.append
|
|
||||||
(js/document.createTextNode "there")))))
|
|
||||||
|
|
||||||
(defn foo [])
|
|
||||||
|
|
||||||
(js/alert "Isn't this cool? :)")
|
|
|
@ -1,33 +0,0 @@
|
||||||
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/core.cljs
|
|
||||||
|
|
||||||
(ns replicant-tictactoe.core
|
|
||||||
(:require [replicant.dom :as r]
|
|
||||||
[replicant-tictactoe.game :as game]
|
|
||||||
[replicant-tictactoe.ui :as ui]))
|
|
||||||
|
|
||||||
(defn start-new-game [store]
|
|
||||||
(reset! store (game/create-game {:size 3})))
|
|
||||||
|
|
||||||
(defn main []
|
|
||||||
;; Set up the atom
|
|
||||||
(let [store (atom nil)
|
|
||||||
el (js/document.getElementById "app")]
|
|
||||||
|
|
||||||
;; Globally handle DOM events
|
|
||||||
(r/set-dispatch!
|
|
||||||
(fn [_ [action & args]]
|
|
||||||
(case action
|
|
||||||
:tic (apply swap! store game/tic args)
|
|
||||||
:reset (start-new-game store))))
|
|
||||||
|
|
||||||
;; Render on every change
|
|
||||||
(add-watch store ::render
|
|
||||||
(fn [_ _ _ game]
|
|
||||||
(->> (ui/game->ui-data game)
|
|
||||||
ui/render-game
|
|
||||||
(r/render el))))
|
|
||||||
|
|
||||||
;; Trigger the first render by initializing the game.
|
|
||||||
(start-new-game store)))
|
|
||||||
|
|
||||||
(main)
|
|
|
@ -1,41 +0,0 @@
|
||||||
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/game.cljs
|
|
||||||
|
|
||||||
(ns replicant-tictactoe.game)
|
|
||||||
|
|
||||||
(defn create-game [{:keys [size]}]
|
|
||||||
{:next-player :x
|
|
||||||
:size size})
|
|
||||||
|
|
||||||
(def next-player {:x :o, :o :x})
|
|
||||||
|
|
||||||
(defn winner? [tics path]
|
|
||||||
(when (= 1 (count (set (map tics path))))
|
|
||||||
path))
|
|
||||||
|
|
||||||
(defn get-winning-path [{:keys [size tics]} y x]
|
|
||||||
(or (winner? tics (mapv #(vector y %) (range 0 size)))
|
|
||||||
(winner? tics (mapv #(vector % x) (range 0 size)))
|
|
||||||
(when (= y x)
|
|
||||||
(winner? tics (mapv #(vector % %) (range 0 size))))))
|
|
||||||
|
|
||||||
(defn maybe-conclude [game y x]
|
|
||||||
(if-let [path (get-winning-path game y x)]
|
|
||||||
(-> (dissoc game :next-player)
|
|
||||||
(assoc :over? true
|
|
||||||
:victory {:player (get-in game [:tics [y x]])
|
|
||||||
:path path}))
|
|
||||||
(let [tie? (= (count (:tics game)) (* (:size game) (:size game)))]
|
|
||||||
(cond-> game
|
|
||||||
tie? (dissoc :next-player)
|
|
||||||
tie? (assoc :over? true)))))
|
|
||||||
|
|
||||||
(defn tic [game y x]
|
|
||||||
(let [player (:next-player game)]
|
|
||||||
(if (or (get-in game [:tics [y x]])
|
|
||||||
(<= (:size game) x)
|
|
||||||
(<= (:size game) y))
|
|
||||||
game
|
|
||||||
(-> game
|
|
||||||
(assoc-in [:tics [y x]] player)
|
|
||||||
(assoc :next-player (next-player player))
|
|
||||||
(maybe-conclude y x)))))
|
|
|
@ -1,50 +0,0 @@
|
||||||
/* COPIED from https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/resources/public/styles.css */
|
|
||||||
.cell {
|
|
||||||
aspect-ratio: 1 / 1;
|
|
||||||
background: rgba(255, 255, 255, 0.8);
|
|
||||||
border-radius: 6%;
|
|
||||||
border: none;
|
|
||||||
display: block;
|
|
||||||
flex: 1 1 0%;
|
|
||||||
outline: none;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-content {
|
|
||||||
opacity: 1;
|
|
||||||
transition: opacity 0.25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.transparent {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-dim {
|
|
||||||
background: rgba(249, 249, 240, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cell-highlight {
|
|
||||||
background: #fcfcf3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.board {
|
|
||||||
--gap: 0.75rem;
|
|
||||||
background: #833ab4;
|
|
||||||
background: linear-gradient(90deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--gap);
|
|
||||||
padding: var(--gap);
|
|
||||||
max-width: 80vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: var(--gap);
|
|
||||||
}
|
|
|
@ -1,75 +0,0 @@
|
||||||
;; COPIED FROM https://github.com/cjohansen/replicant-tic-tac-toe/blob/7a33fb12f0cd6658b2f555ff673dee031d4aa921/src/tic_tac_toe/ui.cljs
|
|
||||||
|
|
||||||
(ns replicant-tictactoe.ui)
|
|
||||||
|
|
||||||
(def mark-x
|
|
||||||
[:svg {:xmlns "http://www.w3.org/2000/svg"
|
|
||||||
:viewBox "0 -10 108 100"}
|
|
||||||
[:path
|
|
||||||
{:fill "currentColor"
|
|
||||||
:d "m1.753 69.19.36-1.08q.35-1.09 1.92-2.97 1.58-1.87 3.85-3.84 2.29-1.97 4.6-3.54 2.31-1.57 4.93-3.24 2.62-1.66 4.65-2.9 2.04-1.23 3.91-2.27 1.87-1.05 3.98-2.31 2.11-1.27 4.12-2.5 2.01-1.24 4.33-2.51l4.6-2.52q2.27-1.25 4.84-2.86 2.56-1.62 5.03-3.09 2.47-1.47 4.5-2.88 2.03-1.4 3.82-2.82t3.81-3.47q2.01-2.06 3.7-3.51 1.69-1.46 3.47-3.03 1.77-1.57 4.01-3.69 2.24-2.11 4.13-3.7 1.89-1.58 3.93-2.97 2.04-1.39 4.05-2.49 2.01-1.11 5.26-2.54 3.24-1.44 4.48-1.46 1.24-.01 2.42.37 1.18.37 2.18 1.11 1 .74 1.71 1.75.71 1.02 1.06 2.21.34 1.19.3 2.43-.05 1.24-.5 2.39-.44 1.16-1.23 2.12-.79.95-1.84 1.61-1.05.65-2.26.94-1.21.28-2.44.16-1.23-.11-2.37-.62-1.13-.5-2.04-1.34-.91-.84-1.51-1.93-.6-1.08-.81-2.3-.22-1.22-.04-2.45.18-1.23.75-2.33.56-1.1 1.45-1.97.89-.86 2.01-1.4 1.11-.54 2.35-.69 1.23-.15 2.44.1t2.29.87q1.07.63 1.88 1.56.82.93 1.29 2.08.48 1.14.56 2.38.09 1.24-.23 2.44-.31 1.19-.99 2.23-.68 1.04-1.66 1.8-.98.76-2.15 1.18l-1.16.41-2.28 1.17q-2.28 1.18-4.38 2.7-2.1 1.51-4.2 3.44-2.1 1.92-4.18 3.7-2.08 1.77-3.9 3.44-1.81 1.68-3.41 3.13-1.6 1.46-3.38 3.09-1.79 1.62-3.44 2.97-1.66 1.34-3.53 2.4-1.88 1.06-4.17 2.65-2.3 1.6-4.79 2.74-2.48 1.14-4.98 2.71-2.5 1.57-4.51 2.47-2.01.9-3.99 1.87-1.98.97-3.88 2.02-1.91 1.05-4.38 2.34-2.46 1.28-4.94 2.53-2.47 1.25-4.48 2.38-2 1.12-3.96 2.14-1.95 1.01-3.83 1.99-1.89.98-4.37 2.05-2.48 1.06-2.96 2.01-.48.96-.78 1.49-.3.53-.71.97-.41.44-.92.77-.51.34-1.09.54-.57.2-1.17.25-.6.06-1.2-.03t-1.16-.32q-.56-.23-1.05-.59-.49-.35-.89-.82-.39-.46-.65-1.01-.27-.54-.4-1.14-.13-.59-.12-1.19.02-.6.18-1.19l.16-.59Z"}]
|
|
||||||
[:path
|
|
||||||
{:fill "currentColor"
|
|
||||||
:d "m28.099 4.991 2.69 1.97q2.69 1.96 4.5 3.22 1.8 1.28 4.54 3.46 2.74 2.18 4.57 3.89t3.38 3.72q1.54 2.02 2.88 4.3 1.34 2.28 2.83 4.46 1.48 2.18 2.63 4.14 1.15 1.96 2.74 4.07 1.59 2.1 3.59 4.19 1.99 2.08 4.23 4.48 2.24 2.4 3.7 4.04 1.47 1.64 2.91 3.23 1.44 1.59 3.08 3.58 1.64 1.99 3.51 4.08 1.87 2.09 3.55 3.77 1.69 1.68 4.1 3.51 2.42 1.83 3.9 2.58 1.48.74 2.14 1.34.66.6 1.15 1.33.5.74.8 1.57.31.84.4 1.72.1.88-.02 1.76-.12.88-.44 1.71-.33.82-.84 1.55-.51.72-1.19 1.3-.67.58-1.46.98-.79.41-1.65.61-.87.2-1.76.19-.88-.01-1.74-.24-.86-.22-1.64-.64-.78-.42-2.27-2.72-1.48-2.3-1.52-3.49-.03-1.19.31-2.33.35-1.14 1.04-2.11.69-.97 1.66-1.67.96-.7 2.1-1.05 1.14-.35 2.33-.32 1.19.02 2.31.43t2.05 1.15q.93.75 1.58 1.75.64 1 .93 2.15.29 1.16.2 2.35-.09 1.18-.56 2.28-.47 1.1-1.26 1.99-.79.88-1.83 1.47t-2.2.82q-1.17.23-2.35.07-1.19-.16-2.25-.68-1.07-.53-1.92-1.37-.84-.84-1.37-1.9-.54-1.07-.7-2.25-.17-1.18.06-2.35.22-1.17.8-2.21.58-1.04 1.47-1.84.88-.79 1.98-1.27 1.09-.47 2.28-.57 1.18-.1 2.34.18 1.16.29 2.16.93 1.01.63 1.76 1.56.74.93-.33-.26-1.07-1.18-.41-.58.66.59 1.15 1.33.5.74.8 1.57.31.83.4 1.72.1.88-.02 1.76-.12.88-.44 1.7-.33.83-.84 1.55-.51.73-1.19 1.31-.67.58-1.46.98-.79.41-1.65.61-.87.2-1.75.19-.89-.01-1.75-.24-.86-.22-1.64-.64-.78-.42-2.73-1.57-1.95-1.14-4.26-2.95-2.31-1.8-3.87-3.43-1.57-1.62-3.17-3.29-1.6-1.66-3.55-4.05-1.95-2.39-3.33-4.15-1.39-1.76-2.77-3.4-1.38-1.64-3.07-3.56-1.7-1.91-3.91-4.13-2.2-2.22-3.74-4.1-1.54-1.88-2.79-3.75-1.24-1.87-2.4-4.33t-2.39-4.46q-1.23-2.01-2.4-4.59-1.17-2.59-2.53-5.01-1.36-2.43-3.35-4.44-1.99-2.02-4.52-4.27-2.54-2.25-5.33-4.04-2.81-1.79-3.28-2.21-.47-.41-.83-.92-.35-.51-.58-1.1-.22-.58-.3-1.2-.08-.62-.01-1.23.08-.62.29-1.21.22-.58.58-1.1.35-.51.81-.93.47-.42 1.02-.71t1.16-.45q.61-.15 1.23-.15t1.22.14q.61.15 1.17.44l.55.28Z"}]])
|
|
||||||
|
|
||||||
(def mark-o
|
|
||||||
[:svg {:xmlns "http://www.w3.org/2000/svg"
|
|
||||||
:viewBox "0 0 114 114"}
|
|
||||||
[:path
|
|
||||||
{:fill "none"
|
|
||||||
:stroke "currentColor"
|
|
||||||
:stroke-linecap "round"
|
|
||||||
:stroke-width "6"
|
|
||||||
:d "M74.616 8.935c7.73 2.38 15.96 9.34 21.58 16.04 5.63 6.69 10.57 15.46 12.18 24.11 1.6 8.65.74 19.67-2.53 27.77-3.27 8.11-10.12 15.37-17.09 20.88-6.98 5.51-16.07 10.81-24.76 12.17-8.7 1.35-19.32-.76-27.42-4.06-8.1-3.29-15.73-8.93-21.21-15.73-5.48-6.81-10.32-16.5-11.67-25.09-1.35-8.6.19-18.39 3.57-26.51 3.38-8.11 9.99-16.6 16.71-22.19 6.72-5.59 13.95-10.52 23.63-11.36 9.68-.84 28.04 4.34 34.45 6.32 6.42 1.97 4.37 4.6 4.04 5.55m-48.33-9.69c7.65-3.32 19.78-3.63 28.63-2.01 8.86 1.63 17.85 5.89 24.49 11.76 6.64 5.87 12.7 15.08 15.37 23.48 2.67 8.41 2.5 18.4.65 26.95-1.85 8.54-5.98 17.59-11.77 24.34-5.78 6.74-14.56 13.05-22.93 16.11-8.37 3.06-18.75 4.19-27.29 2.25-8.54-1.93-17.37-7.89-23.96-13.87-6.59-5.97-12.89-13.58-15.57-21.96-2.69-8.39-2.31-19.94-.56-28.34 1.75-8.4 5.21-15.74 11.06-22.09 5.85-6.35 19.92-13.32 24.04-16.01 4.12-2.7.37-1.1.67-.16"}]])
|
|
||||||
|
|
||||||
(defn render-cell [{:keys [content on-click dim? highlight? clickable?]}]
|
|
||||||
[:button.cell
|
|
||||||
{:on {:click on-click}
|
|
||||||
:class (cond-> []
|
|
||||||
dim? (conj "cell-dim")
|
|
||||||
highlight? (conj "cell-highlight")
|
|
||||||
clickable? (conj "clickable"))}
|
|
||||||
(when content
|
|
||||||
[:div.cell-content
|
|
||||||
{:replicant/mounting {:class "transparent"}
|
|
||||||
:replicant/unmounting {:class "transparent"}}
|
|
||||||
content])])
|
|
||||||
|
|
||||||
(defn render-board [{:keys [rows]}]
|
|
||||||
[:div.board
|
|
||||||
(for [row rows]
|
|
||||||
[:div.row
|
|
||||||
(for [cell row]
|
|
||||||
(render-cell cell))])])
|
|
||||||
|
|
||||||
(defn render-game [{:keys [board button]}]
|
|
||||||
[:div
|
|
||||||
(render-board board)
|
|
||||||
(when button
|
|
||||||
[:button {:on {:click (:on-click button)}
|
|
||||||
:style {:margin-top 20
|
|
||||||
:font-size 20}}
|
|
||||||
(:text button)])])
|
|
||||||
|
|
||||||
(def player->mark
|
|
||||||
{:x mark-x
|
|
||||||
:o mark-o})
|
|
||||||
|
|
||||||
(defn game->ui-data [{:keys [size tics victory over?]}]
|
|
||||||
(let [highlight? (set (:path victory))]
|
|
||||||
{:button (when over?
|
|
||||||
{:text "Start over"
|
|
||||||
:on-click [:reset]})
|
|
||||||
:board
|
|
||||||
{:rows
|
|
||||||
(for [y (range size)]
|
|
||||||
(for [x (range size)]
|
|
||||||
(if-let [player (get tics [y x])]
|
|
||||||
(let [victorious? (highlight? [y x])]
|
|
||||||
(cond-> {:content (player->mark player)}
|
|
||||||
victorious? (assoc :highlight? true)
|
|
||||||
(and over? (not victorious?)) (assoc :dim? true)))
|
|
||||||
(if over?
|
|
||||||
{:dim? true}
|
|
||||||
{:clickable? true
|
|
||||||
:on-click [:tic y x]}))))}}))
|
|
|
@ -1,57 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script async src="https://ga.jspm.io/npm:es-module-shims@1.6.1/dist/es-module-shims.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.js"></script>
|
|
||||||
<script>scittle.core.disable_auto_eval();</script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.reagent.js"> </script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.re-frame.js"> </script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/dist/scittle.promesa.js"> </script>
|
|
||||||
|
|
||||||
<script type="importmap">
|
|
||||||
{
|
|
||||||
"imports": {
|
|
||||||
"codemirror": "https://cdn.jsdelivr.net/npm/codemirror/dist/index.js",
|
|
||||||
"@codemirror/commands": "https://cdn.jsdelivr.net/npm/@codemirror/commands/dist/index.js",
|
|
||||||
"@codemirror/search": "https://cdn.jsdelivr.net/npm/@codemirror/search/dist/index.js",
|
|
||||||
"@codemirror/autocomplete": "https://cdn.jsdelivr.net/npm/@codemirror/autocomplete/dist/index.js",
|
|
||||||
"@codemirror/lint": "https://cdn.jsdelivr.net/npm/@codemirror/lint/dist/index.js",
|
|
||||||
"crelt": "https://cdn.jsdelivr.net/npm/crelt/index.es.js",
|
|
||||||
"@nextjournal/lang-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lang-clojure/dist/index.js",
|
|
||||||
"@nextjournal/lezer-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lezer-clojure/dist/index.es.js",
|
|
||||||
"@lezer/highlight": "https://cdn.jsdelivr.net/npm/@lezer/highlight/dist/index.js",
|
|
||||||
"@lezer/lr": "https://cdn.jsdelivr.net/npm/@lezer/lr/dist/index.js",
|
|
||||||
"@lezer/common": "https://cdn.jsdelivr.net/npm/@lezer/common/dist/index.js",
|
|
||||||
"@codemirror/language": "https://cdn.jsdelivr.net/npm/@codemirror/language/dist/index.js",
|
|
||||||
"@marijn/find-cluster-break": "https://cdn.jsdelivr.net/npm/@marijn/find-cluster-break",
|
|
||||||
"@codemirror/state": "https://cdn.jsdelivr.net/npm/@codemirror/state/dist/index.js",
|
|
||||||
"@codemirror/view": "https://cdn.jsdelivr.net/npm/@codemirror/view/dist/index.js",
|
|
||||||
"style-mod": "https://cdn.jsdelivr.net/npm/style-mod/src/style-mod.js",
|
|
||||||
"w3c-keyname": "https://cdn.jsdelivr.net/npm/w3c-keyname/index.es.js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script type="module" type="application/javascript">
|
|
||||||
import * as cm from 'codemirror';
|
|
||||||
import * as lc from '@nextjournal/lang-clojure'
|
|
||||||
import * as cv from '@codemirror/view';
|
|
||||||
import * as cs from '@codemirror/state';
|
|
||||||
globalThis.cm = cm;
|
|
||||||
globalThis.lc = lc;
|
|
||||||
globalThis.cv = cv;
|
|
||||||
globalThis.cs = cs;
|
|
||||||
scittle.core.eval_script_tags();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="application/x-scittle" src="cljs/codemirror.cljs"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Using <a href="https://www.npmjs.com/package/@nextjournal/lang-clojure">@nextjournal/lang-clojure</a> directly from npm in HTML!</h1>
|
|
||||||
<div id="app">
|
|
||||||
</div>
|
|
||||||
<div id="reagent">
|
|
||||||
</div>
|
|
||||||
<button id="evalMe" onClick="eval_me()">Eval</button>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="../js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="../js/scittle.reagent.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(defn f [x]
|
|
||||||
(inc n))
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,191 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
|
||||||
<!-- <script src="js/scittle.re-frame.js" type="application/javascript"></script> -->
|
|
||||||
<script src="js/scittle.cljs-ajax.js" type="application/javascript"></script>
|
|
||||||
<script src="js/scittle.pprint.js" type="application/javascript"></script>
|
|
||||||
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(defn my-alert []
|
|
||||||
(js/alert "You clicked!"))
|
|
||||||
|
|
||||||
(set! (.-my_alert js/window) my-alert)
|
|
||||||
|
|
||||||
(require '[reagent.core :as r]
|
|
||||||
'[reagent.dom :as rdom])
|
|
||||||
|
|
||||||
(def state (r/atom {:clicks 0}))
|
|
||||||
|
|
||||||
#_(require '[re-frame.core :as rf]
|
|
||||||
'[reagent.dom :as rdom])
|
|
||||||
#_(rf/reg-event-fx ::click (fn [{:keys [db]} [_]] {:db (update db :clicks (fnil inc 0))}))
|
|
||||||
#_(rf/reg-sub ::clicks (fn [db _] (:clicks db)))
|
|
||||||
|
|
||||||
(defn my-component []
|
|
||||||
[:div
|
|
||||||
[:p "Clicks: " (:clicks @state)]
|
|
||||||
[:p [:button {:on-click #(do (swap! state update :clicks inc)
|
|
||||||
#_(rf/dispatch [::click]))}
|
|
||||||
"Click me!"]]])
|
|
||||||
|
|
||||||
#_(defn re-frame-component []
|
|
||||||
(let [clicks (rf/subscribe [::clicks])]
|
|
||||||
[:div "Clicks:" @clicks]))
|
|
||||||
|
|
||||||
(rdom/render [my-component] (.getElementById js/document "app"))
|
|
||||||
|
|
||||||
#_(rdom/render [re-frame-component] (.getElementById js/document "re-frame"))
|
|
||||||
|
|
||||||
(require '[ajax.core :refer [GET]])
|
|
||||||
|
|
||||||
(defn handler [response]
|
|
||||||
(js/alert (str response)))
|
|
||||||
|
|
||||||
(defn make-request []
|
|
||||||
(GET "html/cljs-ajax.html" {:handler handler}))
|
|
||||||
|
|
||||||
;; export function to use from JavaScript:
|
|
||||||
(set! (.-make_request js/window) make-request)
|
|
||||||
|
|
||||||
(def code-tags (.querySelectorAll js/document "code[data-type='scittle']"))
|
|
||||||
|
|
||||||
(require '[goog.object :as gobject])
|
|
||||||
(doseq [code code-tags]
|
|
||||||
(let [src (.getAttribute code "data-src")
|
|
||||||
req (js/XMLHttpRequest.)]
|
|
||||||
(.open req "GET" src true)
|
|
||||||
(set! (.-onload req)
|
|
||||||
(fn []
|
|
||||||
(let [response (gobject/get req "response")]
|
|
||||||
(set! (.-innerText code) response)
|
|
||||||
(.highlightElement js/hljs code))))
|
|
||||||
(.send req)))
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div style="float: right;">
|
|
||||||
<a href="https://gitHub.com/babashka/scittle"><img src="https://img.shields.io/github/stars/babashka/scittle.svg?style=social&label=Star"></a></div>
|
|
||||||
|
|
||||||
<h1>Scittle</h1>
|
|
||||||
<h2>What is this?</h2>
|
|
||||||
<p>This project exposes the <a href="https://github.com/babashka/sci">Small Clojure Interpreter</a> in the
|
|
||||||
browser in such a way that you can use it with the <tt>script</tt> tag.</p>
|
|
||||||
|
|
||||||
<a name="usage"></a>
|
|
||||||
<h2><a href="#usage">Usage</a></h2>
|
|
||||||
|
|
||||||
To embed scittle in your website, it is recommended to use the links
|
|
||||||
published to
|
|
||||||
the <a href="https://github.com/babashka/scittle/releases/tag/v0.7.27">releases
|
|
||||||
page</a>.
|
|
||||||
|
|
||||||
Include <tt>scittle.js</tt> and write a <tt>script</tt> tag
|
|
||||||
where <tt>type</tt> is set
|
|
||||||
to <tt>application/x-scittle</tt>.
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/export.html" class="html"></code></pre>
|
|
||||||
<button onclick="my_alert()">
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<a name="src"></a>
|
|
||||||
<h2><a href="#src">Source from file</a></h2>
|
|
||||||
|
|
||||||
When you have a file on your server, say <tt>cljs/script.cljs</tt>, you can load it using the <tt>src</tt> attribute:
|
|
||||||
|
|
||||||
<pre><code id="scittle-tag-example" class="html">
|
|
||||||
<script src="cljs/script.cljs" type="application/x-scittle"></script>
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<script type="text/javascript">hljs.highlightElement(document.getElementById("scittle-tag-example"));</script>
|
|
||||||
|
|
||||||
<a name="reagent"></a>
|
|
||||||
<h2><a href="#reagent">Reagent plugin</a></h2>
|
|
||||||
|
|
||||||
To enable <a href="https://github.com/reagent-project/reagent">reagent</a>,
|
|
||||||
in addition to <tt>scittle.js</tt>, you need to include React
|
|
||||||
and <tt>scittle.reagent.js</tt>:
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/reagent.html" class="html"></code></pre>
|
|
||||||
|
|
||||||
<div id="app"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<a name="re-frame"></a>
|
|
||||||
<h2><a href="#re-frame">Re-frame plugin</a></h2>
|
|
||||||
|
|
||||||
To enable <a href="https://github.com/day8/re-frame">re-frame</a>,
|
|
||||||
in addition to the files needed for reagent, you need to include <tt>scittle.re-frame.js</tt>.
|
|
||||||
Also see the <a href="codemirror.html">codemirror</a> playground.
|
|
||||||
|
|
||||||
<a name="cljs-ajax"></a>
|
|
||||||
<h2><a href="#cljs-ajax">Cljs-ajax plugin</a></h2>
|
|
||||||
|
|
||||||
To enable <a href="https://github.com/JulianBirch/cljs-ajax">cljs-ajax</a>,
|
|
||||||
in addition to <tt>scittle.js</tt>, you need to include <tt>scittle.cljs-ajax.js</tt>:
|
|
||||||
|
|
||||||
<pre><code data-type="scittle" data-src="html/cljs-ajax.html" class="html"></code></pre>
|
|
||||||
|
|
||||||
<button onclick="make_request()">
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<a name="pprint"></a>
|
|
||||||
<h2><a href="#pprint">cljs.pprint plugin</a></h2> To
|
|
||||||
enable <a href="https://cljs.github.io/api/cljs.pprint/">cljs.pprint</a>, in
|
|
||||||
addition to <tt>scittle.js</tt>, you need to
|
|
||||||
include <tt>scittle.pprint.js</tt>.
|
|
||||||
|
|
||||||
<a name="reader-conditional"></a>
|
|
||||||
<h2><a href="#reader-conditional">Target :scittle in cljc</a></h2>
|
|
||||||
You can target scittle in .cljc files (use a script tag to include the cljc file) with the <code>:scittle</code> reader conditional like this:<br>
|
|
||||||
|
|
||||||
<pre><code class="clojure">
|
|
||||||
#?(:scittle
|
|
||||||
(js/console.log "In scittle")
|
|
||||||
:org.babashka/nbb
|
|
||||||
(js/console.log "In nbb")
|
|
||||||
:cljs
|
|
||||||
(js/console.log "In cljs"))
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<a name="JS libraries"></a>
|
|
||||||
<h2><a href="#js-libraries">JS libraries</a></h2>
|
|
||||||
|
|
||||||
To use JavaScript libraries with Scittle,
|
|
||||||
see <a href="https://github.com/babashka/scittle/blob/main/doc/js-libraries.md">README.md</a>
|
|
||||||
|
|
||||||
<a name="repl"></a>
|
|
||||||
<h2><a href="#nrepl">REPL</a></h2>
|
|
||||||
|
|
||||||
To connect to a REPL with Scittle,
|
|
||||||
see <a href="https://github.com/babashka/scittle/blob/main/README.md#repl">README.md</a>
|
|
||||||
|
|
||||||
<a name="examples"></a>
|
|
||||||
<h2><a href="#examples">Examples</a></h2>
|
|
||||||
<ul>
|
|
||||||
<li>Scittle on <a href="https://codepen.io/Prestance/pen/PoOdZQw">CodePen</a></li>
|
|
||||||
<li><a href="tictactoe.html">Tic-tac-toe</a></li>
|
|
||||||
<li><a href="bookmarklet.html">Bookmarklet</a></li>
|
|
||||||
<li><a href="wordle.html">Wordle</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/kloimhardt/babashka-scittle-guestbook">
|
|
||||||
Babashka + scittle implementation of the Luminus guestbook.
|
|
||||||
</a></li>
|
|
||||||
<li><a href="codemirror.html">Codemirror</a></li>
|
|
||||||
<li><a href="replicant_tictactoe.html">Tic-tac-toe with Replicant</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script src="js/scittle.cljs-devtools.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(js/console.log {:a 1})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script>var SCITTLE_NREPL_WEBSOCKET_PORT = 1340;</script>
|
|
||||||
<script src="js/scittle.nrepl.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle" src="cljs/nrepl_playground.cljs"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Scittle</h1>
|
|
||||||
<h2>What is this?</h2>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script src="js/scittle.replicant.js" type="application/javascript"></script>
|
|
||||||
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/ui.cljs"></script>
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/game.cljs"></script>
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/core.cljs"></script>
|
|
||||||
<link rel="stylesheet" href="cljs/replicant-tictactoe/style.css">
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js" type="text/javascript"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/languages/clojure.min.js" type="text/javascript"></script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/zenburn.min.css" integrity="sha512-JPxjD2t82edI35nXydY/erE9jVPpqxEJ++6nYEoZEpX2TRsmp2FpZuQqZa+wBCen5U16QZOkMadGXHCfp+tUdg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Scittle tic-tac-toe built with Replicant</h1>
|
|
||||||
<h2>What is Scittle?</h2>
|
|
||||||
<p>Read <a href="index.html">the main page</a> for more details.</p>
|
|
||||||
<h2>The game</h2>
|
|
||||||
<div id="app"></div>
|
|
||||||
<p>The following source was loaded and interpreted
|
|
||||||
from <a href="cljs/replicant_tictactoe/core.cljs"><tt>cljs/replicant_tictactoe/core.cljs</tt></a> using the
|
|
||||||
script tag:
|
|
||||||
<pre><code class="html">
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/ui.cljs"></script>
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/game.cljs"></script>
|
|
||||||
<script type="application/x-scittle" src="cljs/replicant_tictactoe/core.cljs"></script>
|
|
||||||
|
|
||||||
</code></pre>
|
|
||||||
</p>
|
|
||||||
<pre><code class="language-clojure" id="cljs"></code></pre>
|
|
||||||
<script type="application/x-scittle">
|
|
||||||
(defn set-text [progress-event]
|
|
||||||
(let [elt (.getElementById js/document "cljs")]
|
|
||||||
(set! (.-innerHTML elt) (.. progress-event -srcElement -responseText))
|
|
||||||
(.highlightAll js/hljs)))
|
|
||||||
(def oreq (js/XMLHttpRequest.))
|
|
||||||
(.addEventListener oreq "load" set-text)
|
|
||||||
(.open oreq "GET" "cljs/replicant_tictactoe/core.cljs")
|
|
||||||
(.send oreq)
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,56 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<!-- This HTML file is for local debugging -->
|
|
||||||
<script async src="https://ga.jspm.io/npm:es-module-shims@1.6.1/dist/es-module-shims.js"></script>
|
|
||||||
<script src="/js/scittle.js"></script>
|
|
||||||
<script>scittle.core.disable_auto_eval();</script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
||||||
<script src="/js/scittle.reagent.js"> </script>
|
|
||||||
<script src="/js/scittle.re-frame.js"> </script>
|
|
||||||
<script src="/js/scittle.pprint.js"> </script>
|
|
||||||
<script type="importmap">
|
|
||||||
{
|
|
||||||
"imports": {
|
|
||||||
"codemirror": "https://cdn.jsdelivr.net/npm/codemirror/dist/index.js",
|
|
||||||
"@codemirror/commands": "https://cdn.jsdelivr.net/npm/@codemirror/commands/dist/index.js",
|
|
||||||
"@codemirror/search": "https://cdn.jsdelivr.net/npm/@codemirror/search/dist/index.js",
|
|
||||||
"@codemirror/autocomplete": "https://cdn.jsdelivr.net/npm/@codemirror/autocomplete/dist/index.js",
|
|
||||||
"@codemirror/lint": "https://cdn.jsdelivr.net/npm/@codemirror/lint/dist/index.js",
|
|
||||||
"crelt": "https://cdn.jsdelivr.net/npm/crelt/index.es.js",
|
|
||||||
"@nextjournal/lang-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lang-clojure/dist/index.js",
|
|
||||||
"@nextjournal/lezer-clojure": "https://cdn.jsdelivr.net/npm/@nextjournal/lezer-clojure/dist/index.es.js",
|
|
||||||
"@lezer/highlight": "https://cdn.jsdelivr.net/npm/@lezer/highlight/dist/index.js",
|
|
||||||
"@lezer/lr": "https://cdn.jsdelivr.net/npm/@lezer/lr/dist/index.js",
|
|
||||||
"@lezer/common": "https://cdn.jsdelivr.net/npm/@lezer/common/dist/index.js",
|
|
||||||
"@codemirror/language": "https://cdn.jsdelivr.net/npm/@codemirror/language/dist/index.js",
|
|
||||||
"@codemirror/state": "https://cdn.jsdelivr.net/npm/@codemirror/state/dist/index.js",
|
|
||||||
"@codemirror/view": "https://cdn.jsdelivr.net/npm/@codemirror/view/dist/index.js",
|
|
||||||
"style-mod": "https://cdn.jsdelivr.net/npm/style-mod/src/style-mod.js",
|
|
||||||
"w3c-keyname": "https://cdn.jsdelivr.net/npm/w3c-keyname/index.es.js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script type="module" type="application/javascript">
|
|
||||||
import * as cm from 'codemirror';
|
|
||||||
import * as lc from '@nextjournal/lang-clojure'
|
|
||||||
import * as cv from '@codemirror/view';
|
|
||||||
import * as cs from '@codemirror/state';
|
|
||||||
globalThis.cm = cm;
|
|
||||||
globalThis.lc = lc;
|
|
||||||
globalThis.cv = cv;
|
|
||||||
globalThis.cs = cs;
|
|
||||||
scittle.core.eval_script_tags();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="application/x-scittle" src="/cljs/codemirror.cljs"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Using <a href="https://www.npmjs.com/package/@nextjournal/lang-clojure">@nextjournal/lang-clojure</a> directly from npm in HTML!</h1>
|
|
||||||
<div id="app">
|
|
||||||
</div>
|
|
||||||
<div id="reagent">
|
|
||||||
</div>
|
|
||||||
<button id="evalMe" onClick="eval_me()">Eval</button>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,39 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Wordle!</title>
|
|
||||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
|
||||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
|
||||||
<meta content="utf-8" http-equiv="encoding">
|
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
|
||||||
<script type="application/x-scittle" src="https://raw.githubusercontent.com/oxalorg/wordle-clojurescript/main/src/wordle/core2.cljs"></script>
|
|
||||||
<style type="text/css">
|
|
||||||
#app {
|
|
||||||
background-color: #121212;
|
|
||||||
}
|
|
||||||
#app .board {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(5, 60px);
|
|
||||||
}
|
|
||||||
#app .cell {
|
|
||||||
color: white;
|
|
||||||
font-weight: bold;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
margin: 10px;
|
|
||||||
border: 2px solid gray;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p class="board">Wordle by <a href="https://github.com/oxalorg/wordle-clojurescript">@oxalorg</a>.
|
|
||||||
Play the game by typing letters and then hit return. The source code is loaded from <a href="https://raw.githubusercontent.com/oxalorg/wordle-clojurescript/main/src/wordle/core2.cljs">here</a>.
|
|
||||||
</p>
|
|
||||||
<div id="app"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/usr/bin/env bb
|
|
||||||
|
|
||||||
(ns changelog
|
|
||||||
(:require [clojure.string :as str]))
|
|
||||||
|
|
||||||
(let [changelog (slurp "CHANGELOG.md")
|
|
||||||
replaced (str/replace changelog
|
|
||||||
#" #(\d+)"
|
|
||||||
(fn [[_ issue after]]
|
|
||||||
(format " [#%s](https://github.com/babashka/scittle/issues/%s)%s"
|
|
||||||
issue issue (str after))))
|
|
||||||
replaced (str/replace replaced
|
|
||||||
#"@([a-zA-Z0-9-_]+)([, \.)])"
|
|
||||||
(fn [[_ name after]]
|
|
||||||
(format "[@%s](https://github.com/%s)%s"
|
|
||||||
name name after)))]
|
|
||||||
(spit "CHANGELOG.md" replaced))
|
|
|
@ -1,83 +0,0 @@
|
||||||
#!/usr/bin/env bb
|
|
||||||
|
|
||||||
(require '[babashka.fs :as fs]
|
|
||||||
'[babashka.tasks :refer [shell]])
|
|
||||||
|
|
||||||
(fs/create-dirs "gh-pages")
|
|
||||||
|
|
||||||
(fs/copy "resources/public/index.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/base.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/tictactoe.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/bookmarklet.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/wordle.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/disable_auto_eval.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/codemirror.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(fs/copy "resources/public/replicant_tictactoe.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(def html-source-dir (fs/file "resources" "public" "html"))
|
|
||||||
(def html-target-dir (fs/file "gh-pages" "html"))
|
|
||||||
(fs/create-dirs html-target-dir)
|
|
||||||
(doseq [html ["export.html" "reagent.html" "cljs-ajax.html"]]
|
|
||||||
(fs/copy (fs/file html-source-dir html) html-target-dir
|
|
||||||
{:replace-existing true}))
|
|
||||||
|
|
||||||
(def style-source-dir (fs/file "resources" "public" "css"))
|
|
||||||
(def style-target-dir (fs/file "gh-pages" "css"))
|
|
||||||
(fs/create-dirs style-target-dir)
|
|
||||||
(fs/copy "resources/public/css/style.css" style-target-dir
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(def js-source-dir (fs/file "resources" "public" "js"))
|
|
||||||
(def js-target-dir (fs/file "gh-pages" "js"))
|
|
||||||
(fs/create-dirs js-target-dir)
|
|
||||||
|
|
||||||
(println "Compiling CLJS")
|
|
||||||
(shell "bb prod")
|
|
||||||
|
|
||||||
(fs/copy "resources/public/js/report.html" "gh-pages"
|
|
||||||
{:replace-existing true})
|
|
||||||
|
|
||||||
(def index-file (fs/file "gh-pages" "index.html"))
|
|
||||||
|
|
||||||
(def cljs-source-dir (fs/file "resources" "public" "cljs"))
|
|
||||||
(def cljs-target-dir (fs/file "gh-pages" "cljs"))
|
|
||||||
(fs/create-dirs cljs-target-dir)
|
|
||||||
|
|
||||||
(run! (fn [f]
|
|
||||||
(println "Copying" (str f))
|
|
||||||
(fs/copy f
|
|
||||||
cljs-target-dir
|
|
||||||
{:replace-existing true}))
|
|
||||||
(fs/glob cljs-source-dir "*.cljs"))
|
|
||||||
|
|
||||||
(println "Copying dir resources/public/cljs/replicant_tictactoe")
|
|
||||||
(fs/copy-tree (fs/file cljs-source-dir "replicant_tictactoe") (fs/file cljs-target-dir "replicant_tictactoe") {:replace-existing true})
|
|
||||||
|
|
||||||
(run! (fn [f]
|
|
||||||
(println "Copying" (str f))
|
|
||||||
(fs/copy f
|
|
||||||
js-target-dir
|
|
||||||
{:replace-existing true}))
|
|
||||||
(fs/glob js-source-dir "scittle*.js"))
|
|
||||||
|
|
||||||
(def with-gh-pages (partial shell {:dir "gh-pages"}))
|
|
||||||
(with-gh-pages "git add .")
|
|
||||||
(with-gh-pages "git commit -m 'update build'")
|
|
||||||
(with-gh-pages "git push origin gh-pages")
|
|
||||||
|
|
||||||
nil
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
clojure -M:dev -m shadow.cljs.devtools.cli release main
|
|
||||||
cp resources/public/index.html gh-pages
|
|
||||||
sed -i 's/main.js/sci_script_tag.js/' gh-pages/index.html
|
|
||||||
|
|
||||||
mkdir -p gh-pages/js
|
|
||||||
cp resources/public/js/main.js gh-pages/js/sci_script_tag.js
|
|
||||||
|
|
||||||
cd gh-pages
|
|
||||||
git add .
|
|
||||||
git commit -m "update build"
|
|
||||||
git push origin gh-pages
|
|
|
@ -1,40 +0,0 @@
|
||||||
{:deps
|
|
||||||
{:aliases [:dev]}
|
|
||||||
|
|
||||||
:dev-http
|
|
||||||
{8000 "classpath:public"}
|
|
||||||
|
|
||||||
:builds
|
|
||||||
{:main
|
|
||||||
{;; for dev build
|
|
||||||
#_#_:compiler-options {:optimizations :simple
|
|
||||||
:pretty-print true
|
|
||||||
:pseudo-names true}
|
|
||||||
:target :browser
|
|
||||||
:js-options
|
|
||||||
{:resolve {"react" {:target :global
|
|
||||||
:global "React"}
|
|
||||||
"react-dom" {:target :global
|
|
||||||
:global "ReactDOM"}}}
|
|
||||||
:modules
|
|
||||||
{:scittle {:entries [scittle.core]}
|
|
||||||
:scittle.nrepl {:entries [scittle.nrepl]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.promesa {:entries [scittle.promesa]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.js-interop {:entries [scittle.js-interop]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.pprint {:entries [scittle.pprint]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.reagent {:entries [scittle.reagent]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.replicant {:entries [scittle.replicant]
|
|
||||||
:depends-on #{:scittle}}
|
|
||||||
:scittle.re-frame {:entries [scittle.re-frame]
|
|
||||||
:depends-on #{:scittle.reagent
|
|
||||||
:scittle}}
|
|
||||||
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
|
|
||||||
:depends-on #{:scittle}}}
|
|
||||||
:build-hooks [(shadow.cljs.build-report/hook)]
|
|
||||||
:output-dir "resources/public/js" ;; + "/dev" for dev build
|
|
||||||
:devtools {:repl-pprint true}}}}
|
|
|
@ -1,13 +0,0 @@
|
||||||
(ns scittle.cljs-ajax
|
|
||||||
(:require [ajax.core]
|
|
||||||
[sci.core :as sci]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(def ans (sci/create-ns 'ajax.core nil))
|
|
||||||
|
|
||||||
(def ajax-namespace
|
|
||||||
(sci/copy-ns ajax.core ans))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::ajax
|
|
||||||
{:namespaces {'ajax.core ajax-namespace}})
|
|
|
@ -1,6 +0,0 @@
|
||||||
(ns scittle.cljs-devtools
|
|
||||||
(:require [devtools.core :as devtools]))
|
|
||||||
|
|
||||||
(devtools/set-pref! :disable-advanced-mode-check true)
|
|
||||||
|
|
||||||
(devtools/install!)
|
|
|
@ -1,143 +0,0 @@
|
||||||
(ns scittle.core
|
|
||||||
(:refer-clojure :exclude [time])
|
|
||||||
(:require [cljs.reader :refer [read-string]]
|
|
||||||
[goog.object :as gobject]
|
|
||||||
[goog.string :as gstring]
|
|
||||||
[goog.string.format]
|
|
||||||
[sci.core :as sci]
|
|
||||||
[sci.ctx-store :as store]
|
|
||||||
[sci.impl.unrestrict]
|
|
||||||
[scittle.impl.common :refer [cljns]]
|
|
||||||
[scittle.impl.error :as error]
|
|
||||||
[clojure.string :as str]))
|
|
||||||
|
|
||||||
(set! sci.impl.unrestrict/*unrestricted* true)
|
|
||||||
|
|
||||||
;; make document conditional
|
|
||||||
(def ^js doc js/globalThis.document)
|
|
||||||
|
|
||||||
(clojure.core/defmacro time
|
|
||||||
"Evaluates expr and prints the time it took. Returns the value of expr."
|
|
||||||
[expr]
|
|
||||||
`(let [start# (cljs.core/system-time)
|
|
||||||
ret# ~expr]
|
|
||||||
(prn (cljs.core/str "Elapsed time: "
|
|
||||||
(.toFixed (- (system-time) start#) 6)
|
|
||||||
" msecs"))
|
|
||||||
ret#))
|
|
||||||
|
|
||||||
(def stns (sci/create-ns 'sci.script-tag nil))
|
|
||||||
(def rns (sci/create-ns 'cljs.reader nil))
|
|
||||||
|
|
||||||
(def namespaces
|
|
||||||
{'clojure.core
|
|
||||||
{'time (sci/copy-var time cljns)
|
|
||||||
'system-time (sci/copy-var system-time cljns)
|
|
||||||
'random-uuid (sci/copy-var random-uuid cljns)
|
|
||||||
'read-string (sci/copy-var read-string cljns)
|
|
||||||
'update-keys (sci/copy-var update-keys cljns)
|
|
||||||
'update-vals (sci/copy-var update-vals cljns)
|
|
||||||
'parse-boolean (sci/copy-var parse-boolean cljns)
|
|
||||||
'parse-double (sci/copy-var parse-double cljns)
|
|
||||||
'parse-long (sci/copy-var parse-long cljns)
|
|
||||||
'parse-uuid (sci/copy-var parse-uuid cljns)
|
|
||||||
'NaN? (sci/copy-var NaN? cljns)
|
|
||||||
'infinite? (sci/copy-var infinite? cljns)
|
|
||||||
'iteration (sci/copy-var iteration cljns)
|
|
||||||
'abs (sci/copy-var abs cljns)}
|
|
||||||
'goog.object {'set gobject/set
|
|
||||||
'get gobject/get}
|
|
||||||
'goog.string {'format gstring/format
|
|
||||||
'htmlEscape gstring/htmlEscape}
|
|
||||||
'goog.string.format {} ;; For cljs compatibility
|
|
||||||
'sci.core {'stacktrace sci/stacktrace
|
|
||||||
'format-stacktrace sci/format-stacktrace}})
|
|
||||||
|
|
||||||
(defn load-fn [{:keys [ctx] :as opts}]
|
|
||||||
(when-let [lib (and (string? (:namespace opts))
|
|
||||||
(gobject/get js/globalThis (:namespace opts)))]
|
|
||||||
(sci/add-js-lib! ctx (:namespace opts) lib)))
|
|
||||||
|
|
||||||
(store/reset-ctx!
|
|
||||||
(sci/init {:namespaces namespaces
|
|
||||||
:classes {'js js/globalThis
|
|
||||||
:allow :all
|
|
||||||
'Math js/Math}
|
|
||||||
:ns-aliases {'clojure.pprint 'cljs.pprint}
|
|
||||||
:features #{:scittle :cljs}
|
|
||||||
:load-fn load-fn}))
|
|
||||||
|
|
||||||
(unchecked-set js/globalThis "import" (js/eval "(x) => import(x)"))
|
|
||||||
|
|
||||||
(def !last-ns (volatile! @sci/ns))
|
|
||||||
|
|
||||||
(defn- -eval-string [s]
|
|
||||||
(sci/binding [sci/ns @!last-ns]
|
|
||||||
(let [rdr (sci/reader s)]
|
|
||||||
(loop [res nil]
|
|
||||||
(let [form (sci/parse-next (store/get-ctx) rdr)]
|
|
||||||
(if (= :sci.core/eof form)
|
|
||||||
(do
|
|
||||||
(vreset! !last-ns @sci/ns)
|
|
||||||
res)
|
|
||||||
(recur (sci/eval-form (store/get-ctx) form))))))))
|
|
||||||
|
|
||||||
(defn ^:export eval-string [s]
|
|
||||||
(try (-eval-string s)
|
|
||||||
(catch :default e
|
|
||||||
(error/error-handler e (:src (store/get-ctx)))
|
|
||||||
(throw e))))
|
|
||||||
|
|
||||||
(defn register-plugin! [_plug-in-name sci-opts]
|
|
||||||
(store/swap-ctx! sci/merge-opts sci-opts))
|
|
||||||
|
|
||||||
(defn- eval-script-tags* [script-tags]
|
|
||||||
(when-let [tag (first script-tags)]
|
|
||||||
(if-let [src (.getAttribute tag "src")]
|
|
||||||
(let [req (js/XMLHttpRequest.)
|
|
||||||
_ (.open req "GET" src true)
|
|
||||||
_ (gobject/set req "onload"
|
|
||||||
(fn [] (this-as this
|
|
||||||
(let [response (gobject/get this "response")]
|
|
||||||
(gobject/set tag "scittle_id" src)
|
|
||||||
;; save source for error messages
|
|
||||||
(store/swap-ctx! assoc-in [:src src] response)
|
|
||||||
(sci/binding [sci/file src]
|
|
||||||
(eval-string response)))
|
|
||||||
(eval-script-tags* (rest script-tags)))))]
|
|
||||||
(.send req))
|
|
||||||
(if-let [text (not-empty (str/trim (gobject/get tag "textContent")))]
|
|
||||||
(let [scittle-id (str (gensym "scittle-tag-"))]
|
|
||||||
(gobject/set tag "scittle_id" scittle-id)
|
|
||||||
(store/swap-ctx! assoc-in [:src scittle-id] text)
|
|
||||||
(sci/binding [sci/file scittle-id]
|
|
||||||
(eval-string text))
|
|
||||||
(eval-script-tags* (rest script-tags)))
|
|
||||||
(eval-script-tags* (rest script-tags))))))
|
|
||||||
|
|
||||||
(defn ^:export eval-script-tags [& [script-tags]]
|
|
||||||
(let [script-tags (or script-tags
|
|
||||||
(.querySelectorAll
|
|
||||||
doc "script[type='application/x-scittle']"))
|
|
||||||
script-tags (if (or (coll? script-tags)
|
|
||||||
(aget script-tags "length"))
|
|
||||||
script-tags
|
|
||||||
[script-tags])]
|
|
||||||
(eval-script-tags* script-tags)))
|
|
||||||
|
|
||||||
(def auto-load-disabled? (volatile! false))
|
|
||||||
|
|
||||||
(defn ^:export disable-auto-eval
|
|
||||||
"By default, scittle evaluates script nodes on the DOMContentLoaded
|
|
||||||
event using the eval-script-tags function. This function disables
|
|
||||||
that behavior."
|
|
||||||
[]
|
|
||||||
(vreset! auto-load-disabled? true))
|
|
||||||
|
|
||||||
(when doc
|
|
||||||
(.addEventListener doc
|
|
||||||
"DOMContentLoaded"
|
|
||||||
(fn [] (when-not @auto-load-disabled? (eval-script-tags))), false))
|
|
||||||
|
|
||||||
(enable-console-print!)
|
|
||||||
(sci/alter-var-root sci/print-fn (constantly *print-fn*))
|
|
|
@ -1,4 +0,0 @@
|
||||||
(ns scittle.impl.common
|
|
||||||
(:require [sci.core :as sci]))
|
|
||||||
|
|
||||||
(def cljns (sci/create-ns 'clojure.core nil))
|
|
|
@ -1,92 +0,0 @@
|
||||||
(ns scittle.impl.error
|
|
||||||
(:refer-clojure :exclude [println])
|
|
||||||
(:require [clojure.string :as str]
|
|
||||||
[sci.core :as sci]))
|
|
||||||
|
|
||||||
(defn println [& strs]
|
|
||||||
(.error js/console (str/join " " strs)))
|
|
||||||
|
|
||||||
(defn ruler [title]
|
|
||||||
(println (apply str "----- " title " " (repeat (- 50 7 (count title)) \-))))
|
|
||||||
|
|
||||||
(defn split-stacktrace [stacktrace verbose?]
|
|
||||||
(if verbose? [stacktrace]
|
|
||||||
(let [stack-count (count stacktrace)]
|
|
||||||
(if (<= stack-count 10)
|
|
||||||
[stacktrace]
|
|
||||||
[(take 5 stacktrace)
|
|
||||||
(drop (- stack-count 5) stacktrace)]))))
|
|
||||||
|
|
||||||
(defn print-stacktrace
|
|
||||||
[stacktrace {:keys [:verbose?]}]
|
|
||||||
(let [stacktrace (sci/format-stacktrace stacktrace)
|
|
||||||
segments (split-stacktrace stacktrace verbose?)
|
|
||||||
[fst snd] segments]
|
|
||||||
(run! #(print % "\n") fst)
|
|
||||||
(when snd
|
|
||||||
(print "...\n")
|
|
||||||
(run! #(print % "\n") snd))))
|
|
||||||
|
|
||||||
(defn error-context [ex src-map]
|
|
||||||
(let [{:keys [:file :line :column]} (ex-data ex)]
|
|
||||||
(when (and file line)
|
|
||||||
(when-let [content (get src-map file)]
|
|
||||||
(let [matching-line (dec line)
|
|
||||||
start-line (max (- matching-line 4) 0)
|
|
||||||
end-line (+ matching-line 6)
|
|
||||||
[before after] (->>
|
|
||||||
(str/split-lines content)
|
|
||||||
(map-indexed list)
|
|
||||||
(drop start-line)
|
|
||||||
(take (- end-line start-line))
|
|
||||||
(split-at (inc (- matching-line start-line))))
|
|
||||||
snippet-lines (concat before
|
|
||||||
[[nil (str (str/join "" (repeat (dec column) " "))
|
|
||||||
(str "^--- " (ex-message ex)))]]
|
|
||||||
after)
|
|
||||||
indices (map first snippet-lines)
|
|
||||||
max-size (reduce max 0 (map (comp count str) indices))
|
|
||||||
snippet-lines (map (fn [[idx line]]
|
|
||||||
(if idx
|
|
||||||
(let [line-number (inc idx)]
|
|
||||||
(str (.padStart (str line-number) max-size "0") " " line))
|
|
||||||
(str (str/join (repeat (+ 2 max-size) " ")) line)))
|
|
||||||
snippet-lines)]
|
|
||||||
(str "\n" (str/join "\n" snippet-lines)))))))
|
|
||||||
|
|
||||||
(defn right-pad [s n]
|
|
||||||
(let [n (- n (count s))]
|
|
||||||
(str s (str/join (repeat n " ")))))
|
|
||||||
|
|
||||||
(defn error-handler [e src-map]
|
|
||||||
(let [d (ex-data e)
|
|
||||||
sci-error? (isa? (:type d) :sci/error)
|
|
||||||
stacktrace (sci/stacktrace e)]
|
|
||||||
(ruler "Scittle error")
|
|
||||||
(when-let [name (.-name e)]
|
|
||||||
(when-not (= "Error" name)
|
|
||||||
(println "Type: " name)))
|
|
||||||
(when-let [m (.-message e)]
|
|
||||||
(println (str "Message: " m)))
|
|
||||||
(when-let [d (ex-data (ex-cause e) #_(.getCause e))]
|
|
||||||
(println (str "Data: ")
|
|
||||||
(pr-str d)))
|
|
||||||
(let [{:keys [:file :line :column]} d]
|
|
||||||
(when line
|
|
||||||
(println (str "Location: "
|
|
||||||
(when file (str file ":"))
|
|
||||||
line ":" column""))))
|
|
||||||
(when-let [phase (:phase d)]
|
|
||||||
(println "Phase: " phase))
|
|
||||||
(when-let [ec (when sci-error?
|
|
||||||
(error-context e src-map))]
|
|
||||||
(ruler "Context")
|
|
||||||
(println ec))
|
|
||||||
(when sci-error?
|
|
||||||
(when-let
|
|
||||||
[st (let [st (with-out-str
|
|
||||||
(when stacktrace
|
|
||||||
(print-stacktrace stacktrace src-map)))]
|
|
||||||
(when-not (str/blank? st) st))]
|
|
||||||
(ruler "Stack trace")
|
|
||||||
(println st)))))
|
|
|
@ -1,8 +0,0 @@
|
||||||
(ns scittle.js-interop
|
|
||||||
(:require
|
|
||||||
[sci.configs.applied-science.js-interop :as j]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::js-interop
|
|
||||||
j/config)
|
|
|
@ -1,19 +0,0 @@
|
||||||
(ns scittle.nrepl
|
|
||||||
(:require
|
|
||||||
[clojure.edn :as edn]
|
|
||||||
[sci.nrepl.server :as nrepl-server]))
|
|
||||||
|
|
||||||
(defn ws-url [host port path]
|
|
||||||
(str "ws://" host ":" port "/" path))
|
|
||||||
|
|
||||||
(when-let [ws-port (.-SCITTLE_NREPL_WEBSOCKET_PORT js/window)]
|
|
||||||
(set! (.-ws_nrepl js/window)
|
|
||||||
(new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl"))))
|
|
||||||
|
|
||||||
(when-let [ws (nrepl-server/nrepl-websocket)]
|
|
||||||
(set! (.-onmessage ws)
|
|
||||||
(fn [event]
|
|
||||||
(nrepl-server/handle-nrepl-message (edn/read-string (.-data event)))))
|
|
||||||
(set! (.-onerror ws)
|
|
||||||
(fn [event]
|
|
||||||
(js/console.log event))))
|
|
|
@ -1,8 +0,0 @@
|
||||||
(ns scittle.pprint
|
|
||||||
(:require
|
|
||||||
[sci.configs.cljs.pprint :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::pprint
|
|
||||||
config)
|
|
|
@ -1,8 +0,0 @@
|
||||||
(ns scittle.promesa
|
|
||||||
(:require
|
|
||||||
[sci.configs.funcool.promesa :as p]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::promesa
|
|
||||||
p/config)
|
|
|
@ -1,8 +0,0 @@
|
||||||
(ns scittle.re-frame
|
|
||||||
(:require
|
|
||||||
[sci.configs.re-frame.re-frame :as rf]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::re-frame
|
|
||||||
rf/config)
|
|
|
@ -1,19 +0,0 @@
|
||||||
(ns scittle.reagent
|
|
||||||
(:require
|
|
||||||
[reagent.dom :as rdom]
|
|
||||||
[sci.configs.reagent.reagent :refer [reagent-debug-namespace
|
|
||||||
reagent-namespace reagent-ratom-namespace]]
|
|
||||||
[sci.core :as sci]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(def rdns (sci/create-ns 'reagent.dom nil))
|
|
||||||
|
|
||||||
(def reagent-dom-namespace
|
|
||||||
{'render (sci/copy-var rdom/render rdns)})
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::reagent
|
|
||||||
{:namespaces {'reagent.core reagent-namespace
|
|
||||||
'reagent.dom reagent-dom-namespace
|
|
||||||
'reagent.ratom reagent-ratom-namespace
|
|
||||||
'reagent.debug reagent-debug-namespace}})
|
|
|
@ -1,8 +0,0 @@
|
||||||
(ns scittle.replicant
|
|
||||||
(:require
|
|
||||||
[sci.configs.cjohansen.replicant :refer [config]]
|
|
||||||
[scittle.core :as scittle]))
|
|
||||||
|
|
||||||
(scittle/register-plugin!
|
|
||||||
::replicant
|
|
||||||
config)
|
|
|
@ -3,8 +3,9 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
<script src="js/scittle.js" type="application/javascript"></script>
|
<script src="js/scittle.js" type="application/javascript"></script>
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js"></script>
|
|
||||||
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js"></script>
|
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
|
||||||
|
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
|
||||||
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
<script src="js/scittle.reagent.js" type="application/javascript"></script>
|
||||||
|
|
||||||
<script type="application/x-scittle" src="cljs/tictactoe.cljs"></script>
|
<script type="application/x-scittle" src="cljs/tictactoe.cljs"></script>
|
Loading…
Reference in a new issue